on 02-13-2018 7:18 PM
Hi gurus,
I calling a BADI thru a DM that we have modified to not ask the user any prompts. The .LGF within the DM that contains the *START/END_BADI is not the default one since we need to see the data saved in the system before we call the BADI to run its logic. The problem I have is that when I click on the Macros that runs the DM there is no parameters or variables passed since there is no prompts to select from. All the DM does is pretty much just execute the .LGF that calls the BADI and therefore the BADI takes all the members and all dimensions when running and we just want it to run for the parameters (members) from the current report context. How can I achieve this requirement? Please advise.
"the BADI takes all the members and all dimensions when running and we just want it to run for the parameters (members) from the current report context" ??? - BADI know nothing about report context 🙂
"we have modified to not ask the user any prompts" - bad idea!
You can use vba to call DM and to pass parameters to DM: https://blogs.sap.com/2017/06/16/simple-vba-function-to-pass-parameters-to-dm-packages/
You can pass context scope using this VBA code (pass SELECTION variable).
Then the script will have the report scope and BADI can read the current scope.
P.S. Another option is to use PROMPT(SELECTINPUT... parameter to get a current scope, but the user will need to press extra keys.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim, Thanks for the fast response. Do you have a different link than the one on your response, that one says "We are sorry, but the site you are looking for is temporarily out of service" Thanks
Please try again later!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, Vadim. I do, I am actually also working on a VBA code to pass the selection variables with macros. I truly appreciate your help.
one more thing thou, since modifying a standard DM prompts is not such a good Idea, which Data Package Manager would you recommend using? since I do not need any transformation file being loaded.
"since modifying a standard DM prompts is not such a good Idea" ??? What do you mean?
To run some script logic you have to use new DM package based on the chain:
/CPMB/DEFAULT_FORMULAS
instead of
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
use the list of dimensions in your model.
In my blog you will see how to pass %SELECTION% variable using VBA.
User | Count |
---|---|
10 | |
3 | |
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.