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

Execute ENTER on ALV

Former Member
0 Likes
418

HI,

I have an editable ALV where user can add new lines. the problem is that I always have to push the enter button to get the values from the added lines to my internal table. is there any method for executing ENTER?

I want that user add new lines and if they finished and push the saving button I want to execute the ENTER function bevor saving to get the lines from the alv to my internal table.

Is this possible?

2 REPLIES 2
Read only

Former Member
0 Likes
382

Hi,

There is no alternative to replicate the enter functionlity, but one thing you can do it.

Put a SAVE button(Just notmal button with save name) on the container grid and then

after changing all the records in the table when user clicks save button on the grid

container, write logic of transferring data to internal table.

For this you have to use toolbar and user_command events in class cl_gui_alv_grid.

I hope it helps.

Regards and best wishes.

Read only

uwe_schieferstein
Active Contributor
0 Likes
382

Hello

I do not see where your problem lies.

Assuming that you are using OO-based ALV (CL_GUI_ALV_GRID) then the logic is straightforward:

(1) User enters new data

(2) User pushes SAVE button (GUI function !) => triggers PAI of the dynpro

(3) Call method go_grid->check_data_changed() at PAI => transfers changes on ALV grid to itab in ABAP program

(4) Call your SAVE routine to store the changed data persistently

Regards

Uwe