DDIC structure key
2016-11-02
Today when I want to create a SALV I always create a DDIC structure with the data elements already set to show the texts I need. This avoids the need for code to manipulate the field catalog.
Sometimes I want to fix the table’s primary key columns. And the SALV has an automatic way of doing this:
CL_SALV_COLUMNS_LIST->SET_KEY_FIXATION( ).
But for the columns to be automatically identified they need to be marked as key in the DDIC structure. This is very simple if the structure is a table. But if it is a pure structure the key flag column is not visible by default in SE11.
Fortunately this has a simple solution. Just go to the menu Extras > DB Attributes > …
Et voilá:
Greetings from Abapinho.