05-24-2008 1:06 PM
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
06-03-2008 3:47 AM
06-03-2008 4:27 AM
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.
06-04-2008 12:05 PM
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
06-03-2008 5:01 AM
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.
06-04-2008 12:14 PM
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