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

data changed event

Former Member
0 Likes
1,737

hello,

i have created an ALV grid with OO and displayed contents of an internal table in container. A field of internal table is displayed as check mark. I want to find out which lines are checked before i go to another processing screen. event handler for data_changed does not work because it waits for Enter or focus change but i directly press a pushbutton to go to the other screen.

Thx in advance

Ali

1 ACCEPTED SOLUTION
Read only

Former Member
1,123

In the PAI of the screen.

CALL METHOD check_changed_data OF THE GRID.

Now, all the data change on the grid, is updated to the table. So, you can loop at the table and find out which rows are checked for the specific check box column.

LOOP AT ITAB WHERE CHECKBOX = 'X'.

ENDLOOP.

Regards,

Ravi

Note - Please mark all the helpful answers

5 REPLIES 5
Read only

anversha_s
Active Contributor
0 Likes
1,123

hi Ali,

BCALV_EDIT_01 This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.

BCALV_EDIT_02 This report illustrates how to set chosen cells of an ALV Grid Control editable.

pls go thru the above stndard SAP OOPS programs.

they are very helpful to solve ur issue.

rgds

Anver

Read only

Former Member
0 Likes
1,123

hi,

use the following code in the PAI of the screen

CALL METHOD grid1->check_changed_data.

grid1 is the grid instance.

this will trigger the handle_data_changed method.

Message was edited by:

Sandeep S

Read only

Former Member
0 Likes
1,123

Hi Ali

Hi you can try function check_changed_data of ALV on some button click.

hope this helps

Read only

Former Member
1,124

In the PAI of the screen.

CALL METHOD check_changed_data OF THE GRID.

Now, all the data change on the grid, is updated to the table. So, you can loop at the table and find out which rows are checked for the specific check box column.

LOOP AT ITAB WHERE CHECKBOX = 'X'.

ENDLOOP.

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
1,123

in OO it will automatically detect the changes made in the container

may be u had missed something

in the layout have u added this

wa_layout-box_fname = 'CHECKBOX'.

where CHECKBOX is the name of that field in ur internal table