Hi Team,
My requirement is to customize COPY package which can be used to COPY Source Months for e.g. 2 Months data (Jan 2016 and Feb 2016) to Target for e.g. 1 Month (March 2016).
Currently, I am using a script logic to COPY but this is only COPY One Month to Another month but I would require to COPY ONE Month to Multiple Months.
Please see my existing script logic which I am using now. Can something be changed here to COPY Data from one month to multiple months. E.g. COPY data of JAN and FEB to Mar at the same time.
*XDIM_MEMBERSET KIT=BAS(ALL_KI)
*XDIM_MEMBERSET COMPONENT=BAS(ALL_COM)
*XDIM_MEMBERSET INGREDIENT=BAS(ALL_ING)
*XDIM_MEMBERSET CURRENCY=USD
*XDIM_MEMBERSET DATASRC=INPUT
*XDIM_MEMBERSET MATG4=BAS(ALL_MATG4),NO_MATG4
*XDIM_MEMBERSET BRAND=BAS(ALL_BRAND),NO_BRAND
*XDIM_MEMBERSET LOCATION=%LOCATION_SET%
*XDIM_MEMBERSET TIME=$SOURCETIME$
*XDIM_MEMBERSET VERSION=A100
*XDIM_MEMBERSET COUNTRY=BAS(ALL_COUNTRIES),NO_COUNTRY
*XDIM_MEMBERSET KEYFIGURE=FOREX_PL,INV_IMP_PL
*WHEN TIME *IS * *REC(EXPRESSION=%VALUE%,TIME=$TARGETTIME$) *ENDWHEN
Any ideas pls?
Please let me know if you need any information from my end.
Best Regards,
Venkat
The new correct DM script will be (COPYMOVEINPUT replaced by 2 SELECTINPUT):
PROMPT(SELECTINPUT,%SOURCETIME%,,"Select Source Time","%TIME_DIM%") PROMPT(SELECTINPUT,%TARGETTIME%,,"Select Target Time","%TIME_DIM%") PROMPT(SELECTINPUT,%SELECTION%,,"Select Target Entity","%ENTITY_DIM%") INFO(%EQU%,=) INFO(%TAB%,;) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SOURCETIME%EQU%%SOURCETIME%%TAB%TARGETTIME%EQU%%TARGETTIME%) 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,%SELECTION%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY_VARIANCES.LGF)
Is it clear?
Hi Vadim,
Thanks again..
Please refer to the below link on our discussion earlier.
https://archive.sap.com/discussions/thread/3906049
Please see my DM advanced script below;
PROMPT(COPYMOVEINPUT,%SOURCETIME%,%TARGETTIME%,"Select the TIME members from to","%TIME_DIM%") PROMPT(SELECTINPUT,%SELECTION%,,"Select Target Entity","%ENTITY_DIM%") INFO(%EQU%,=) INFO(%TAB%,;) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SOURCETIME%EQU%%SOURCETIME%%TAB%TARGETTIME%EQU%%TARGETTIME%) 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,%SELECTION%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY_VARIANCES.LGF)
Please advise..
Please post scripts in the READABLE form! I have no time to copy paste and format scripts in notepad!
Sorry Vadim,
please see below;
PROMPT(COPYMOVEINPUT,%SOURCETIME%,%TARGETTIME%,"Select the TIME members from to","%TIME_DIM%") PROMPT(SELECTINPUT,%SELECTION%,,"Select Target Entity","%ENTITY_DIM%") INFO(%EQU%,=) INFO(%TAB%,;) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SOURCETIME%EQU%%SOURCETIME%%TAB%TARGETTIME%EQU%%TARGETTIME%) 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,%SELECTION%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY_VARIANCES.LGF)
I don't think that the script text with multiple lines on the same line is readable! Have you seen what you are posting????
First of all - incorrect primary tag! Please change it to
Second:
Your statements don't match each other:
"e.g. 2 Months data (Jan 2016 and Feb 2016) to Target for e.g. 1 Month (March 2016)"
And
"require to COPY ONE Month to Multiple Months"
Please explain once again!
Hi Vadim,
Thanks for your quick response. Apologies, my requirement is to COPY data from Multiple months to a single Month.
example. COPY Jan 2016 and Feb 2016 to MAR 2016 at the same time.
My script which I use currently which only can COPY Month to Month. Would it be possible to change something below to accommodate the above requirement pls?
*XDIM_MEMBERSET KIT=BAS(ALL_KI)
*XDIM_MEMBERSET COMPONENT=BAS(ALL_COM)
*XDIM_MEMBERSET INGREDIENT=BAS(ALL_ING)
*XDIM_MEMBERSET CURRENCY=USD
*XDIM_MEMBERSET DATASRC=INPUT
*XDIM_MEMBERSET MATG4=BAS(ALL_MATG4),NO_MATG4
*XDIM_MEMBERSET BRAND=BAS(ALL_BRAND),NO_BRAND
*XDIM_MEMBERSET LOCATION=%LOCATION_SET%
*XDIM_MEMBERSET TIME=$SOURCETIME$
*XDIM_MEMBERSET VERSION=A100
*XDIM_MEMBERSET COUNTRY=BAS(ALL_COUNTRIES),NO_COUNTRY
*XDIM_MEMBERSET KEYFIGURE=FOREX_PL,INV_IMP_PL
*WHEN TIME *IS * *REC(EXPRESSION=%VALUE%,TIME=$TARGETTIME$)
*ENDWHEN
You have to select source TIME dimension members using SELECTINPUT prompt in the DM advanced script.
The members will be passed to %TIME_SET% variable. Then:
*XDIM_MEMBERSET TIME=%TIME_SET%
Please show your DM advanced script
Have you seen it? IT'S NOT FINE!
Hi Vadim,
So sorry again, hope it is fine now..
PROMPT(COPYMOVEINPUT,%SOURCETIME%,%TARGETTIME%,"Select the TIME members from to","%TIME_DIM%") PROMPT(SELECTINPUT,%SELECTION%,,"Select Target Entity","%ENTITY_DIM%") INFO(%EQU%,=) INFO(%TAB%,;) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SOURCETIME%EQU%%SOURCETIME%%TAB%TARGETTIME%EQU%%TARGETTIME%) 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,%SELECTION%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY_VARIANCES.LGF)
Can't you see:
Sorry again, Please see below the right one now;
PROMPT(COPYMOVEINPUT,%SOURCETIME%,%TARGETTIME%,"Select the TIME members from to","%TIME_DIM%") PROMPT(SELECTINPUT,%SELECTION%,,"Select Target Entity","%ENTITY_DIM%")
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SOURCETIME%EQU%%SOURCETIME%%TAB%TARGETTIME%EQU%%TARGETTIME%) 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,%SELECTION%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPY_VARIANCES.LGF)
Still 2 lines are incorrect!
The script will correctly copy multiple months into SINGLE month!
... //PROMPT(SELECTINPUT,%SOURCETIME%,,"Select Source Time","%TIME_DIM%") *XDIM_MEMBERSET TIME=$SOURCETIME$ //$SOURCETIME$=multiple months selected ... *WHEN TIME *IS * *REC(EXPRESSION=%VALUE%,TIME=$TARGETTIME$) //$TARGETTIME$=SINGLE month selected *ENDWHEN