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 do you set columns to be editable in ALV object model (CL_SALV_TABLE)?

Former Member
0 Kudos

Hi,

For ALVs using function module REUSE_ALV_GRID_DISPLAY, making a field editable was as simple as setting slis_fieldcat_alv-edit to 'X'. How do we do the equivalent of this using the ALV Object Model (CL_SALV_TABLE)?

Thanks,

Carl

5 REPLIES 5

Former Member
0 Kudos

Raising the question again.

Former Member
0 Kudos

Hi Carl,

even you take the approach of OOPs in ALV you need to provide fieldcatalog structure.

So by filling field catalog you can make the field editable.

0 Kudos

Hi Sandipan Das,

But how do you attached a field catalog to ALV object model (class CL_SALV_TABLE)? I know how to do it using the FM, but in ALV OM I don't know how. I'm trying to search for an equivalent, but I guess that's why I'm asking here because I couldn't find it myself. Do you have sample code? Thanks.

Regards,

Carl

Former Member
0 Kudos

set the below propery for the field you want in edit mode.

DATA: it_fcat TYPE lvc_t_fcat,

DATA: wa_fcat TYPE lvc_s_fcat.

wa_fcat -EDIT = 'X'.

APPEND wa_fcat TO it_fcat.

Former Member
0 Kudos

hi u can display ALV

int[] is the table having data

gt_fieldcat is which is similar to slis_fieldcat_alv

gs_layout is optional

*Display ALV

CALL METHOD gr_alvgrid->set_table_for_first_display

EXPORTING

is_layout = gs_layout

CHANGING

it_outtab = int[]

it_fieldcatalog = gt_fieldcat

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

reward points if useful