2009 Nov 07 12:03 PM
Dear Gurus,
Is there any specific way to handle exceptions in BAPI? I mean the way one handles exception in FM...can tat be applicable to BAPI or is there something specific.
Regards,
Shiku
Dear Gurus,
Is there any specific way to handle exceptions in BAPI? I mean the way one handles exception in FM...can tat be applicable to BAPI or is there something specific.
Regards,
Shiku
2009 Nov 07 1:41 PM
Hi shiku,
As far as i know BAPI's are Remote Enabled Function Modules, so exception's must not be used in BAPI.
In BAPI the errors are stored in a return table.
Go through these links
<linkfarm_removed_by_moderator>
Edited by: Julius Bussche on Nov 8, 2009 5:05 PM
2009 Nov 07 3:06 PM
Hi shiku,
most of the links will not bear a clear answer.
Because BAPIs can be called from external systems and there is no common interface defibing exceptions, a BAPI should never end in an exception.
BAPIs have a RETURN parameter which is in most cases an internal table of structure BAPIRET2. This will store all messages issued by the business process. Messages with message types E, A or X replace the exception and must be handled by calling system accordingly.
Some BAPIs return a RETURN structure only, this ha just one message.
Regards,
Clemens
2009 Nov 07 6:51 PM
Hi Shiku,
<< Please respect the 2,500 character limit for posts. You could ahve just posted the link >>
I searched for this info for you shiku from here.
http://help.sap.com/saphelp_46C/helpdata/EN/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm
Hope you found the info helpful.
Regards,
SuryaD.
Edited by: Rob Burbank on Nov 7, 2009 1:54 PM
2009 Nov 07 6:56 PM
<< Cut and paste without attribution from http://help.sap.com/saphelp_46C/helpdata/EN/a5/3ec9f74ac011d1894e0000e829fbbd/frameset.htm removed >>
Regards,
SuryaD
Edited by: Rob Burbank on Nov 7, 2009 1:58 PM
2009 Nov 07 6:57 PM
The export parameter Return can be implemented as follows:
As a structure, whereby it must be defined in the function module as an export parameter, as well as in the method in the BOR.
As a table, whereby it must be defined in the function module as a table parameter, as well as in the method in the BOR as an export parameter.
Before filling the Return parameter you should either initialize the structure with CLEAR or the table with REFRESH and CLEAR.
If the return parameter is not set or is set to an initial value this means that no error has occurred.
The Return parameter may be based on the following reference structures:
BAPIRET2
You must use this reference structure when developing new BAPIS.
BAPIRET1, BAPIRETURN
These reference structures are still partly used in old BAPIs.
Both structures must be filled in the logon language.
Regards,
SuryaD.
Found this info for you shiku at http://help.sap.com/saphelp_46C/helpdata/EN/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm.
Hope this was helpful.
2009 Nov 07 6:59 PM
Hi Rob,
Am sorry about pasting it here.
did so because most of the users do not follow the link.
They feel it is misleading and do not contain a direct answer.
So...thought that putting it all here will be helpful.
Regards,
SuryaD.
2009 Nov 08 4:03 PM
> did so because most of the users do not follow the link.
> They feel it is misleading and do not contain a direct answer.
> So...thought that putting it all here will be helpful.
Neither are helpfull if the person could have searched themselves...
You have copy&pasted again today. This is your final warning.
Only answer if you know the answer and the person asking the question has put in some effort!
Cheers,
Julius
2009 Nov 08 9:36 AM
Hi Shiku,
I hope the info posted by me above has helped you.
If yes, please mark answered and close the thread .
Regards,
SuryaD.
Edited by: SuryaD on Nov 8, 2009 3:22 PM
2009 Nov 09 10:39 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |