cancel
Showing results for 
Search instead for 
Did you mean: 

Variable assignments using LOOKUP feature in BPC Script Logic

Former Member
0 Kudos

Hi Experts

I am trying to run a script where the scenario is I want to lookup a rate from the system and then create a record using that rate. To retrieve the rate, I have used the lookup feature (script in 1.txt attached).

You will see that I have hard coded the time dimension. That works; however, I want to run the script using a time variable. To do so, I included the two lines currently commented out in the dynamic script, and marked the time statements in the LGF file as

TIME = %TIME_DIM%.

This doesn't work. It gives me an error saying "

RUN_LOGIC:Members invalid On Dimension(TIME)

"

Do I surmise that lookup functions dont work with variables?

regards

Shrikant

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

First about LOOKUP: If you don't specify some dimension in LOOKUP definition then the member of current record in WHEN/ENDWHEN loop will be used. Simply don't specify TIME in LOOKUP!

Second - incorrect advanced script:

PROMPT(SELECTINPUT,,,,"%TIME_DIM%")
TASK(/CPMB/ICDATA_LOGIC,SUSER,%USER%)
TASK(/CPMB/ICDATA_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/ICDATA_LOGIC,SAPP,%APP%)
TASK(/CPMB/ICDATA_LOGIC,SELECTION,%TIME_DIM%)
TASK(/CPMB/ICDATA_LOGIC,LOGICFILENAME,MP_CONVERSION.LGF)

Has to be:

TASK(/CPMB/ICDATA_LOGIC,SELECTION,%SELECTION%)
former_member186338
Active Contributor
0 Kudos

P.S. %TIME_DIM% contain the name of TIME dimension ("TIME" in your case) not members!

Answers (1)

Answers (1)

Former Member
0 Kudos

am guessing the answer is going to be this?

"

https://answers.sap.com/questions/58974/bpc-lookup-sintax.html

In general you can't read the value by LOOKUP and use it in some variable. No way!"

former_member186338
Active Contributor
0 Kudos

No relation to your case!