11-09-2007 11:40 AM
Dear experts.
Can anyone help me to capture data from ALV grid to pass to a BAPI FM.
My ALV grid has the check box as first column and I want to capture only the rows in the grid with these checkboxes checked. I would prefer to do it without OO.
Regards
Sathar
11-11-2007 9:00 PM
1. Make your ALV grid editable.
2. In REUSE_ALV_GRID_DISPLAY_LVC or REUSE_ALV_GRID_DISPLAY FM call, pass the user_command subroutine.
i_callback_user_command = 'USER_COMMAND'
3. implement the user_command perform sample
form user_command using r_ucomm type sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when 'SAVE'.
loop at itab where cbox = 'X'.
Your code to do whatever.
endloop.
endcase.
endform.
11-09-2007 4:08 PM
Hi,
Is your ALV editable ? Have you already codded the ALV ?
Regards,
David
11-11-2007 9:00 AM
Hi David
Yes I have coded my alv to have 3 columns including the checkbox column as editable.
Regards
Sathar
11-11-2007 8:56 PM
11-11-2007 9:00 PM
1. Make your ALV grid editable.
2. In REUSE_ALV_GRID_DISPLAY_LVC or REUSE_ALV_GRID_DISPLAY FM call, pass the user_command subroutine.
i_callback_user_command = 'USER_COMMAND'
3. implement the user_command perform sample
form user_command using r_ucomm type sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when 'SAVE'.
loop at itab where cbox = 'X'.
Your code to do whatever.
endloop.
endcase.
endform.