‎2008 Nov 03 4:41 AM
Hi,
I have used the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY,to display header and item data.i want to edit some cell using 1 pushbutton.
in FM 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
i hve passed the parameterI_CALLBACK_USER_COMMAND = 'FRM_USER_COMMAND '
in subroutine frm_user_command(the fcat-edit field is getting filled and also the celltab )
case r_ucomm.
when 'EDIT'.
loop at it_fieldcat into ls_fcat .
if ls_fcat-fieldname eq 'BRGEW'.
idx = sy-tabix.
ls_fcat-edit = 'X'.
modify it_fieldcat from ls_fcat.
endif.
endloop.
LOOP AT It_HEADER.
l_index = sy-tabix.
refresh lt_celltab.
if IT_HEADER-BRGEW ge 300.
perform fill_celltab using 'RW'
changing lt_celltab.
else.
perform fill_celltab using 'RO'
changing lt_celltab.
endif.
INSERT LINES OF lt_celltab INTO TABLE It_HEADER-celltab.
MODIFY IT_HEADER INDEX l_index.
ENDLOOP.
perform alv_list_display.
but still the columns are not editable
‎2008 Nov 03 6:28 AM
Hello Priya
I am not sure if you can have editable hierarchical ALV lists. However, looking at the definition of the fieldcatalog type you may need to set different flags:
" Type group SLIS:
...
types: begin of slis_fieldcat_alv_spec,
key_sel(1) type c, " field not obligatory
no_sum(1) type c, " do not sum up
sp_group(4) type c, " group specification
reprep(1) type c, " selection for rep/rep
input(1) type c, " input " Try to set INPUT = 'X'
edit(1) type c, " internal use only " <<<<<<<
hotspot(1) type c, " hotspot
end of slis_fieldcat_alv_spec.
types: begin of slis_fieldcat_alv.
include type slis_fieldcat_main.
include type slis_fieldcat_alv_spec.
types: end of slis_fieldcat_alv.
...
Regards
Uwe
‎2008 Nov 03 5:32 AM
‎2008 Nov 03 5:36 AM
Hi Priya,
Generally we will write fieldcat-edit to make the cell in editable mode in ALV reports as shown.
In fieldcat declare like this.
w_fieldcat-edit = 'X'.
This makes the cell with editable mode.
Cheers!!
VEnk@
‎2008 Nov 03 6:23 AM
the edit field in the fieldcatalog is X in my program..any more idea
‎2008 Nov 03 6:28 AM
Hello Priya
I am not sure if you can have editable hierarchical ALV lists. However, looking at the definition of the fieldcatalog type you may need to set different flags:
" Type group SLIS:
...
types: begin of slis_fieldcat_alv_spec,
key_sel(1) type c, " field not obligatory
no_sum(1) type c, " do not sum up
sp_group(4) type c, " group specification
reprep(1) type c, " selection for rep/rep
input(1) type c, " input " Try to set INPUT = 'X'
edit(1) type c, " internal use only " <<<<<<<
hotspot(1) type c, " hotspot
end of slis_fieldcat_alv_spec.
types: begin of slis_fieldcat_alv.
include type slis_fieldcat_main.
include type slis_fieldcat_alv_spec.
types: end of slis_fieldcat_alv.
...
Regards
Uwe
‎2008 Nov 03 6:33 AM