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

Revert changes in editable ALV

Former Member
0 Likes
2,219

Dear experts,

I'm using the OO ALV with some editable columns. However, I want to perform some validation on the values user enters. So, if certain conditions are not met, a message should appear and not the user-entered should be displayed in the ALV, but the value, which was in its place before. I'm catching the event data_changed and perform my validation in the corresponding class method. So far have not been able to make the system not accept the user-entered value. It gets always displayed no matter what I do.

Any suggestions?

Thanks in advance for your help!

Best regards,

Alexander.

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
1,433

I'd prefer that you tell us exactly what you tried with method names, because I guess you wouldn't like my answer: "you should add an error message to the log, and change the value of the cell". Right? So, use methods ADD_PROTOCOL_ENTRY and MODIFY_CELL of parameter ER_DATA_CHANGED of event DATA_CHANGED.

Dear experts,

I'm using the OO ALV with some editable columns. However, I want to perform some validation on the values user enters. So, if certain conditions are not met, a message should appear and not the user-entered should be displayed in the ALV, but the value, which was in its place before. I'm catching the event data_changed and perform my validation in the corresponding class method. So far have not been able to make the system not accept the user-entered value. It gets always displayed no matter what I do.

Any suggestions?

Thanks in advance for your help!

Best regards,

Alexander.

4 REPLIES 4
Read only

Former Member
0 Likes
1,433

Sorry, a typo (2nd sentence): I do want to perform validation...

Read only

Sandra_Rossi
Active Contributor
1,434

I'd prefer that you tell us exactly what you tried with method names, because I guess you wouldn't like my answer: "you should add an error message to the log, and change the value of the cell". Right? So, use methods ADD_PROTOCOL_ENTRY and MODIFY_CELL of parameter ER_DATA_CHANGED of event DATA_CHANGED.

Read only

matt
Active Contributor
0 Likes
1,433

Fixed it for you.

Read only

Former Member
0 Likes
1,433

Thank you, Sandra! It helped!