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: 

alv grid with check box and custom button modify internal table multiple

Former Member
0 Kudos

Hi ,

i have a custom button in my alv grid display

and a check box

if the user checks multiple records and then he will click

custom button

now here my problem is

in the user _command the table is not getting updated

ie

it is not going into this loop..

can anyone help me in this regard

loop at itab where check = 'X'.

endloop.

2 REPLIES 2

Former Member
0 Kudos

Hi ,

Try this .

form build_layout.

gd_layout-box_fieldname = 'SELECT'.

gd_layout-box_tabname = 'ITAB_DISPLAY'.

endform. " BUILD_LAYOUT

Form user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&BUTTON'.

loop at itab_display where select = 'X'.

Regards,

Mohan.

Former Member
0 Kudos

hI,

I AM sorry to say that it is not working for me

for your understanding

DATA: BEGIN OF itab OCCURS 0,

mara TYPE matnr,

check TYPE c,

selected type c,

END OF itab.

g_layout-box_fieldname = 'SELECTED'.

g_layout-zebra = 'X'.

g_layout-colwidth_optimize = 'X'.

g_layout-no_hline = 'X'.

g_layout-edit = 'X'.

g_layout-box_tabname = 'ITAB'.

case sy-ucomm.

when 'DELE'

LOOP AT itab WHERE SELECTED EQ 'X'.

IF ITAB-CHECK = 'X'.

ENDIF.

ENDLOOP.

endcase.

Please kindly help me