cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase Order V4 POST Operation giving error whereas for the same payload PO V2 API works fine.

Sijin_Chandran
Active Contributor
0 Kudos

Hi Gurus,

I need to POST Purchase Orders into S4 system and for that am making use of SAP shipped Purchase Order OData APIs. V2 version(which is now deprecated) works fine and generates a PO but for the payload created using the same data V4 is not working and giving error. Below are the details:

V2 Version uri: /sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder

V4 Version uri: /sap/opu/odata4/sap/api_purchaseorder_2/srvd_a2x/sap/purchaseorder/0001/PurchaseOrder

Error details for V4:

{
  "error" : {
    "code" : "ME/816",
    "message" : "System error (error in method po_post)",
    "@SAP__common.ExceptionCategory" : "Provider_Application_Error",
    "details" : [
      {
        "code" : "CX_SY_MESSAGE_IN_PLUGIN_MODE",
        "message" : "Message A ME 816 cannot be processed in plugin mode HTTPS",
        "@SAP__common.Severity" : "error",
        "@SAP__common.numericSeverity" : 4
      }
    ],

Error source details: Class~Method CL_PO_HEADER_HANDLE_MM~PO_POST.

Inside the above Method there is a call made to below FM:

'MEPO_DOC_POST'

which is not generating a PO.

Note: I have constructed the Payload using a valid existing PO only and by running $expand operations. So, I am ruling out the error cause due to invalid format for any of the data fields and as mentioned earlier V2 works fine for the payload created in same manner considering that reference PO.

Helpful pointers much appreciated.

Thanks,

Sijin

Sijin_Chandran
Active Contributor
0 Kudos

We were in a situation that we couldn't go with V4 version of PurchaseOrder because of the above reasons and either with the V2 version since we needed to pass 'Delivery Address' details against each PO Lineitem and this option was not available with the V2 option but must it was available there in V4 (EntitySet : PurOrderItemDeliveryAddress). Definitely V4 version of API for this most wanted Transaction i.e. PurchaseOrder needs attention. We are in OP 2022 and Note# 3357085 says it's 'Not Released' and the same time V2 is deprecated.

So, as a final resort we have planned to go with creating a Wrapper RAP REST API on top of our old stable BAPI 'BAPI_PO_CREATE1'.

Thanks,

Sijin

Accepted Solutions (0)

Answers (0)