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: 

How to Highlight Invalid Entry in OO Editable ALV Grid?

0 Kudos

In an Editable ALV Grid, if an invalid entry is entered, the ALV grid highlights the field, shows the error in status bar and does not allow the user to proceed without fixing the invalid entry and error.

How can I achieve this behavior. I have raised error in PAI Module of the screen but highlighting and blocking user to perform operation does not work.

Thanks in advance for the assistance.

Attached screenshot for reference of a working example below.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

Are you aware that

  • Your sample is a good old table control and not an ALV.
  • With ALV you better think OO and event handling, not in term of PAI

Else use search tool, there are already some samples/guides in the wiki section of the forum (click here) on how to handle errors in editable ALV, there is also documentation in online help (click here)

5 REPLIES 5

roberto_forti
Contributor
0 Kudos

Hi,

By Debug... Following excellent example from SAP community to achieve/debug that scenario.

Regards,

DoanManhQuynh
Active Contributor

You have to handle DATA_CHANGED event, after checking the field you want, this event have ER_DATA_CHANGED parameter (data type =

CL_ALV_CHANGED_DATA_PROTOCOL) with method ADD_PROTOCOL_ENTRY where you can add message and hightlight cell. I think there are some sample around, you can try it.

raymond_giuseppi
Active Contributor

Are you aware that

  • Your sample is a good old table control and not an ALV.
  • With ALV you better think OO and event handling, not in term of PAI

Else use search tool, there are already some samples/guides in the wiki section of the forum (click here) on how to handle errors in editable ALV, there is also documentation in online help (click here)

0 Kudos

Dear Raymond,

I am aware that it is ALV Grid because internally in the processing ALV related methods are invoked.