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: 

To exit from BAPI when a standard error encounters

0 Kudos

Hi,

     I am creating a BAPI function module where a number of standard errors are encountered. If the input parameter is missing then a standard error is thrown and moreover the BAPI should stop and it should exit from the BAPI.

So plz can u help me how to exit from the BAPI instantly. I cannot use the statement 'EXIT' as it may get dump during production.

Thanks

PP

1 ACCEPTED SOLUTION

philipdavy
Contributor
0 Kudos

Regards,

Philip.

6 REPLIES 6

philipdavy
Contributor
0 Kudos

Regards,

Philip.

0 Kudos

Hi

   Thanks for the reply..

I have used return parameter. Moreover I need to exit from the BAPI at the same time.

So how to exit from it is my question.

0 Kudos

just put 'RETURN.' or 'EXIT.' statment after filling up return parameter to stop processing furthur & exit.

0 Kudos

Thanks Raj for the help

Regards

PP

paul_bakker2
Active Contributor
0 Kudos

Hi,

The 'EXIT' command does not cause a dump - it will just exit your function module cleanly.

By the way - just to be clear  - you are not building a 'BAPI' (a SAP-standard API module with a published interface), you are building a custom function module.

Unless you're a developer working at SAP?

cheers

Paul

0 Kudos

Thanks Paul...

The information is very helpful for me.

Thanks

PP