01-20-2011 5:30 PM
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
01-20-2011 7:15 PM
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
01-21-2011 9:15 PM
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
01-21-2011 11:54 PM
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
01-25-2011 6:06 PM
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.