SAP Knowledge Base Article - Public

2817033 - How to use Odata Service to Update Employee Responsible Party in Purchase Order

Symptom

You are unable to update the Employee Responsible Party in Purchase Order using Odata Service.

Environment

SAP Business ByDesign

Reproducing the Issue

  1. Go to Application and User Management workcenter.
  2. Select Odata Service Explorer.
  3. Select your Custom Odata Service and open Odata Console.
  4. Fetch the required Purchase Order:

        https://myXXXXXX.sapbydesign.com/sap/byd/odata/cust/v1/CustomOdataService/PurchaseOrderCollection('PurchaseOrderUUID')

       (where XXXXXX is the Tenant ID)

   5.  To update the Party ID, use PATCH Method with below code:

       {
          "PurchaseOrderEmployeeResponsibleParty":
         {
           "PartyID":"YYYY"
          }
       }

       (where YYYY is the new PartyID)

 

The required PartyID does not change.

 

Cause

The Navigation URL used in this case is incorrect and hence, it was unable to update the PartyID.

Resolution

Follow the below instructions to fetch the Purchase Order Employee Responsible Party:

  1. Use below URL to fetch the ObjectID of the Node PurchaseOrderEmployeeResponsibleParty:

        https://myxxxxxx.sapbydesign.com/sap/byd/odata/cust/v1/CustomOdataServcie/PurchaseOrderCollection('ObjectID')/PurchaseOrderEmployeeResponsibleParty

       Take the ObjectID for PurchaseOrderEmployeeResponsiblePartyCollection

   2.  To update the PartyID, use below URL with above ObjectID :

        https://myxxxxxx.sapbydesign.com/sap/byd/odata/cust/v1/CustomOdataServcie/ PurchaseOrderEmployeeResponsiblePartyCollection(‘ObjectID’)

       Use the PATCH Method with given code

        {
           "PartyID":"YYYY"
        }

Keywords

PurchaseOrderEmployeeResponsibleParty, Odata Service, PurchaseOrderEmployeeResponsiblePartyCollection, Purachse Order , KBA , employee responsible party in purchase , employee responsible party , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Business ByDesign all versions ; SAP Cloud for Customer core applications all versions