cancel
Showing results for 
Search instead for 
Did you mean: 

script logic: simple *REC based on values generated by business rule

Former Member
0 Kudos

Hi,

I need to get the following done:

Using the BPC business rules for ACCOUNT TRANSFORMATION in a consolidation appset I eliminate investment in subs and equity and the result is good- or badwill. The business rule generates this good- or badwill on a set account but I need to show it on two separate ones, depending on whether it is good- or badwill.

The business rules generate the posting on a datasrc type A. I have then simply tried, with a new script logic that is added to the consolidation logic with an *INCLUDE statement, to post the good- or badwill to a different account, depending on whether the amount is positive or not.

This is the extra script:

*SELECT (%CONSOLVIEW_SRC%,"ID","CONSOLVIEW","[CURRENCY_TYPE]='G'") //CONSOLVIEW is my currency dimension

*XDIM_MEMBERSET ACCOUNTL=BS1,BS2 //BS1 is the account used by the business rule, BS2 is the alternative account

*XDIM_MEMBERSET DATASRCL=AA_40,AA_46 //AA_40 is type A and the one used by the business rule, AA_46 is type I

*XDIM_MEMBERSET CONSOLVIEW=%CONSOLVIEW_SCR%

*XDIM_MEMBERSET CATEGORY=%CATGEORY_SET%

*XDIM_MEMBERSET TIME=%TIME_SET%

*WHEN CATEGORY

*IS %CATEGORY_SET%

*WHEN TIME

*IS %TIME_SET%

*WHEN DATASRCL

*IS "AA_40"

*WHEN ACCOUNTL

*IS "BS1"

*WHEN SIGNEDATA

*IS < 0

*REC(EXPRESSION=1, ACCOUNTL="BS2",DATASRCL="AA_46")

*ENDWHEN

*ENDWHEN

*ENDWHEN

*ENDWHEN

*ENDWHEN

I know that I am missing a second *REC statement but since not even the first one is working, I am ignoring that fact for the moment.

Am I missing something or can I not use script logic to perform this task?

Thanks,

Arnold

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arnold,

Try using SIGNEDDATA instead of SIGNEDATA, although depending on the version you are using this may not work. If not try using a GET instruction instead, like below:

*SELECT (%CONSOLVIEW_SRC%,"ID","CONSOLVIEW","CURRENCY_TYPE='G'") //CONSOLVIEW is my currency dimension

*XDIM_MEMBERSET ACCOUNTL=BS1 //BS1 is the account used by the business rule, BS2 is the alternative account

*XDIM_MEMBERSET DATASRCL=AA_40 //AA_40 is type A and the one used by the business rule, AA_46 is type I

*XDIM_MEMBERSET CONSOLVIEW=%CONSOLVIEW_SCR%

*WHEN DATASRCL

*IS "AA_40"

*WHEN GET(ACCOUNTL="BS1")

*IS < 0

*REC(FACTOR=1, ACCOUNTL="BS2",DATASRCL="AA_46")

*ENDWHEN

*ENDWHEN

I think you also need a FACTOR instead of EXPRESSION, as the EXPRESSION command will simply wirte a value of 1 to the target account.

Hope that helps.

Thanks,

Steve

Former Member
0 Kudos

Hi Stephen,

the GET version worked, thanks for the tip.

I now have an additional problem though, the check whether the value is greater or less than zero needs to be performed on a node in another dimension. I tried to simply add a *WHEN statement but since data is not stored on nodes, this produces no results. Is there a way to check for a calculated value in script logic?

Thanks,

Arnold

Former Member
0 Kudos

Hi,

The parent members can be accessed using CALC_ORG statement. Please refer to the below link from help.sap for more information on this.

http://help.sap.com/saphelp_bpc75/helpdata/en/2d/ef275fdeca4233b5f82c503113453b/content.htm

Hope this helps.

Answers (0)