Skip to Content
avatar image
Former Member

BPC NW - Passing Variable from DM to Script logic


Getting below error when i run the pkg - Anything wrong with the DM Advanced Script?

[Message]
--------------------------------------------------------------

RUN_LOGIC:Members invalid On Dimension(TIME)

model: Finance. Package status: ERROR

-----------------------------------------------------------
DM Script :

PROMPT(SELECTINPUT,%SRCTIM%,,"Select src Time:","TIME")
PROMPT(SELECTINPUT,%DESTTIM%,,"Select dest Time:","TIME")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SRCTIM%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%DESTTIM%)


Script Logic:
------------

....
*XDIM_MEMBERSET TIME = $SRCTIM$,$DESTTIM$
....

*WHEN TIME
*IS $SRCTIM$
*WHEN VERSION
*IS ACTUAL
*FOR %DT% = $DESTTIM$
*REC(FACTOR=1,VERSION=P1,AUDIT_ID=E1,TIME = %DT%)
*NEXT
*ENDWHEN
*ENDWHEN


-----


Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Dec 02, 2016 at 04:51 PM

    Ups, sorry, copy error!

    PROMPT(COPYMOVEINPUT,%SRCTIM%,%DESTTIM%,"Select the TIME members from to","TIME")
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
    INFO(%EQU%,=)
    INFO(%TAB%,,;)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SRCTIM%EQU%%SRCTIM%%TAB%DESTTIM%EQU%%DESTTIM%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY_BS.LGF)

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 02, 2016 at 03:51 AM

    Hi,

    If you need to pass 2 sets on same Dimension then SELECTINPUT is not the best choice. It would be better to use COPYMOVEINPUT or MEMBERFROMTOINPUT.

    Try one of those.

    Regards,

    Gersh

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 02, 2016 at 07:29 AM

    In DM advanced script have to be:

    PROMPT(SELECTINPUT,%SRCTIM%,,"Select src Time:","TIME")
    PROMPT(SELECTINPUT,%DESTTIM%,,"Select dest Time:","TIME")
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
    INFO(%EQU%,=)
    INFO(%TAB%,,;)
    CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
    CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SRCTIM%EQU%%SRCTIM%%TAB%DESTTIMEQU%%DESTTIM%)

    Add comment
    10|10000 characters needed characters exceeded

    • P.P.S in the script itself the line:

      *XDIM_MEMBERSET TIME = $SRCTIM$,$DESTTIM$

      has to be changed to

      *XDIM_MEMBERSET TIME = $SRCTIM$

      no need to scope destination.

      Also allocation can be used to copy values to multiple periods.

  • avatar image
    Former Member
    Dec 02, 2016 at 04:07 PM

    Thanks Vadim & Gersh..i modified the script but getting a different error now.pls see below...any idea ?

    [Message]
    --------------------------------------------------------------

    RUN_LOGIC:Member "/xxxx/finance/PRIVATEPUBLICATI" not exist

    model: finance. Package status: ERROR

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2016 at 04:46 PM

    Vadim,

    Here is the complete logic files

    PROMPT(COPYMOVEINPUT,%SRCTIM%,%DESTTIM%,"Select the TIME members from to","TIME")

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
    INFO(%EQU%,=)
    INFO(%TAB%,,;)
    CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
    CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SRCTIM%EQU%%SRCTIM%%TAB%DESTTIM%EQU%%DESTTIM%)
    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY_BS.LGF)
    ------------------------------------------------------------------------

    *SELECT(%PC%, "[ID]", "ENTITY", "[FORECAST_DEFAULT]<>'' AND [CALC]='N'")


    *XDIM_MEMBERSET ACCOUNT = BAS(CASH)
    *XDIM_MEMBERSET AUDIT_ID = BAS(TOT_MGMT)
    *XDIM_MEMBERSET CURRENCY = LC
    *XDIM_MEMBERSET ENTITY = %PC%
    *XDIM_MEMBERSET FLOW = F_CLO
    *XDIM_MEMBERSET INTERCO = <ALL>
    *XDIM_MEMBERSET SCOPE = S_NONE
    *XDIM_MEMBERSET VERSION = ACTUAL
    *XDIM_MEMBERSET TIME = $SRCTIM$

    *WHEN TIME
    *IS $SRCTIM$
    *WHEN VERSION
    *IS ACTUAL
    *FOR %DT% = $DESTTIM$
    *REC(FACTOR=1,VERSION=P1,AUDIT_ID=E1,TIME = %DT%)
    *NEXT

    *ENDWHEN
    *ENDWHEN

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2016 at 04:51 PM

    "Task" was missing in 2 statements :) ..

    Added that. works fine now.

    Thanks Vadim for your help

    Add comment
    10|10000 characters needed characters exceeded