2008 Feb 19 7:53 PM
hi,
i have one scenario, in that i am calling a BAPI, in turn a BADI is getting trigerred inside the BAPI and it is throwing the "Error Message" ..
My requirement is i need to capture that error message from the BAPI into an internal table/work area without displaying the error message
hi,
i have one scenario, in that i am calling a BAPI, in turn a BADI is getting trigerred inside the BAPI and it is throwing the "Error Message" ..
My requirement is i need to capture that error message from the BAPI into an internal table/work area without displaying the error message
2008 Feb 19 8:29 PM
When u call a BAPI there will be Return structure. u need to pass the internal table to that function module. when the function module is executed the internal table is filled with the messages. u can loop at that internal table where message type is 'E' and process the message.
Check this :
DATA:IT_PERSONALDATA LIKE STANDARD TABLE OF BAPIKNA101_1 WITH HEADER LINE,
IT_COPYREFERENCE LIKE STANDARD TABLE OF BAPIKNA102 WITH HEADER LINE,
RETURN LIKE STANDARD TABLE OF BAPIRETURN1 WITH HEADER LINE.
CALL FUNCTION 'BAPI_CUSTOMER_CREATEFROMDATA1'
EXPORTING
PI_PERSONALDATA = IT_PERSONALDATA
PI_OPT_PERSONALDATA = PI_OPT_PERSONALDATA
PI_COMPANYDATA = PI_COMPANYDATA
PI_OPT_COMPANYDATA = PI_OPT_COMPANYDATA
PI_CONSUMEREN = PI_CONSUMEREN
PI_COPYREFERENCE = IT_COPYREFERENCE
PI_CREDIT_CONTROL_FLAG = PI_CREDIT_CONTROL_FLAG
IMPORTING
CUSTOMERNO = V_CUSTOMERNO
RETURN = RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
APPEND RETURN.
LOOP AT RETURN.
WRITE:/ RETURN-TYPE, RETURN-MESSAGE.
ENDLOOP.
Regards,
Swathi
2008 Feb 19 8:46 PM
I don't think I understand your requirement.
If an error is ocurring how are you going to handle it then?
If the Badi is throwing the error message just edit it and get the message there, but again it must be there for a reason
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |