Skip to Content
author's profile photo Former Member
Former Member

Variable assignments using LOOKUP feature in BPC Script Logic

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)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Nov 27, 2016 at 07:56 AM

    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%)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 27, 2016 at 07:48 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.