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: 

Correct way to implement error handling in BAdi

0 Kudos

Hello, ABAP experts. I have a basic doubt.

In implementing a BAdi method /SCWM/EX_PS_CORE_VALIDATE to ensure that a particular field is maintained for all levels in a packspec, the error handling for an empty field is done by filling the message text and subsequently using the RAISE error statement. Due to this, once the error is raised, it becomes impossible to navigate anywhere on the screen (eg. in switching tabs) as the error message prevents any further action.
What would be the proper way to validate this? Navigating between different tabs on the screen should remain possible even after the error message is displayed. What is the best way to do this?

1 REPLY 1

nabheetscn
Active Contributor
0 Kudos

Awantee the possible root cause for this can be as follow.

  • Either you are not raising the exception the right way which means check does the method has any option of passing back the exception details, if yes use that rather than using your own.
  • Secondly if the method does not have the options then you are coding at wrong place, find some other place.

What exactly you are trying to achieve.

Nabheet