Skip to Content
0

Variable assignments using LOOKUP feature in BPC Script Logic

Nov 27, 2016 at 07:26 AM

136

avatar image

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

1.txt (1.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Vadim Kalinin Nov 27, 2016 at 07:56 AM
0

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%)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Shrikant Deshpande Nov 27, 2016 at 07:48 AM
0

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!"

Show 1 Share
10 |10000 characters needed characters left characters exceeded

No relation to your case!

0