2010 Mar 30 6:13 PM
Hi,
The issue is, I am validating some data based on standard transaction SAVE button, in case of in-valid, i'm displaying the error message. Now after the error message the screen got locked, even if I press 'enter' or any user action..screen got locked. In my validation i have written the logic for sy-ucomm = 'SAVE'. But the issue is, after displaying the error message, in the next user action..sy-ucomm would not changed, i think becuase of PBO is not getting called. When i hit enter second time, then it works fine. Is there any way to check in the validation that PBO is called or not, so I can skip the error message in case when sy-ucomm = save and screen has not completed the PBO cycle.
(I am also trying to write the code at some other appropriate place, but could not find the place and it's a standard SAP code)
Thanks,
2010 Mar 30 6:25 PM
Do your validation in the PAI, not the PBO; otherwise, you'll end up saving the data and then trying to issue an error message.
Rob
2010 Mar 30 6:25 PM
Do your validation in the PAI, not the PBO; otherwise, you'll end up saving the data and then trying to issue an error message.
Rob
2010 Mar 30 6:55 PM
My code is in PAI module. But when error message is displayed, then after the first user action, SY-UCOMM would not changed and hence my logic is not working properly. As i said earlier, after the 2nd user acation e.g if I hit 'ENTER' two times, then its' fine. So in the 2nd 'enter', sy-ucomm is getting changed. Any suggestion?
2010 Mar 30 7:26 PM
Hi,
What you can do is Display your message in the format below and then exit.This will not lock your screen.
MESSAGE 'No Records Found' TYPE 'S' DISPLAY LIKE 'E'.
EXIT.
2010 Mar 30 8:28 PM
Solved at my own. Added another attribute in the condition which is sy-dynnr.