cancel
Showing results for 
Search instead for 
Did you mean: 

Look Up Function

0 Kudos
194

Hi Experts,

I am looking into BPC 11.0 N.W.

The Requirement is as followes

Planning model & Cost Model Have Same dimensions.

Cost model (Account=60000) = Planning Model (account=50000,scenario=ACTUAL,currency=USD,Functional_area=NO_FA)-cost model(account=61000),account=STAT_TOTGA)

*XDIM_MEMBERSET ACCOUNT = 61000

*LOOKUP PLANNING_MODEL

*DIM GA:ACCOUNT="60000"

*DIM SCENARIO = "ACTUAL"

*DIM CURRENCY = "USD"

*DIM FUNCTIONAL_AREA="NO_FA"

*ENDLOOKUP

*WHEN ACCOUNT

*IS 60000

*REC(EXPRESSION=LOOKUP(GA)-[ACCOUNT].[61000],ACCOUNT=60000)

*ENDWHEN

But run the above logic is not working.

Please kindly suggest me

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

"Requirement is to lookup the account id - 60000 transnational data from other model (Plan) and subtract with other account (58000) in main model (cost) then put the result to account (STAT_NONSTOTH)" - sorry, but your code is not inline with your requirements! And in 2 posts the code is different and incorrect in syntax.

Also, looks like you don't want to read my blog - not full info provided!

Try code like:

*LOOKUP FPnA
*DIM GA:ACCOUNT="60000" 
*ENDLOOKUP 

*XDIM_MEMBERSET ACCOUNT = 58000 //only this account to be scoped
*XDIM_MEMBERSET SCENARIO = ACTUAL 
*XDIM_MEMBERSET CURRENCY = USD 
*XDIM_MEMBERSET FUNCTIONAL_AREA=NO_FA

*WHEN SCENARIO 
*IS * //already scoped 
*REC(EXPRESSION=LOOKUP(GA)-%VALUE%,ACCOUNT=STAT_NONSTCOTH)
*ENDWHEN

But: If there is no record for 58000 - no result will go to STAT_NONSTOTH

If you need to get correct result even if there is no record in 58000 you have to use push instead of pull using *DESTINATION_APP from FPnA.

Read my blog: https://blogs.sap.com/2018/11/14/how-to-copy-data-between-models-in-bpc-script-logic/

0 Kudos

Hi Vadim,

Requirement is to lookup the account id - 60000 transnational data from other model (Plan) and subtract with other account (58000) in main model (cost) then put the result to account (STAT_NONSTOTH).

In The above logic i used Destination_App for moving data from one model to another model.Its Working Fine.

But By using Destination_App in the logic We need to run 2 logics to get Calculated value in Main Model.But User didn't accept to run logic 2 times.

Is there any possibility to get value in one script only.In case there is no record in 58000 member the output result go to STAT_NONSTCOTH.

*WHEN_REF_DATA = MASTER_DATA //to work for empty record

By Using Above function The logic working? or any other alternative

Kindly Please Suggest me.

Regards,
Uma

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

"in The above logic i used Destination_App for moving data from one model to another model.Its Working Fine.

But By using Destination_App in the logic We need to run 2 logics to get Calculated value in Main Model.But User didn't accept to run logic 2 times."

Sorry, but please, read again my blog: https://blogs.sap.com/2018/11/14/how-to-copy-data-between-models-in-bpc-script-logic

RUNLOGIC badi has to be used

former_member186338
Active Contributor
0 Kudos

Sorry, but instead of your not working script, please explain, what do you want to achieve!

Please read my blog: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

and provide required info!

0 Kudos

Hi Vadim,

We are working on BPC 11.0 NW.

We have 2 models (Plan & Cost) with same no.of dimensions & master data.

Requirement is to lookup the account id - 60000 transnational data from other model (Plan) and subtract with other account (58000) in main model (cost) then put the result to account (STAT_NONSTOTH)

I tried with below logic and its not working

*XDIM_MEMBERSET ACCOUNT = 60000,STAT_TOTGA,58000

*LOOKUP FPnA

*DIM GA:ACCOUNT="60000"

*ENDLOOKUP

*WHEN SCENARIO

*IS ACTUAL

*REC(EXPRESSION=LOOKUP(GA),ACCOUNT=STAT_TOTGA,ACCOUNT=STAT_NONSTCOTH,SCENARIO=ACTUAL,CURRENCY=USD,FUNCTIONAL_AREA=NO_FA)
*ENDWHEN

when i execute the logic i didnt get the correct values.All values are 0.

Please suggest me how i proceed