2009 Feb 20 6:56 AM
Hi Experts,
I would like to know how we pass error message to BAPI structurre in RFC?
Plz some one give the details about how we handle the errors.
Thanks in advance.
2009 Feb 20 7:32 AM
Like already mentioned before, every Standard SAP BAPI, has an export or tables parameter which is called something like RETURN with structure BAPIRET2. In here, you can store all the messages that are generated during the BAPI Call.
However, if you also want to catch errors like system exceptions and communication errors, you will have to add these exceptions manually:
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
However, not sure if this addition works when calling BAPI from NON-sap application.
Declaration:
DATA: RFC_MESS(128).
Hi Experts,
I would like to know how we pass error message to BAPI structurre in RFC?
Plz some one give the details about how we handle the errors.
Thanks in advance.
2009 Feb 20 6:59 AM
hi:
In RFC function module, there should have an export parameter like BAPIRETURN
which would carry the error message.
Regards
Shashi
2009 Feb 20 7:32 AM
Like already mentioned before, every Standard SAP BAPI, has an export or tables parameter which is called something like RETURN with structure BAPIRET2. In here, you can store all the messages that are generated during the BAPI Call.
However, if you also want to catch errors like system exceptions and communication errors, you will have to add these exceptions manually:
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
However, not sure if this addition works when calling BAPI from NON-sap application.
Declaration:
DATA: RFC_MESS(128).
2009 Feb 20 7:51 AM
Use table BAPIRET2 to get the error messages, when you are using BAPI as RFC you will not get return parameters. You have to call it in synchronous task and wait till the BAPI returns and catch the errors.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |