Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

BPC Logic Script: Copy from calculated members (non-base) to base members

$
0
0

Hi experts,

 

I want to copy some values from some calculated members to base members in the same dimension. It appears I have a hard time scoping the calculated members.

This is my C_ACCOUNT dimension:

caccount.jpg

 

And this is the COPYCALC.LGF script I am running:

LGX:

 

 

*XDIM_MEMBERSET C_ACCOUNT = 450

*WHEN C_ACCOUNT

*IS 450

*REC( EXPRESSION = %VALUE%, C_ACCOUNT = 50)

*ENDWHEN

 

 

-------------------------------------------------------------------------------------------------------------------------------------

LOG:

 

 

LOG BEGIN TIME:2014-02-26 17:21:12

FILE:\ROOT\WEBFOLDERS\STEP_UNIT_TEST \ADMINAPP\BUDGET_CASH\TEST.LGF

USER:KAROLISB

APPSET:STEP_UNIT_TEST

APPLICATION:BUDGET_CASH

[INFO] GET_DIM_LIST(): I_APPL_ID="BUDGET_CASH", #dimensions=16

AA_NUMBER,AUDITTRAIL,BUDGET_OBJECT,BUDGET_TYPE,CATEGORY,COFOG,CURRENCY,C_ACCOUNT,C_ACCOUNT_DT,ENTITY,FLOW,GRANTS,MEASURES,TIME,TIME_DT,VERSION

 

 

#dim_memberset=4

CATEGORY:RES,1 in total.

CURRENCY:LC,1 in total.

TIME:2012,1 in total.

C_ACCOUNT:450,1 in total.

 

 

SCRIPT RUNNING TIME IN TOTAL:1.00 s.

LOG END TIME:2014-02-26 17:21:12

 

 

My model structure:

BUDGET_CASH model.jpg

 

 

 

So as you can see I am trying to copy from account 450 (which is non base) to account 50 ( which is base member). Also you can see that in the previous example no record was generated.

Whereas,  if I replace the account 450 with 4500 I get record generated in order:

 

LGX:

 

 

*XDIM_MEMBERSET C_ACCOUNT = 4500

*WHEN C_ACCOUNT

*IS 4500

*REC( EXPRESSION = %VALUE%, C_ACCOUNT = 50)

*ENDWHEN

 

 

-------------------------------------------------------------------------------------------------------------------------------------

LOG:

 

 

LOG BEGIN TIME:2014-02-26 18:26:26

FILE:\ROOT\WEBFOLDERS\STEP_UNIT_TEST \ADMINAPP\BUDGET_CASH\TEST.LGF

USER:KAROLISB

APPSET:STEP_UNIT_TEST

APPLICATION:BUDGET_CASH

[INFO] GET_DIM_LIST(): I_APPL_ID="BUDGET_CASH", #dimensions=16

AA_NUMBER,AUDITTRAIL,BUDGET_OBJECT,BUDGET_TYPE,CATEGORY,COFOG,CURRENCY,C_ACCOUNT,C_ACCOUNT_DT,ENTITY,FLOW,GRANTS,MEASURES,TIME,TIME_DT,VERSION

 

 

#dim_memberset=4

CATEGORY:RES,1 in total.

CURRENCY:LC,1 in total.

TIME:2012,1 in total.

C_ACCOUNT:4500,1 in total.

 

 

REC :%VALUE%

 

 

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 1  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

CALCULATION TIME IN TOTAL :0.00 ms.

1  RECORDS ARE GENERATED.

CALCULATION END.

 

 

ENDWHEN ACCUMULATION: 1  RECORDS ARE GENERATED.

 

 

DATA TO WRITE BACK:

AA_NUMBER AUDITTRAIL BUDGET_OBJECT BUDGET_TYPE CATEGORY COFOG CURRENCY C_ACCOUNT C_ACCOUNT_DT ENTITY FLOW GRANTS TIME TIME_DT VERSION SIGNEDDATA

AA_NONE LIM NONE 10 RES FA_NONE LC 50 CAD_NONE A00 F99_1 NONE 2012 TD_NONE CURRENT 222.00

1  RECORDS HAVE BEEN WRITTEN BACK.

WRITING TIME :1.00  ms

 

Why can I not copy value from 450 ? How do I solve this problem ?

PS: currently I am testing this as a DM package run script but in the future I would like to make it a Default.lgf functionality.

I am working on:

BPC 10 SP5 for NW, calculation engine ABAP, BW 7.4




Viewing all articles
Browse latest Browse all 5414

Trending Articles