cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent exiting from the transaction after throwing error message in User-Exit

former_member185116
Active Participant
0 Kudos

Hello all,

i have wriiten a code in user exit EXIT_SAPLBSVA_001 , for Tcode CJ20N , to throw error if sort field is not filled for material component..

my question is after throwing error if i click on any place on screen, a pop up window with the error message and EXIT button is appearing , eventually leading to exiting the transaction abruptly..

my requirement is to staty on the transaction after error message..

error message as show in the above image..

when i clicked on the corresponding material component to enetr data in sort field , below window is appearing..

this eventually forcing me to exit the transaction...

please guide me on how to stay on the transaction screen with editable fields..

thank you all...

Sandra_Rossi
Active Contributor

Technically speaking, this happens because it triggers outside the PAI of the screen. If you want to interrupt the processing, you must trigger the error message during the PAI. If you don't find a user exit, use the Enhancement Framework.

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor

This exit is not suitable for your check, only intended to format status long texts, doesn't handle the error message... (There is also a typo in error message)

raymond_giuseppi
Active Contributor
0 Kudos

If you look for a check on RESB during PS transactions, you could look at CNEX* enhancements such as CNEX0037 / EXIT_SAPLCOMK_011 'Check a Newly Assigned Component' and CNEX0038 / EXIT_SAPLCOMK_012 'Check a changed component'

former_member185116
Active Participant
0 Kudos

Hi raymond.giuseppi

,thanks for your reply,yes i used a BADI (WORKORDER_UPDATE) its working fine now..

Answers (0)