Hello,
I have the following requirement:
In a script a BAdI is triggered with a certain selection.
*XDIM_MEMBERSET AUDITTRAIL = MANUAL_DISTR
*START_BADI DISTRIBUTION
*END_BADI
To start the Logic script a data manager package was created.
PROMPT(SELECTINPUT,,,,"%ACCOUNT_DIM%,%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
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,DISTRIBUTION_MONTH.LGF)
Now we have different plants. Each plant has a team assigned. In each team folder a data manager package should be included with a predefined selection for dimension PLANT.
As I did not find a possibility to change the %SELECTION% variable, I tried the approach described in the EPM User Guide
41.4.1.5.2.2 Dynamically Passing Text to Logic
You can dynamically pass text to logic as follows:
1. You use the PROMPT commant to prompt the user for a value to pass to a logic file, for example,PROMPT(TEXT,%TEXT%,"select a year")
2. Use the %TEXT variable to pass the returned value to the package for example, to return the value of the %TEXT% variable to the package:TASK(RUNLOGIC,FORMULASCRIPT,"*FUNCTION MYYEAR=%TEXT%”)
3. In the Data Manager logic, use the dynamically created function as follows: *XDIM_MEMBERSET TIME=MYYEAR.INPUT
I changed my data manager script as follows:
PROMPT(SELECTINPUT,,,,"%ACCOUNT_DIM%,%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
INFO(%PLANT%,"0150")
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(RUNLOGIC,FORMULASCRIPT,"*FUNCTION PLANT_SEL=%PLANT%”)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,DISTRIBUTION_MONTH.LGF)
I also tried different versions for
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,FORMULASCRIPT,"*FUNCTION PLANT_SEL=%PLANT%”)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,DISTRIBUTION_MONTH,"*FUNCTION PLANT_SEL=%PLANT%”)
etc.
I always receive the message
Failed to analyze instruction RUNLOGIC,DISTRIBUTION_MONTH.LGF,"*FUNCTION PLANT_S...
or
Cannot configure parameter FORMULASCRIPT in task /CPMB/DEFAULT_FORMULAS_LOGIC
Can anyone guide me to the correct use of this script?
Or are there any better approaches to set the value for dimension PLANT within the data manager package?
Thanks in advance!
Steve