Supply Chain Management Blogs by Members
Learn about SAP SCM software from firsthand experiences of community members. Share your own post and join the conversation about supply chain management.
cancel
Showing results for 
Search instead for 
Did you mean: 
AmanVarshney
Product and Topic Expert
Product and Topic Expert

Hello Community & Experts,


Hope you all are keeping safe and healthy.


After almost a year of delay, I 'am happy this happens and I am posting this knowledge.


I had a chance to explore the API's exposed my SAP's API Business Hub for Data integration with external systems for SAP Integrated Business Planning for Supply Chain. As SAP has reserved the frequently used SAP_COM_0143 for SAP Analytics Cloud


I explored Export and Import of Master Data (MD) and Key figures (KF) data via exposed OData API. But there had been this delta extraction part which excited me to write this blog as I didn't find much content on it online. It will be not wrong to mention that the Delta functionality still needs more exploration and will be very useful in upcoming days for direct IBP keyfigure delta data extraction, which seems a tough design currently via SAP Cloud Integration for Data Services (Hereafter SAP CI-DS).


As first steps, (common for exposing entire OData Service for MD and KF)




  • Planning Data Integration: SAP_COM_0720 needs to be enabled in SAP IBP Communication Management -> Communication Arrangements . Entire detailed steps can be found here

  • The authentication modes possible currently is Basic and SSL Certificate based.

    • Tip :The Business User configured should have access to the tables. It will the user who will be displayed as triggering the Data Integration Jobs during Data Import in IBP Inbound flows





SAP IBP Communication Arrangement




  • In SAP IBP -> Global Configuration, Perform the below configuration:

    • To add planning areas for the /IBP/PLANNING_DATA_API_SRV service, select FLEXQUERY -> PLANNINGAREA.

    • To define master data types for the /IBP/MASTER_DATA_API_SRV service, select FLEXQUERY -> RELEVANT_MDT_FOR_MD_API.

    • Tip: It is possible to use wildcard character '*' to allow the entire set. For eg: if MD tables are named as Dummy_LOC, Dummy_PRD etc. then just mentioning Dummy* will expose the entire MD table set. Multiple MD sets can be mentioned the same way seperated by ',





SAP IBP Global Configuration


 

  • There are certain default configurations for Delta extraction in Global Configurations which can be changed as per the need.

    • The maximum number of delta query definitions is limited by global configuration parameter KF_DELTA_MAX_QUERY_NR. By default, this parameter is set to 10.

    • The select section must contain at least one key figure. The maximum number of key figures is limited by global configuration parameter KF_DELTA_MAX_SELECT_KF. By default, this parameter is set to 10.

    • The maximum number of time buckets is limited by global configuration parameter KF_DELTA_MAX_TIME_BUCKETS. By default, this parameter is set to 36




 

Now if all the above done correctly. You should be able to consume the Delta OData Services

The operations exposed for Delta are below


Key Figure Delta Operations


 

Its also Important to understand the Delta Query Definition (DQD) various Status cycle. The descriptive info is available here

I have prepared a simple flow to understand it easily

As a thumb rule just follow the below points to understand the flow better

  • Initial is the initial state after DQD creation or reset and

  • executeKeyFigureDeltaLoad will execute the DQD and set the status to Extractable in case of success or Error in case of failure or Processing during execution

  • executeKeyFigureDeltaLoad can be executed only if the status is Initial or Cancelled or Confirmed

  • executeKeyFigureDeltaLoad will store all the delta data available till the point of execution and make available for extraction until Confirmed or Cancelled or Reset.

  • After Extractable status Delta data can be extracted in the same pattern as for normal KF with an additional parameter P_DeltaQueryID with $select

  • resetKeyFigureDeltaLoad can be triggered from any state and resets all the delta snapshots to initial date, hence after this there is Initial Load execution



KF Delta Status Flow


Enough of Knowledge sharing, Lets get our Hands dirty 😀

  • KeyFigureDeltaDefinitionSet



    • Fetch all the existing DQDs





Fetch All DQDs


 



    • Create new


      • DeltaQueryID should be unique or empty to get back a unique system generated value


      • _TSTAMP should be suffixed to time period entity.







Create DQD


 



    • Fetch selected DQD



      • DeltaQueryID is required









Fetch Selected DQD


 



    • Delete slected DQD



      • DeltaQueryID is required









Delete Selected DQD


 

  • Status Polling

    • DeltaQueryID is required





Status Polling for Selected DQD


 

  •  Import Delta data to KF

    • More details on parameters can be found here





Import KF Data




  •  Execute

    • DeltaQueryID is required





Status Processing



Status Extractable




  • Extract Data from Last run DQD

    • DeltaQueryID is required

    • More details on parameters can be found here





Extract KF Delta through selected DQD


 

  • Confirm Last DQD Execution

    • DeltaQueryID is required





Confirm Last DQD Execution


 

  • Cancel Last DQD Execution

    • DeltaQueryID is required





Cancel Last DQD Execution


 

  • Reset DQD to Initial Load

    • DeltaQueryID is required





Reset Entire Delta for selected DQD


 

That's it! Enough! 😅

However life is not easier yet!

As verified via OSS ticket this Delta APIs is not enabled on OData import in SAP Cloud Integration and SAP Cloud Integration for Data Services to be easily orchestrated. Hence an improvement request has been raised to include it. However there is a hack to call these API's via HTTP, but that's a workaround and a different story 😅.

Please show your support by voting for https://influence.sap.com/sap/ino/#idea/280968

Thanks and Please feel free to motivate by Liking and sharing this blog!

 

Best Regards,

Aman Varshney
Labels in this area