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)
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),...
I had to move the SUB statement above the LOOKUP and it worked when running for one SUB statement. When I try to save the package with multiple SUB statements, I get an error stating "Invalid Lookup structure; Multi LOOKUP on same cube not allowed."
That's why you have to read: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/
Full script text is required. How do you use SUB in other code? Just remember that SUP is not a real sub, it's just a code insert...
Here is the current code I have the works when I only have the first RUNALLOC. When I have more than one (only showing two in this example but I have 50+ in this script), I get the error. Does this help? We use SUB in other scripts exactly like this except no LOOKUP code and it works fine.
*SUB RUNALLOC(AcctTo,AcctInp,ProdFrom,ProdInp)
*LOOKUP FINANCE
*DIM ACCOUNT=AcctInp
*DIM DATASRC=INPUT
*DIM PRODUCT=ProdInp
*DIM REPORTINGGROUP=INPUT_KBEMEA
*DIM RPTCURRENCY=LC
*DIM INP:TIME=TIME.AVGMYTD
*ENDLOOKUP
*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(INP),ACCOUNT = AcctTo)
*ENDWHEN
*ENDSUB
RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,PRODUCT1,PRODUCT1.INP)
RUNALLOC(ZFADELIVERY,ZFADELIVERY_PCTNS,PRODUCT2,PRODUCT2.INP)
OK, now it's clear!
Due to the fact that SUB variables are used inside LOOKUP (AcctInp and ProdInp) you can't use SUB in a simple way in this case.
Please show full real list of RUNALLOC lines and I will show you a solution! (Multiple labels in LOOKUP etc...)
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_S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ORPADM,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)
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