2008 May 07 6:01 AM
i have a BADI which is triggered from a BAPI.This BADI method has only importing and changing parameters.How can i send error message to BAPI.Please reply at the earliest.
High points can be expected.
i have a BADI which is triggered from a BAPI.This BADI method has only importing and changing parameters.How can i send error message to BAPI.Please reply at the earliest.
High points can be expected.
2008 May 07 6:55 AM
Hi Arshi,
look up "Exception Handling". You can start with http://help.sap.com/saphelp_nw70/helpdata/EN/cf/f2bbc8142c11d3b93a0000e8353423/frameset.htm
There are also several blogs that demonstrate exception handling as well.
Cheers
Graham Robbo
2009 Apr 29 9:24 AM
2009 Apr 29 11:21 AM
Hello Arshi
The answers could be more specific if you were more verbose:
Which BAPI and Which BAdI?
I assume both are standard (not custom objects). I would not expect that BAdI methods have exceptions (either standard or class-based). If so then you can use the normal mechnisms to raise such an exception:
MESSAGE ...
RAISING <name of exception>. " classic
RAISE EXCEPTION TYPE <name of exception class>
...
More likely the method may have a (CHANGING) parameter like CH_FAILED (see BAdI ME_PROCESS_PO_CUST: interface IF_EX_ME_PROCESS_PO_CUST, method CHECK):
CH_FAILED = 'X'. " error in BAdI method
Regards
Uwe