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 edit field

S0004596522
Explorer
0 Kudos

Hello,

I have an ALV created with REUSE_ALV_GRID_DISPLAY.

In this ALV I have a field with the edit flag enabled and then I have a button in the toolbar which will process the changed data.

The problem is that the changed values are not updated in the internal table.

If I press the save button before pressing my button, the values get updated.

What can I do?

Thank you in advance.

Nuno Silva

4 REPLIES 4

Former Member
0 Kudos

Hi Nuno,

I believe you should check if the command assigned to your button is being used in USER-COMMAND form.

For example if button is u201C&SAVEu201D you must have:

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN '&SAVE'.

      • code goes here

ENDCASE.

ENDFORM. "user_command

You can also debug the report and check which is the deference between your button and Save button, checking that SY-UCOM is correct.

Good luck!

Gabriela

0 Kudos

Nuno,

Try using this code in the section which handles the click on your button.

Data : l_valid TYPE c.

alv->check_changed_data( IMPORTING e_valid = l_valid ).

Nobin

Clemenss
Active Contributor
0 Kudos

Hi Nuno,

also you have to register the enter event so that any function will trigger the check_changed_data event.

Please search for the exact syntax, I have done too often, should be around the FAQs.

Regards,

Clemens

Former Member
0 Kudos

HI,

Check in type pool SLIS for type SLIS_LAYOUT_ALV. There will be a field called EDIT1 and EDIT_MODE. But this is applicable only

when you display the ouput in GRID and not in LIST.

Alternate way , if it is not work above way then try executing the program BCALV_GRID_EDIT.

It will helps you.