Hi all experts,
got a task that is driving me crazy...
I had to add a cellVariant management on a column of a standard table in SRM 7. In order to avoid any modification to the standard, I preferred to create a new, custom column.
This new, custom column (made via Enhancement) is done as follows:
while the original, standard one is done as follows:
As you can see, in the standard column, the field PRODUCT_ID could only be an inputField, while in my custom column the field could be an InputField or a Dropdown element, depending on CellVariant key.
Now... what is driving me crazy is columns order.
I used to modify columns order from Component Configuration, but actually, when clicking on Re-Sort for the table, the ONLY entry I see is my custom column (ORDERED_PROD_CUST).
I then opened the standard WD Component for modification and right-clicked on the TABLE node in Layout, selecting Convert Table Columns, hoping this would do the trick (as in other situations did). This resulted in a runtime dump caused by an Assertion failed... So I had to revert the WD Component to standard (restoring the first version) and... here I am.
I'm actually trying to approach the task from the ABAP perspective, but there are no explicit methods to re-arrange column's position in a CL_WD_TABLE.
Moreover, I found in debug that my custom column is a GROUPED_COLUMN while standard ones are just COLUMNS.
I tried then to do as follows in WDDOMODIFYVIEW:
if first_time eQ abap_true.
* get table reference
table ?= view->get_element( 'ITEMS_TABLE' ).
* remove standard column
CALL METHOD TABLE->REMOVE_COLUMN
EXPORTING
ID = 'ORDERED_PROD'
* INDEX =
RECEIVING
THE_COLUMN = col.
* remove custom column and re-add it
* because the ADD_GROUPED_COLUMN has an INDEX parameter
* that could be used to specify column's position
CALL METHOD TABLE->REMOVE_GROUPED_COLUMN
EXPORTING
ID = 'ORDERED_PROD_CUST'
* INDEX =
RECEIVING
THE_GROUPED_COLUMN = grcol.
CALL METHOD TABLE->ADD_GROUPED_COLUMN
EXPORTING
INDEX = 3
THE_GROUPED_COLUMN = grcol.
endif.
But again, this doesn't seem to work.
Any idea will be appreciated ![]()
Matteo
