Hi All,
I have tried many ways to do grey out cost center column in account assignment tab of ME22N.
i have created implementation for this class and method.
Class:CL_TABLE_VIEW_MM_2
Method:PBO_TC_LINE
Below is the my code snippet.Kindly let me know any suggestions.
data: l_tc type char100.
data: l_tabix type i.
l_tc = '(SAPLMEACCTVI)DYN_1000TC-COLS'.
FIELD-SYMBOLS:<fs_tcdata> type any TABLE,
<fs_wa> type any ,
<fs_lwa> type any,
<fs_screen> type any,
<fs_input> type any,
<fs_active> type any,
<fs_output> type any.
*data:fs_wa type SCXTAB_COLUMN_IT.
ASSIGN (l_tc) TO <fs_tcdata>.
LOOP AT <fs_tcdata> ASSIGNING <fs_wa>.
l_tabix = sy-tabix.
ASSIGN COMPONENT 'INVISIBLE' OF STRUCTURE <fs_wa> TO <fs_lwa>.
ASSIGN COMPONENT 'SCREEN-NAME' OF STRUCTURE <fs_wa> TO <fs_screen>.
ASSIGN COMPONENT 'SCREEN-INPUT' OF STRUCTURE <fs_wa> TO <fs_input>.
ASSIGN COMPONENT 'SCREEN-ACTIVE' OF STRUCTURE <fs_wa> TO <fs_active>.
ASSIGN COMPONENT 'SCREEN-OUTPUT' OF STRUCTURE <fs_wa> TO <fs_output>.
IF <fs_lwa> = space.
CASE <fs_screen>.
WHEN 'MEACCT1000-KOSTL'.
<fs_input> = 0.
ENDCASE.
endif.
ENDLOOP.
Regards,
Hiriyappa