Application Development and Automation 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: 
Read only

To make cell editable

Former Member
0 Likes
1,052

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

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
929

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

5 REPLIES 5
Read only

Former Member
0 Likes
929

IS IT POSSIBLE USING THIS fm?

Read only

0 Likes
929

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@

Read only

0 Likes
929

the edit field in the fieldcatalog is X in my program..any more idea

Read only

uwe_schieferstein
Active Contributor
0 Likes
930

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

Read only

Former Member
0 Likes
929

U cannot use Edit function in REUSE_ALV_HIERSEQ_LIST_DISPLAY.