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

Script logic help passing BAS(%TIME-SET%) in *FOR/*NEXT

Hi Experts,

Please help in script logic to pass BSA(%TIME_SET%) in *FOR/*NEXT statement. requirement is to pass 2012.FTOTAL,2013.FTOTAL... in data manager prompt, I can be able to bass one FY not more than one. How to pass more than one FY in below script

my code is like below

*LOOKUP RandD

*DIM ACCOUNT = "ACT"

*DIM RPTCURRENCY="NORCUR"

*FOR %TME% = BAS(%TIME_SET%)

*DIM TIME = %TME%

*FOR %CCTR% = %COSTCENTER_SET%

*DIM COSTCENTER ="%CCTR%"

*FOR %PRJ% = %PROJECT_SET%

*DIM VLKP_%CCTR%%PRJ%:PROJECT ="%PRJ%"

*NEXT

*NEXT

*NEXT

*ENDLOOKUP

*FOR %TME% = BAS(%TIME_SET%)

*FOR %CCTR% = %COSTCENTER_SET%

*FOR %PRJ% = %PROJECT_SET%

*WHEN ACCOUNT

*IS *

*REC(EXPRESSION=%VALUE%*LOOKUP(VLKP_%CCTR%%PRJ%),PROJECT=%PRJ%,COSTCENTER=%CCTR%)

*ENDWHEN

*NEXT

*NEXT

*NEXT

Thanks,

DAB

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jun 07, 2012 at 12:28 PM

    Hi DAB,

    I believe in a DM package prompt, you can pass multiple values separated by a comma.

    So, you could pass 2012.FTOTAL, 2013.FTOTAL in the prompt.

    Hope it helps!!

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi All!

      Yes, it's possible to pass multiple parent members from DM prompt, but it's not possible to merge BAS members from number of parents in one variable (BAS(2012.FTOTAL, 2013.FTOTAL) is not working.

      The only solution I know is to use BAdi (modified RULOGIC).

      B.R. Vadim

  • Posted on Jun 07, 2012 at 01:42 PM

    Hi,

    you can build a *SELECT using "ID IN(....)" instead of "ID =" and put the result in the FOR/NEXT

    or using the TMVL function and give the offset.

    Kind regards

    Roberto

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Roberto Vidotti

      Hi Roberto,

      As Vadim has raised,, not getting BAS members. Please let me know how can I get BAS members inside the lookup using for loop, to lookup for the basemembers of entered years like 2010.FTOTAL,2011.FTOTAL.....

      Thanks

      DAB

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.