Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to call the perform for making one field editable in ALV using OOP

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

at fieldcatalog give edit = 'X'

4 REPLIES 4

Former Member
0 Kudos

at fieldcatalog give edit = 'X'

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks a lot..

It is working now