on 07-24-2014 10:00 AM
Dear All Gurus,
I have created a Gateway Service (For a Custom App) to create Purchase Order (ERP) Using BOR object "PurchaseOrder.CreateFromData1".
When I execute the program in GW Client , Im getting below output (please find attached txt document for the full output). I understand that this is ann error throwing from BAPI and I guess this is from the BAPI Return structure and feel like the complete message is not showing but only the 1st line of Return message. Due to this I am not able to identify what data is missing and where is the cause of this error ...
Plz advice how to get the full message
Message Output
........
<code>SY/530</code>
<message xml:lang="en">No instance of object type PurchaseOrder has been created. External reference:</message>
- <innererror>
<transactionid>CC0413E45C29F16BB68C0050569C4F03</transactionid>
<timestamp />
- <Error_Resolution>
<SAP_Transaction />
<SAP_Note />
</Error_Resolution>
- <errordetails>
- <errordetail>
<code>BAPI/001</code>
<message>No instance of object type PurchaseOrder has been created. External reference:</message>
<propertyref />
<severity>error</severity>
</errordetail>
Hello T Fdo,
There are more than one message your BAPI is throwing, the o data response is showing only
one message.
You can build the message object and pass that object to the exception object in the method of your DPC class.
Steps are:
1. Get the BAPI return in lt_return table of type bapiret2.
2. set the message object in the context of DPC class.
me->mo_context->get_message_container( )->add_messages_from_bapi(
EXPORTING
it_bapi_messages = lt_return " Return parameter table
).
3. Raise the exception and send the message object to exception object.
raise EXCEPTION type /IWBEP/CX_MGW_BUSI_EXCEPTION
EXPORTING
message_container = me->mo_context->get_message_container( )
.
Hope it helps.
Cheers,
Anurag.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tharu,
I would test the BAPI in SE37 with test mode or set an external breakpoint in the BAPI.
Regards, Masa
SAP Customer Experience Group - CEG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.