Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Full Response message even during an error structure

Hello All,

When a bapi receives a bad request it returns an error  return structure and also other response tables. When the same bapi is exposed as odata service it only returns the error message.

The is the response from BAPI exposed via PI.

<REJECTED/>

  <RETURN>

  <TYPE>E</TYPE>

  <ID>ZBAPI</ID>

  <NUMBER>016</NUMBER>

  <MESSAGE>Error message </MESSAGE>

  <LOG_NO/>

  <LOG_MSG_NO>000000</LOG_MSG_NO>

  <MESSAGE_V1/>

  <MESSAGE_V2/>

  <MESSAGE_V3/>

  <MESSAGE_V4/>

  </RETURN>

  <AWARD_DESC>

  <item>

  <SALESDOCUMENT>1234</SALESDOCUMENT>

  <ITM_NUMBER>001000</ITM_NUMBER>

  <LANGU>E</LANGU>

  <AW_DESCRIPTION>clock</AW_DESCRIPTION>

  </item>

  </AWARD_DESC>

  <AWARD_INFO>

  <item>

  <SALESDOCUMENT>1234</SALESDOCUMENT>

  <ITM_NUMBER>001000</ITM_NUMBER>

  <SHIP_DATE>0000-00-00</SHIP_DATE>

  <SCHED_DATE>2014-12-11</SCHED_DATE>

  <CARRIER/>

  <TRACKNUM/>

  <ZZMFGSTAGE/>

  <ZZSELCODE>009</ZZSELCODE>

  <AWARD_DESC>clock</AWARD_DESC>

  </item>

  </AWARD_INFO>

The same BAPI when called as an odata service

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<code>SY/530</code>

<message xml:lang="en">

Purchase order has been created, must call purchasing to change

</message>

<innererror>

<transactionid>54A769B51AE2C753E10000000A64D168</transactionid>

<timestamp>20150112231744.3776590</timestamp>

<Error_Resolution>

<SAP_Transaction>

Run transaction /IWFND/ERROR_LOG on SAP NW Gateway hub system and search for entries with the timestamp above for more details

</SAP_Transaction>

<SAP_Note>

See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)

</SAP_Note>

</Error_Resolution>

<errordetails>

<errordetail>

<code>ZBAPI/016</code>

<message>

Purchase order has been created, must call purchasing to change

</message>

<propertyref/>

<severity>error</severity>

</errordetail>

<errordetail>

<code>ZBAPI/016</code>

<message>

Purchase order has been created, must call purchasing to change

</message>

<propertyref/>

<severity>error</severity>

</errordetail>

<errordetail>

<code>/IWBEP/CX_SD_GEN_DPC_BUSINS</code>

<message>

Purchase order has been created, must call purchasing to change.

</message>

<propertyref/>

<severity>error</severity>

</errordetail>

</errordetails>

</innererror>

</error>

It skips the AWARD_DES and AWARD_INFO table.

This happens only when there is a return structure. If there is no return structure it gives a proper response. Is there a way to receive a response as the one returned via PI.

Not what you were looking for? View more on this topic or Ask a question