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: 

Capturing data from ALV grid

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Is your ALV editable ? Have you already codded the ALV ?

Regards,

David

0 Kudos

Hi David

Yes I have coded my alv to have 3 columns including the checkbox column as editable.

Regards

Sathar

uwe_schieferstein
Active Contributor
0 Kudos

Hello Sathar

You need to call method go_grid-><b>check_changed_data</b>( ) at <b>PAI </b>to retrieve the current data from your editable ALV list.

For more details have a look at threads:

Regards

Uwe

Former Member
0 Kudos

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.