Hello experts! I am new to BPC and encountered a 1x hours run time when executing the script logic. Please take a look at the details and any help will be really appreciated! Thank you very much for your time and help in advance!
Purpose & Issue encountered:
As we are working on the cost allocation exercise, the purpose of the logic script is to retrieve the ratio from the ratio table (RATIO_ALC) to the transaction table (TRANS_ALC), to calculate the cost allocated to the subsequent flows and writes back the calculated result to TRANS_ALC.
So a script has been developed based on the requirement and it works perfectly well in testing when the executing volume is low, say 20 entries. But when it comes to full loops for all required items, it took around 13 hours to complete.
I have tried implementing badi RUNLOGIC_PH (https://archive.sap.com/documents/docs/DOC-35152) but failed to import the transport, and I suspect that it is a result of versioning issue. These lead to my questions:
[BPC 11.1] BPC4HANA 200 SP 4, BW4HANA 200 SP 4 ABAP
PS. User does not expect to select DEPT, BU, or GLACCOUNT information when executing the logic.
*SELECT (%DEPT_CC%, ID, COSTCENTER_DEPT, NATURE = DEPT) *SELECT (%BU_CC%, ID, COSTCENTER_BU, NATURE = BU) *SELECT (%COA%, ID, GLACCOUNT, GAE_OAC_AC <>'') // TRANS_ALC Memberset *XDIM_MEMBERSET YEAROFPLAN = 2019 //%YEAROFPLAN_SET% *XDIM_MEMBERSET TIME = 2019.01 //%TIME_SET% *XDIM_MEMBERSET PROFITCENTER = NA *XDIM_MEMBERSET MEASURES = PERIODIC *XDIM_MEMBERSET RPTCURRENCY = HKD *XDIM_MEMBERSET ACQMAINT = NA *XDIM_MEMBERSET FLOW_ALC = STEP_B *XDIM_MEMBERSET CATEGORY = BUDGETV1 //%CATEGORY_SET% // RATIO_ALC LOOKUP ratio *LOOKUP RATIO_ALC *DIM GLACCOUNT = NA *DIM FLOW_ALC = STEP_C *DIM DATASOURCE = Input *FOR %LOOP_DEPT_CC% = %DEPT_CC% *FOR %LOOP_BU_CC% = %BU_CC% *DIM R_%LOOP_DEPT_CC%_%LOOP_BU_CC%: COSTCENTER_DEPT = %LOOP_DEPT_CC% *DIM R_%LOOP_DEPT_CC%_%LOOP_BU_CC%: COSTCENTER_BU = %LOOP_BU_CC% *NEXT *NEXT *ENDLOOKUP // TRANS_ALC Action *FOR %LOOP_COA% = %COA% *WHEN GLACCOUNT *IS %LOOP_COA% *FOR %LOOP_DEPT_CC% = %DEPT_CC% *WHEN COSTCENTER_DEPT *IS %LOOP_DEPT_CC% *FOR %LOOP_BU_CC% = %BU_CC% *REC(EXPRESSION = 0, FLOW_ALC = "STEP_C") *REC(FACTOR = LOOKUP(R_%LOOP_DEPT_CC%_%LOOP_BU_CC%)*-1,FLOW_ALC = "STEP_C", COSTCENTER_DEPT = %LOOP_DEPT_CC%) *REC(FACTOR = LOOKUP(R_%LOOP_DEPT_CC%_%LOOP_BU_CC%),FLOW_ALC = "STEP_C", COSTCENTER_BU = %LOOP_BU_CC%) *NEXT *ENDWHEN *NEXT *ENDWHEN *NEXT