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: 

PBO issue

Former Member
0 Kudos
265

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,

1 ACCEPTED SOLUTION

Former Member
0 Kudos
113

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

4 REPLIES 4

Former Member
0 Kudos
114

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

0 Kudos
113

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?

0 Kudos
113

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.

0 Kudos
113

Solved at my own. Added another attribute in the condition which is sy-dynnr.