Hi Abhishek,
You mean conditional editing.
Create an extra field in your internal table.
DATA: celltab TYPE lvc_t_styl.
Now declare a table.
DATA: lt_celltab TYPE lvc_t_styl,
ls_celltab TYPE line of lvc_t_styl.
Now Loop on your itab and make the value of this field based on condition.
ls_celltab-fieldname = 'FIELDNAME of field to be disbaled'.
IF prd_status EQ 'CONFIRMED'.
ls_celltab-mode = cl_gui_alv_grid=>mc_style_enabled. "to enable the required fields
ELSE.
ls_celltab-mode = cl_gui_alv_grid=>mc_style_disabled.
ENDIF.
INSERT ls_celltab INTO TABLE lt_celltab.
Continue this for all the fields
Finally
INSERT LINES OF lt_celltab INTO TABLE wa_tab-celltab.
MODIFY itab FROM wa_tab INDEX l_index.
clear lt_celltab.
Add a comment