NTT DATA Business Solutions
NTT DATA Business Solutions | March 22, 2022

Plan Data Retraction from BPC (on BW/4HANA) to S/4HANA

 

Author – Rajat Agrawal, Analytics Team Lead, NTT DATA Business Solutions UK&I

It’s a common requirement for SAP customers to retract their plan data from planning applications such as SAP Business Planning and Consolidation (BPC) back into the underlying SAP operational systems (i.e. S/4HANA), to allow Plan/Actual comparisons directly in their core operational system.

With older versions of BPC and ECC, such retraction used to be implemented via a Retraction BAdI – calling a BAPI to insert the plan data into the corresponding ECC tables. Now, with the new S/4HANA planning environment (SAP BPC optimised for S/4HANA) and its rich set of standard SAP planning functions, plan data can be retracted directly into S/4HANA from BPC on BW/4HANA virtually, without staging the data anywhere or writing any BAdI.

This how-to blog details the steps to retract the plan data from latest version of standalone SAP BPC (version 11.1 on BW/4HANA 2.0) system into S/4HANA.

Background Information

SAP standard business content in S/4HANA embedded BW system delivers two main MultiProviders:

1. /ERP/SFIN_M09 – S/4HANA Financials: Plan Data Transfer Between BPC and ERP
2. /ERP/SFIN_M01 – S/4HANA Financials: Plan and Actual Data

These MultiProviders consist the following InfoCubes:

• Real time InfoCube – /ERP/SFIN_R01 (S/4HANA Financials: InfoCube for Plan Data) and,
• Virtual InfoCubes –

o /ERP/SFIN_V20 – S/4HANA Financials: Plan Data from ACDOCP
o /ERP/COOM_V03 – Projects: Activity Input and Secondary Order Costs Planning
o /ERP/COOM_V07 – Orders: Cost Element Planning
o /ERP/COOM_V04 – Cost Center: Cost Element Planning
o /ERP/COOM_V06 – Cost Center: Activity Type Price Planning

SAP delivers standard planning content (Aggregation Levels, Planning Functions etc.) in S/4HANA’s embedded BW, based on the above InfoProviders.  The standard planning functions are supposed to be used by standard planning layouts for users to plan data which then saved back to S/4HANA underlying tables.

The customers can use these SAP delivered planning objects to create further custom objects based on their requirement to retract plan data from standalone BPC to S/4HANA system.

The following sections of this blog will cover below two scenarios/use cases in detail:

1. Retraction of Financial planning data from standalone BPC to the ACDOCP table in S/4HANA
2. Retraction of Project planning data from standalone BPC to the tables behind transaction CJR2 in S/4HANA.

Scenario 1: Retraction of FI plan data from standalone BPC to ACDOCP table in S/4HANA

Figure 1 (below) shows the technical architecture of FI plan data retraction.

In order to prepare the dataset for retraction, a CDS view is created on top of the Active table of the BPC ADSO that holds FI Plan data in BW/4HANA system. This CDS view can also be used to filter, cleanse, aggregate or join with other datasets (e.g. Master Data attributes).

Then, in S/4HANA’s embedded BW system, create a transactional DataSource under ODP – ABAP CDS Views (ODP_CDS) on the CDS view in the BW/4HANA system to make the data accessible in S/4HANA from the BW/4HANA system. Select the CDS view while creating the DataSource and Preview the data to check if data it can be viewed successfully.

This DataSource is then connected to a custom virtual InfoCube (e.g. ZBPC_V01) based on a DTP for direct access (via transformation) and added to the custom MutiProvider (e.g. ZBPC_M01) which also includes SAP delivered InfoCube /ERP/SFIN_V20. As shown in Figure 1 above, this is not a standard InfoCube, but a VirtualProvider which is based on the SAP HANA model sap.erp.sfin.co.pl/ FCO_C_IBP_ACDOCP. The ABAP program served for writing data into the table ACDOCP is CL_FINS_ACDOCP_IPROV_WRITABLE. The standard source code can be checked under the following class method:

CL_FINS_ACDOCP_IPROV_WRITABLE =>IF_RSDRV_RPROV_WRITABLE~WRITE_DATA

Make sure the structure of custom InfoCube (e.g. ZBPC_V01) should be similar to the structure of delivered InfoCube /ERP/SFIN_V20. Remove the InfoObjects which are not required from ZBPC_V01.

Finally, create the following planning objects:

  • Aggregation Level
  • Filter – Restrict the InfoProvider with /ERP/SFIN_V20.

o Use at least one selection variable in the filter which can be filled via variant in the process chain. Variable for Fiscal Year Variant (0PERIV) is used in this example.

  • Planning Functions

o If you want to delete the data from ACDOCP for the same category which you are retracting from BPC, create a standard ‘Delete’ function to delete the data from ACDOCP. The Category selection can be derived from the custom variable (Query Replacement Path) on InfoObject /ERP/CATEGORY. The BW query (used in Replacement Path variable) will be created on the InfoCube (e.g. ZBPC_V01) to get the category value.

o Standard ‘Copy’ function from InfoProvider ZBPC_V01 to /ERP/SFIN_V20

 

  • Planning Sequence

o Add the planning functions Delete and Copy in sequence.
o Create and save a variant for Fiscal Year Variant variable (to be used in Process Chain)

Scenario 2: Retraction of Project plan data from standalone BPC to the tables behind transaction CJR2 in S/4HANA

Figure 2 below shows the technical architecture of Project plan data retraction.

This process is very similar to the retraction of FI data to ACDOCP. The CDS view in BW/4HANA, ODP – ABAP CDS View DataSource (ZIBPC_PS), custom InfoCube (ZBPC_V02) and MultiProvider (ZBPC_M02) in S/4HANA (embedded BW) system will be created in a similar fashion.

The MultiProvider will contain a custom Cube (ZBPC_V02) and the standard SAP delivered InfoCube /ERP/COOM_V03 (Projects: Activity Input and Secondary Order Costs Planning). This is a VirtualProvider, based on the Function Module/Class – CL_FCOM_IP_IPROV_WRITABLE. The standard source code can be checked under the following class method: CL_FCOM_IP_IPROV_WRITABLE =>IF_RSDRV_RPROV_WRITABLE~WRITE_DATA.

Planning objects created for Project plan data retraction are

  • Aggregation Level
  • Filter – Create a filter on time characteristics (e.g. Fiscal year) for the selected time period you are retracting from BPC. The Fiscal Year (0FISCYEAR) selection can be derived from the custom variable (Query Replacement Path) on InfoObject 0FISCYEAR. The BW query (used in Replacement Path variable) will be created on the InfoCube (e.g. ZBPC_V02) to get the fiscal year value.

o Use at least one selection variable in the filter which can be filled via a variant in the process chain. Variable for Fiscal Year Variant (0PERIV) is used in this example.

  • Planning Functions

o Create a FOX formula function to copy data from ZBPC_V02 to /ERP/COOM_V03

  • Planning Sequence

o Add the planning function Copy in sequence.

Create and save a variant for Fiscal Year Variant variable (to be used in Process Chain)

Automation of the Retraction Process

The whole retraction process can be automated via creating the process chain in BW/4HANA system which will execute an ABAP program to call a remote enabled function module in S/4HANA. This function module in S/4HANA triggers the event, which in turn triggers the Process chain in embedded BW in S/4HANA to copy BPC data to ACDOCP table.

The detailed steps are mentioned below – please refer to SAP Note 135637 for further information.

1. Create an EVENT in S/4HANA system using SM64.
2. Create a Function Module (FM) in S/4HANA (set “REMOTE-ENABLED MODULE” in attributes tab).
3. In the source code of FM, call another FM ‘BP_EVENT_RAISE’ to trigger the event created in step 1.
4. Set the start process of S/4HANA BW Process Chain to execute after event option and use the EVENT created in step 1.
5. In BW/4HANA system, create a program in SE38.
6. In this program, call the remote enabled function module created in step 2.

Below are the process chains in both systems. The retraction process is triggered in the BW/4HANA system on demand via process chain. If you wish, you can also add email notification setting in the process chain to allow system to send success/failure of retraction process to users.

Important Notes

Here is a list of the most important notes concerning BPC optimised for S/4HANA.

If you would like to discuss any of the areas covered in this blog please contact us