Supply Chain Planning and Collaboration

Get Involved. Join the Conversation.

Topic

    drathi
    Updating Planning Table (Editable Measure) using...
    Topic posted May 9, 2019 by drathi Green Ribbon: 100+ Points, tagged Demand Management Cloud, How-to, Planning Central Cloud, Sales & Operations Planning Cloud, Supply Planning Cloud, User Experience 
    94 Views, 2 Comments
    Title:
    Updating Planning Table (Editable Measure) using REST Api / SOAP UI/ CURL
    Summary:
    19A provides End Point access via Rest API to the Planning Data Tables, but what is the way to Selectively update the data (editable Measures only) in that table
    Content:

    We are able to get to a point there We can get the data out of the Planning table using Rest API Endpoints either using Curl, Oracle Apex or Browser based JSON data. 

    We are, for the last couple of months, struggling on updating the table. We have used the POST and PATCH commands with no luck.

    Does anyone have a simplistic solution they've used to update a Planning Pivot, Seeded or Custom, via Rest API / SOAP UI/ Endpoint.

    Many Thanks

    Dhiraj

    Version:
    19B
    Image:

    Comment

     

    • Kevin Elder

      Hi Dhiraj,

      I just posted a white paper related to your post. Take a look.

      https://cloudcustomerconnect.oracle.com/posts/7cdd0b3823

      https://cloudcustomerconnect.oracle.com/files/9520955857/scp_sop_REST_constrained_forecast_white_paper_may2019.pdf

      In the working example, GET is used to publish measure data from a S&OP plan at an aggregate level. The TableData output from GET is then used as the POST payload into a different measure used in a DM plan. This measure data is disaggregated naturally in the DM plan.

      Thanks,

      Kevin

    • drathi

      Thank you Kevin for the post. Based upon the post, I've changed a couple of things in our earlier attempts of doing this. However We are still running into 1 error.

      GET has always worked for us, we also generally end up getting the Table ID from back end Reporting and Analytics Query, but your method is better.

      However, is there any definite format that the POST data need to be in, is there any encryption requirements on that Payload which you mentioned ? For now I have tried SOAP UI and simple curl command in these ways, but I am getting data and writing it from the same table in DM. Is it quintessential that we use different tables, or is it Okay to use the same table, as long as the measure is editable.

      1. GET - curl -u USER:PASSWORD "https://xxxx-xxxxxxx.oraclecloud.com/fscmRestApi/resources/11.13.18.05/supplyChainPlans/300000003053528/child/PlanningTables/300000003100511/child/Data?onlyData=true" >> C:\users\admin\Data.txt
        1. The files comes back just like your white paper - we have been doing that for the last 3-4 months, but we cannot post back.
      2. curl -X POST -u USER:PASSWORD -H 'Content-Type:application/json' "https://xxxx-xxxxxxxx.oraclecloud.com/fscmRestApi/resources/11.13.18.05/supplyChainPlans/300000003053528/child/PlanningTables/300000003100511/child/Data" >> -d C:\Users\admin\Data_new.txt
      3. We used to keep all the extra tags like opening part {"items":..........and end part  Message:null ....https://xxxxx.oraclecloud.com......../child/data,name: ......etc}
        1. With this We were getting bad URL error.
        2. After seeing your white paper - we have taken out all those extra tags on the top and bottom of the file.
          1. Now we have removed that extra Items piece on opening.
          2. Removed the extra tags at the bottom and my file has only this: {"TableHierarchies" : " Product Planning Family,Gregorian Calendar,IC_ORG_01",
                "TableDataHeader" : "Category Level 42006,Month,Organization,DLM Forecast Override",
                "TableData" : "48-TRBCONE,2020-05-01,POC:15,0\r\n48-TRBCONE,2020-05-01,POC:35,31.67\r\n....etc'}
          3. The file goes through and come back with the following.

      What Are we missing.

       <HTML><HEAD>
      <TITLE>Bad Request</TITLE>
      </HEAD><BODY>
      <H1>Bad Request</H1>
      Your browser sent a request that this server could not understand.<P>
      Reference&#32;&#35;7&#46;4ecadf17&#46;1557429415&#46;29b5d0e0
      </BODY>
      </HTML>