How to populate value into SAP Table ACDOCP
You may already know the Universal Journal Entry table ACDOCA, besides that, we have two other tables ACDOCC ACDOCP（A –> Actual, P -> Planning, C -> Consolidation）. In this blog, I would want to introduce How to populate value into SAP Table ACDOCP.
So, let’s firstly check the table definition in HANA studio, you can either check the definition directly in graphic mode or export it to SQL statement. Basically, this table have not been final shaped, since more and more integrated planning functionality is under R&D currently. I just used it as an example for demostraction. From the figure below, you will see it is a column store table in HANA database.
Then, we can check the calculation view of FCO_C_IBP_ACDOCP which is created based on the table ACDOCP. The calculation view is not complex as star schama, it just project most of the fields from the table ACDOCP, and introduce it into semantics for later using. But please be noticed that the package for this CV is sap.erp.sfin.co.pl.
Now, we can go back to the BW client, and check the InfoProvider /ERP/SFIN_V20 in t-cd: RSA1, which is under the multiple provider /ERP/SFIN_M09(S/4HANA Financials: Plan Data Transfer Between BPC and ERP), or you can find it as well under the multiple provider /ERP/SFIN_M01(S/4HANA Financials: Plan and Actual Data). In this case, I will use the multiple provider /ERP/SFIN_M09. Regarding the fields mapping between the InfoProvider and the HANA calculation view FCO_C_IBP_ACDOCP, please click on the button “Assign SAP HANA View fields”. And for all of the InfoObjects used in this InfoProvider /ERP/SFIN_V20， please check it in T-Code: RSD1.
OK, let’s deep dive into this InfoProvider (or you can also call it InfoCube if you want) by clicking on the button “Type/Attributes”. As showing in below figure, 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 table ACDOCP is CL_FINS_ACDOCP_IPROV_WRITABLE. If you have basic knowledge of ABAP, you can easily find souce coding under the class method CL_FINS_ACDOCP_IPROV_WRITABLE =>IF_RSDRV_RPROV_WRITABLE~WRITE_DATA, set a break-point here, and then do whatever you want to debug.
Suppose you have already got the full picture of all introduced object above: table, calculation view, InfoObject, InfoProvider, InfoCube, Class method. Then in this chapter, let’s see how to combine all these elements together technically. The anser is query. In chapter 3, we mentioned we will use multiple provider /ERP/SFIN_M09 for demonstration, hence, here I will use the query /ERP/SFIN_A09_Q0001 for example. This query is used for Analysis office work book /ERP/SFIN_A09_WB01 (We will introduce the Analysis office work book later).
You can check/change the query details by using SAP Modeling Tool of HANA studio, or using Query Designer, personally, I am not familiar with both, so, I will use the query designer. To get you have a better understanding, I listed the SAP Modeling Tool figure below as well for you reference.
And in Query Designer, you can check the same as above (see below figure), find the variable /ERP/P_0INFOPROV, and then change the default value from /ERP/SFIN_R01 to /ERP/SFIN_V20.
Analysis office work book. Before using Analysis office work book，let’s create some test data in S/4 HANA Financial system. Using T-Code KP06, do manually planning for combination of cost center/cost element(e.g. SAPTED/475002) like below, we can find the planned line items in table COEJ, but at this stage, the value is not in table ACDOCP. Please be noticed that writing data simultanously to ERP-tables AND ACDOCP is not possible. SAP provided BADIs BADI_FINPLAN_POST and BADI_FINPLAN_GET for writing data into ACDOCP, but which are only used when writing/reading data to/from table ACDOCP from external sources by means of BAPIs FINPLAN_API_POSTDATA and FINPLAN_API_GETDATA. They are not called in other transactions like KP06.
Analysis office work book. In this chapter, let’s move to the Analysis Office Work Book /ERP/SFIN_A09_WB01. In last chater, we just planned cost for cost center/cost element(SAPTED/475002) with amount 900.00CNY. So at this stage, this value is not copied to BPC as well, it will be blank status as showed in below figure.
To copy planned values from ERP-tables to BPC，click on the button “Copy ERP to BPC” in the AO Work Book, and then click on the button “Save Data”, you will get the message “Data was saved” on the left bottom area of the screen.
Finally，go back to table ACDOCP, and we can check the same planned values with ERP tables now.
OK, hope you have already got the full picture about populate value into ACDOCP, finally I want to share a picture about the our collaboration of BPC, BW, COOM. Belog is a blog which wrote by my colleague at the beginning of this year, since then we were facing a lot of customer questions about cross-component issues like above, so we setup the collaboration and did a lot of self study. I have to say, that was very very useful.