on 2015 Mar 12 10:28 AM
Hi guys,
Question:
is it possible to pass through a parameter of a freely defined variable (that is not referring to a dimension) from a Data Manager Package to a BADI?
Idea:
The idea is to set a tick box as part of the Data Manager Parameters and pass this ON / OFF parameter to the BADI in order to control the execution of the program code.
Example:
The DMP includes the variables STEP_1 and STEP_2. Both variables can be activated (via tick box) - in our case only STEP_1 gets the tick, STEP_2 remains initial (unticked).
Upon release of the DMP, both parameters (STEP_1 = ON, STEP_2 = OFF) get passed through via the process chain and script logic to the BADI, which consists of two processing steps. Program-Step 1 and Program-Step 2.
Upon runtime,
- the BADI checks the parameter for the variable STEP_1 and processes Program-Step 1 since the parameter is set to ON,
- whilst process Program-Step 2 won't get processed since the parameter for variable STEP_2 is OFF.
Thanks for your input
Cheers
Claus
Request clarification before answering.
Hi Claus,
Question: - Answer - Yes!
No issues
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks heaps, Vadim!
Just allow two more questions:
(1) Apparently, it is not possible to combine multiple CHECKBOX prompts in one DM page. Is that correct from your point of view or am I missing something?
(2) When introducing the DM Prompts and hence %variables%, is there anything to declare in the DEFAULT_FORMULA - process chain, or is ist just sufficient to reference these variables in the script logic as outline in your answer?
Cheers
Claus
1. Just test... RADIOBUTTON also can be used!
2. If you use PROMPT to store some user selected text in %VAR1%, %VAR2% then you have to use something like:
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,VAR1%EQU%%VAR1%%TAB%VAR2%EQU%%VAR2%)
Then in script you will be able to use $VAR1$, $VAR2$
Vadim
Hi Vadim,
sorry - I need to come back to you once more.
Unfortunately, I cannot get this Checkbox Parameter passed through to the BADI.
--------------------------------------------------
What have I done? (Variable name = %GUESS_A%)
DMP:
PROMPT(CHECKBOX,%GUESS_A%,Guess A)
Process Chain /CPMB/DEFAULT_FORMULAS_LOGIC Step Run Logic :
no change
Script Logic:
*START_BADI XYZ
...
QUERY = ON
WRITE = ON
GUESS_A = (%GUESS_A%)
...
*END_BADI
----------------------------------------------------
I don't know what's missing, however could imagine that some declaration in the Process Chain Step might be missing. (DMP calls Process Chain, Process Chain calls Script Logic, Script Logic calls BADI)
Could it be that the variable %GUESS_A% needs to be declared in the Run_Logic parameters?
And / or is there a task missing in the DMP?
Thanks for your time, Vadim!
Cheers
Claus
Sorry, but looks like you have incorrect DM advanced script and incorrect script logic!
Please provide full DM advanced script!
Look on CHECKBOX syntax - the variable will contain only 0 or 1:
CHECKBOX Prompt() Command - SAP BusinessObjects Planning and Consolidation - SAP Library
Script Logic:
*START_BADI XYZ
...
QUERY = ON
WRITE = ON
GUESS_A = $GUESS_A$
...
*END_BADI
Variable in $$!!
Vadim
Hi Vadim,
same result, still can't get it to work:
What's been passed trhough to the BADI's IT_PARAM is
based on selections ACT für Category_KD and 2014.01 for TIME_KD.
The thing is that the parameter for GUESS_A reads $GUESS_A$ and not '1' as assumed based on the Tick Box selection parameter:
DMP "EXECUTE_SPLIT_GUESS_KD":
(SELECTINPUT,,,,"%CATEGORY_DIM%,%TIME_DIM%")
(CHECKBOX,%GUESS_A%,Guess A,1)
(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,EXEC_SPLIT_GUESS.LGF)
Process Chain /CPMB/DEFAULT_FORMULAS_LOGIC Step Run Logic :
Script Logic "EXEC_SPLIT_GUESS.LGF":
//The first step is the scope setting
*XDIM_MEMBERSET CATEGORY_KD = %CATEGORY_KD_SET%
*XDIM_MEMBERSET DATEN_TYP_KD = INPUT_KEY, BASIS_VALUE
*XDIM_MEMBERSET TIME_KD = %TIME_KD_SET%
*START_BADI KD_SPLIT
CATEGORY_KD = (%CATEGORY_KD_SET%)
TIME_KD = (%TIME_KD_SET%)
QUERY = ON
WRITE = ON
GUESS_A = $GUESS_A$
*END_BADI
Thanks again for your valueable ideas and help!
Really appretiate it!
Claus
Something like:
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%TIME_DIM%")
PROMPT(RADIOBUTTON,%GUESS_A%,"Select whether to perform step A",1,{"Yes","No"},{"ON","OFF"})
PROMPT(RADIOBUTTON,%GUESS_B%,"Select whether to perform step B",1,{"Yes","No"},{"ON","OFF"})
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,GUESS_A%EQU%%GUESS_A%%TAB%GUESS_B%EQU%%GUESS_B%)
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,EXEC_SPLIT_GUESS.LGF)
Vadim
User | Count |
---|---|
5 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.