Skip to Content

BPC - Lookup sintax

hello experts:

Im trying this script in BPC 10:

*XDIM_MEMBERSET TIME = %TIME_SET% //*SELECT(%YEAR%,YEAR,TIME,ID=%TIME_SET%)

*LOOKUP Compras

*DIM ACCOUNT="ZMONTHPAYMENT"

*ENDLOOKUP

*WHEN ACCOUNT

*IS

ZAMOUNTINVOICEDLC

*FOR %MONTH%=LOOKUP(ACCOUNT)

*REC(FACTOR=1,ACCOUNT=ZAMOUNTPAYMENTLC,TIME=TMVL(%MONTH%,%TIME_SET%)) *NEXT

*ENDWHEN

It nos working. the error mesage is that TMVL parameters are invalid.

What im trying to do is use the value store in account ZMONTHPAYMENT as the offset in the TMVL.

Do I have other options?

Thanks in advance.

Luciana

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Nov 11, 2016 at 07:36 AM

    P.S. In order to use value stored in the cube as an offset to calculate time member the custom logic badi is the only solution. Script logic can't do the job!

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 11, 2016 at 07:16 AM

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

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 11, 2016 at 05:57 AM

    Hi Luciana,

    To my mind I don't think TMVL will use any kind of variable in place of offset...which is why its giving the error. Please can you explain the logic of your script logic.....why are you taking the offset value from an account?

    Regards,

    JP

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2016 at 08:03 PM

    Thank you Vadim.

    We will use a custom logid BADI .

    Add comment
    10|10000 characters needed characters exceeded

    • If you will perform calculations in DM package - then custom logic badi. If you want to perform calculations on the data save (like with default.lgf) - then use write back badi.

  • Nov 25, 2016 at 04:09 PM

    I will use DM package :)

    Thank you

    Add comment
    10|10000 characters needed characters exceeded