Skip to Content

Property of Member in REC statement

I am trying to run an allocation that takes the NETSALES amount multiply by percent to get to a Delivery account. The NETSALES are saved in 2018.01 for example while the percent is saved to 2018.INP (a property of 2018.01). How do I tell the REC to pull the property of the time period so I can run based on time selected in DM package?

*SUB RUNALLOC(AcctTo,AcctInp,ProdFrom,ProdInp)
*XDIM_MEMBERSET ACCOUNT = NETSALES
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
*XDIM_MEMBERSET CUSTOMERSEGMENT = BAS(TOTALEM)
*XDIM_MEMBERSET DATASRC = BAS(ALL_COPA)
*XDIM_MEMBERSET PRODUCT = BAS(ProdFrom)
*XDIM_MEMBERSET REPORTINGGROUP = BAS(KOH_EUROPE)
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET RPTCURRENCY = USD,LC,EUR


*WHEN ACCOUNT
*IS NETSALES
*REC(FACTOR = -([ACCOUNT].[AcctInp],[DATASRC].[INPUT],[PRODUCT].[ProdInp],[REPORTINGGROUP].[INPUT_KBEMEA],[RPTCURRENCY].[LC],[TIME].[2017.INP]),ACCOUNT = AcctTo)
*ENDWHEN
*ENDSUB

RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_CERMCS,EM_JD_CERMCS.INP)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 24, 2017 at 07:26 AM

    Use LOOKUP:

    *LOOKUP SameCube

    *DIM ACCOUNT="AcctInp"

    *DIM DATASRC="INPUT"

    *DIM PRODUCT="ProdInp"

    *DIM REPORTINGGROUP="INPUT_KBEMEA"

    *DIM RPTCURRENCY="LC"

    *DIM INP:TIME=TIME.SOMEPROPERTY

    *ENDLOOKUP

    ...

    *REC(FACTOR=-LOOKUP(INP),...

    Add comment
    10|10000 characters needed characters exceeded

    • Here is the full list of RUNALLOC lines. 120 lines in total

      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_CERMCS,EM_JD_CERMCS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_TS,EM_JD_TS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_FCTS,EM_JD_FCTS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_CI,EM_JD_CI.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_ACYL,EM_JD_ACYL.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_CAB,EM_JD_CAB.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_WHPL,EM_JD_WHPL.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_SHR_DRS,EM_JD_SHR_DRS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_CM,EM_JD_CM.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_MISCOTHR,EM_JD_MISCOTHR.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_CERMCS,EM_JD_OTHR_CERMCS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_TS,EM_JD_OTHR_TS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_FCTS,EM_JD_OTHR_FCTS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_CI,EM_JD_OTHR_CI.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_ACYL,EM_JD_OTHR_ACYL.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_CAB,EM_JD_OTHR_CAB.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_WHPL,EM_JD_OTHR_WHPL.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_SHR_DRS,EM_JD_OTHR_SHR_DRS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_CM,EM_JD_OTHR_CM.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_JD_OTHR_MISCOTHR,EM_JD_OTHR_MISCOTHR.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_CERMCS,EM_KB_CERMCS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_TS,EM_KB_TS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_FCTS,EM_KB_FCTS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_CI,EM_KB_CI.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_ACYL,EM_KB_ACYL.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_CAB,EM_KB_CAB.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_WHPL,EM_KB_WHPL.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_SHR_DRS,EM_KB_SHR_DRS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_CM,EM_KB_CM.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_KB_MISCOTHR,EM_KB_MISCOTHR.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_CAB,EM_SJRA_CAB.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_CERMCS,EM_SJRA_CERMCS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_TS,EM_SJRA_TS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_FCTS,EM_SJRA_FCTS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_CI,EM_SJRA_CI.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_ACYL,EM_SJRA_ACYL.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_WHPL,EM_SJRA_WHPL.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_SHR_DRS,EM_SJRA_SHR_DRS.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_CM,EM_SJRA_CM.INP)
      RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,FINEM_SJRA_MISCOTHR,EM_SJRA_MISCOTHR.INP)

      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_CERMCS,EM_JD_CERMCS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_TS,EM_JD_TS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_FCTS,EM_JD_FCTS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_CI,EM_JD_CI.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_ACYL,EM_JD_ACYL.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_CAB,EM_JD_CAB.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_WHPL,EM_JD_WHPL.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_SHR_DRS,EM_JD_SHR_DRS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_CM,EM_JD_CM.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_MISCOTHR,EM_JD_MISCOTHR.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_CERMCS,EM_JD_OTHR_CERMCS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_TS,EM_JD_OTHR_TS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_FCTS,EM_JD_OTHR_FCTS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_CI,EM_JD_OTHR_CI.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_ACYL,EM_JD_OTHR_ACYL.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_CAB,EM_JD_OTHR_CAB.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_WHPL,EM_JD_OTHR_WHPL.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_SHR_DRS,EM_JD_OTHR_SHR_DRS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_CM,EM_JD_OTHR_CM.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_JD_OTHR_MISCOTHR,EM_JD_OTHR_MISCOTHR.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_CERMCS,EM_KB_CERMCS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_TS,EM_KB_TS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_FCTS,EM_KB_FCTS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_CI,EM_KB_CI.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_ACYL,EM_KB_ACYL.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_CAB,EM_KB_CAB.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_WHPL,EM_KB_WHPL.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_SHR_DRS,EM_KB_SHR_DRS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_CM,EM_KB_CM.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_KB_MISCOTHR,EM_KB_MISCOTHR.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_CAB,EM_SJRA_CAB.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_CERMCS,EM_SJRA_CERMCS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_TS,EM_SJRA_TS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_FCTS,EM_SJRA_FCTS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_CI,EM_SJRA_CI.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_ACYL,EM_SJRA_ACYL.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_WHPL,EM_SJRA_WHPL.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_SHR_DRS,EM_SJRA_SHR_DRS.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_CM,EM_SJRA_CM.INP)
      RUNALLOC(ZFAWARRANTY,ZFAWARRANTY_PCTNS,FINEM_SJRA_MISCOTHR,EM_SJRA_MISCOTHR.INP)

      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_CERMCS,EM_JD_CERMCS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_TS,EM_JD_TS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_FCTS,EM_JD_FCTS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_CI,EM_JD_CI.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_ACYL,EM_JD_ACYL.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_CAB,EM_JD_CAB.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_WHPL,EM_JD_WHPL.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_SHR_DRS,EM_JD_SHR_DRS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_CM,EM_JD_CM.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_MISCOTHR,EM_JD_MISCOTHR.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_CERMCS,EM_JD_OTHR_CERMCS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_TS,EM_JD_OTHR_TS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_FCTS,EM_JD_OTHR_FCTS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_CI,EM_JD_OTHR_CI.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_ACYL,EM_JD_OTHR_ACYL.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_CAB,EM_JD_OTHR_CAB.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_WHPL,EM_JD_OTHR_WHPL.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_SHR_DRS,EM_JD_OTHR_SHR_DRS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_CM,EM_JD_OTHR_CM.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_JD_OTHR_MISCOTHR,EM_JD_OTHR_MISCOTHR.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_CERMCS,EM_KB_CERMCS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_TS,EM_KB_TS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_FCTS,EM_KB_FCTS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_CI,EM_KB_CI.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_ACYL,EM_KB_ACYL.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_CAB,EM_KB_CAB.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_WHPL,EM_KB_WHPL.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_SHR_DRS,EM_KB_SHR_DRS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_CM,EM_KB_CM.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_KB_MISCOTHR,EM_KB_MISCOTHR.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_CAB,EM_SJRA_CAB.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_CERMCS,EM_SJRA_CERMCS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_TS,EM_SJRA_TS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_FCTS,EM_SJRA_FCTS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_CI,EM_SJRA_CI.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_ACYL,EM_SJRA_ACYL.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_WHPL,EM_SJRA_WHPL.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_SHR_DRS,EM_SJRA_SHR_DRS.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_CM,EM_SJRA_CM.INP)
      RUNALLOC(ZFACORPADM,ZFACORPADM_PCTNS,FINEM_SJRA_MISCOTHR,EM_SJRA_MISCOTHR.INP)

  • Oct 24, 2017 at 06:22 PM

    You can have only one LOOKUP for the same cube in script. In this LOOKUP you have to define 120 labels:

    *LOOKUP FINANCE 
    *DIM L1:ACCOUNT=ZFADELIVERY_PCTNS
    *DIM L1:PRODUCT=EM_JD_CERMCS.INP 
    *DIM L2:ACCOUNT=ZFADELIVERY_PCTNS
    *DIM L2:PRODUCT=EM_JD_TS.INP
    //... 120 pairs up to L120 
    *DIM DATASRC=INPUT 
    *DIM REPORTINGGROUP=INPUT_KBEMEA 
    *DIM RPTCURRENCY=LC 
    *DIM TIME=TIME.AVGMYTD // No Label here!
    *ENDLOOKUP
    
    *SUB RUNALLOC(AcctTo,ProdFrom,LookupLabel) // LookupLabel - L1...L120
    
    *XDIM_MEMBERSET ACCOUNT = NETSALES 
    *XDIM_MEMBERSET CATEGORY = %CATEGORY_SET% 
    *XDIM_MEMBERSET CUSTOMERSEGMENT = BAS(TOTALEM) 
    *XDIM_MEMBERSET DATASRC = BAS(ALL_COPA) 
    *XDIM_MEMBERSET PRODUCT = BAS(ProdFrom) 
    *XDIM_MEMBERSET REPORTINGGROUP = BAS(KOH_EUROPE) 
    *XDIM_MEMBERSET TIME = %TIME_SET% 
    *XDIM_MEMBERSET RPTCURRENCY = USD,LC,EUR 
    
    *WHEN ACCOUNT 
    *IS NETSALES 
    *REC(FACTOR = -LOOKUP(LookupLabel),ACCOUNT = AcctTo) // LookupLabel used here
    *ENDWHEN 
    *ENDSUB 
    
    RUNALLOC(ZFADELIVERY,FINEM_JD_CERMCS,L1)
    RUNALLOC(ZFADELIVERY,FINEM_JD_TS,L2)
    //... 120 RUNALLOC
    Add comment
    10|10000 characters needed characters exceeded