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

ABAP check_changed_data do not trigger after updating by code

ekekakos
Participant
0 Likes
1,575

I have created an OO ALV that displays some data to the user. When they press a button some filds of some records are fullfilled automatically and these cells are editable in order to be corrected by the user if needed.

My problem is that when the user just press 'SAVE' without change sth by accepting what the system put the check_changed_data is not triggered while when the user change sth in a cell the check_changed_data is triggered.
Can you tell me what am I missing?

Thanks in advance.

5 REPLIES 5
Read only

UweFetzer_se38
Active Contributor
1,458

"check_changed_data" you can read as "Check the changed data" -> so nothing has to be checked if nothing has changed. The right behaviour in my opinion. Or did I misreading your question?

Read only

0 Likes
1,458

Uwe, when the user select some rows in the ALV (which is read-only) and press EDIT then the program during the change from read-only to read-write, it fullfil some fields. If the user press the SAVE it will not update the fields which fullfilled from the program. If the user make some changes and press SAVE it will trigger the check_changed_data and the manual changes will be updated while the changes from program will not be updated.

Is there any way to trigger the CHECK_CHANGED_DATA when the program fullfill or change some fields?

I read somewhere that only the manuals changes will trigger the CHECK_CHANGED_DATA.

Thanks

Read only

1,458

True, only manual changes will trigger the event (makes sense). The changes made by the program should be okay, no need to be checked again. Else there would be errors in the program. Why do you want that the event is triggert?

Read only

0 Likes
1,458

Uwe, I am updating the internal table of ALV. I have to make the update of DB manual. But how can I distinguish the manual changes from the programmatiacally changes? If the user change the field1 and the program the field2 with the SAVE the CHECK_CHANGED_DATA will save the Field1. How can I check which fields are manually?

Read only

0 Likes
1,458

I don't realy understand your problem. In check_changed_data event you check, whether the user has entered valid data. If the program has entered data, you don't have to check this data because this should already be valid.

If you simply want to know, if the program or the user has changed/entered data in the internal table, you may copy the table before you show the ALV and on "save" you can compare the current data with the original content.