Skip to Content
0
Jan 22, 2020 at 08:58 AM

Calculation on Parent nodes via script logic

211 Views

Hi All,

Product version: BPCNW 10.1 Classic on S4 HANA

BW :Release 753 and SP level 0002.

In the model Consolidation, we have dimensions Entity,Account,Audit trail,Time,Version,Cost center,Profit center,intercompany,scope,flow and Currency

Script to be launched by Data Manager package.

Issue:- I need calculations on few parent nodes using script logic which is expected to divide few nodes to get the results.

Logic example: GP gets divided by REVENUE to get GP_Margin(target account). Here GP and REVENUE are parent nodes, when I am writing the code as per below, I am not getting the correct results.

I have to get these kind of calculations for many parent nodes, can anyone help me as how can I get the value from the parent members.

Also want to mention that recently client has upgraded S4HANA from 1610 to 1809. On previous 1610 version, this code is working perfectly.

*XDIM_MEMBERSET VERSION = ACTUAL, %VERSION_SET%
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET ENTITY = %ENTITY_SET%

*WHEN AUDIT_TRAIL
*IS INPUT
*REC(EXPRESSION = [ACCOUNT].[GP]/[ACCOUNT].[REVENUE],ACCOUNT = GP_Margin,AUDIT_TRAIL=BPC_CALCS)
*REC(EXPRESSION = [ACCOUNT].[OP]/[ACCOUNT].[REVENUE],ACCOUNT = OP_Margin,AUDIT_TRAIL=BPC_CALCS)
*ENDWHEN
*COMMIT