04-08-2009 5:45 AM
Hi,
I have a dought in ALV using OOP.
I have wrote a form to make one field editable in my program.
FORM adjust_editables USING pt_list LIKE gt_list[] .
DATA ls_listrow LIKE LINE OF pt_list .
DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .
LOOP AT pt_list INTO ls_listrow .
ls_stylerow-fieldname = 'CONNID' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled .
APPEND ls_stylerow TO lt_styletab .
ENDLOOP .
ENDFORM
But I am confused where should I call this form.
Can anyone help me out.
Thanks & Regards,
Samarpita.
04-08-2009 5:46 AM
04-08-2009 5:46 AM
04-08-2009 5:49 AM
You field should be editable at the time of List display.
SO this perform should be before the CL_gui_alv_grid->Set_table_for_first_display.
Or
Just pass
Fieldcat-Fieldname = 'CONNID'.
Fieldcat-Edit = 'X'.
Append Fieldcat.
Regards,
Gurpreet
04-08-2009 5:53 AM
Hi Samaghos,
pls refer to the code:
data:
t_list like standard table of gt_list.
perform get_data. " Subroutine to get the data from database table into internal table
call screen.100.
perform adjust_editables using t_list. LIKE gt_list[]
call method CL_gui_alv_grid->Set_table_for_first_display
try this out ....
thanks
ravi
04-08-2009 6:16 AM