on 04-25-2018 10:08 PM
I am trying to call a BADI using the custom DM package. I want to filter Measures but system is giving error.. Below is the script.
PROMPT(MEASURELIST,%MEASURES%,"Please select measures") PROMPT(SELECTINPUT,%SELECTION%,,"Please select both Previous Year and Current Year Periods","TIME") INFO(%CATEGORY%,DIMENSION:CATEGORY|ACTUAL|) INFO(%DATASRC%,DIMENSION:DATASRC|SAP_INPUT|) INFO(%RPT_CURRENCY%,DIMENSION:RPT_CURRENCY|USD|)
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(ZBPC_TEST,TAB,%TAB%)
TASK(ZBPC_TEST,EQU,%EQU%)
TASK(ZBPC_TEST,SUSER,%USER%)
TASK(ZBPC_TEST,SAPPSET,%APPSET%)
TASK(ZBPC_TEST,SAPP,%APP%)
TASK(ZBPC_TEST,MEASURES,%MEASURES%) TASK(ZBPC_TEST,SELECTION,%SELECTION%%CATEGORY%%DATASRC%%RPT_CURRENCY%)
TASK(ZBPC_TEST,LOGICFILENAME,ZBPC_TEST.LGF)
In the Process Chain i did defined as below.
TAB
SUSER
SELECTION
SAPPSET
SAPP
REPLACEPARAM
MEASURES
LOGICFILENAME
EQU
Error is "Cannot configure parameter MEASURES in task ZBPC_TEST".
Need help on fixing the issue.
Just tested in my system:
*XDIM_MEMBERSET MEASURES=$M$
*START_BADI EXPORTSQL
QUERY=OFF
WRITE=OFF
DEBUG=ON
CONNECTION=XXX
*END_BADI
Validated and saved without issues!
As I already told you - full info has to be provided!
What is your BPC and BW version/SP? The error you have may happen on VERY old SP's
Also you can save script even without validation and it will work!
Also I recommend to replace:
PROMPT(MEASURELIST,%MEASURES%,"Please select measures")
with
PROMPT(COMBOBOX,%MEASURES%,"Select MEASURE:",0,YTD,{YTD,PERIODIC})
to ensure that ONLY ONE MEASURE will be selected by user!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but you are asking me about some solutions without explaining the required logic!!!
What do you want to achieve???
For example, if you want user to select ONLY one measure: YTD or PERIODIC
You can use COMBOBOX prompt in advanced script with 2 text values: YTD,PERIODIC
The result of combobox you can pass to the same $M$ variable.
In the script before badi you can use *XDIM_MEMBERSET MEASURES=$M$
And the badi ct_data will be filled with the selected measure.
Again: logic is not clear!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of TASK(ZBPC_TEST,MEASURES,%MEASURES%)
try:
TASK(ZBPC_TEST,REPLACEPARAM,M%EQU%%MEASURES%)
in the script logic you will use $M$ variable with measures!
and strange idea to use custom chain ZBPC_TEST instead of standard /CPMB/DEFAULT_FORMULAS_LOGIC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your time and reply Vadim.
We are on BPC 7.5 and SP 15. BW 7 and SP 11.
Let me save the script and try running it. I will update you ...
I will change the PROMPT to select only one measure as per your suggestion.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For BPC 7.5 it's possible to have validation error! Just save and try!
Debug your custom logic badi to see what you have in ct_data. You may have different things compared to the recent version of BPC 10.1
P.S. BPC7.5 SP15 is very old even for BPC 7.5
Looks like you don't want to keep the system up to date!
My company did not updated BPC because of the budget issues.
Even after the validation error. I tried executing the DM Package but sytem is running into out of memory issues.
Basis team is looking into it to increase the memory. Its not even going to CUSTOM_LOGIC.
Do you think we have any other way to work it out.
Thanks.
Upgrade from BPC 7.5 to 10 is free..?
When i pass Periodic measure as parameter system is returning in few seconds but when i pass YTD system is failing with memory issues.
System is not even going upto ct_data where my custom logic exist. System is failing before it reaches the custom logic.
Vadim,
Here is the full info
Advanced Script and Process Chain
PROMPT(MEASURELIST,%MEASURES%,"Please select measures") PROMPT(SELECTINPUT,%SELECTION%,,"Please select both Previous Year and Current Year Periods","TIME") INFO(%CATEGORY%,DIMENSION:CATEGORY|ACTUAL|) INFO(%DATASRC%,DIMENSION:DATASRC|SAP_INPUT|) INFO(%RPT_CURRENCY%,DIMENSION:RPT_CURRENCY|USD|)
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(ZBPC_TEST,TAB,%TAB%)
TASK(ZBPC_TEST,EQU,%EQU%)
TASK(ZBPC_TEST,SUSER,%USER%)
TASK(ZBPC_TEST,SAPPSET,%APPSET%)
TASK(ZBPC_TEST,SAPP,%APP%)
TASK(ZBPC_TEST,MEASURES,%MEASURES%) TASK(ZBPC_TEST,SELECTION,%SELECTION%%CATEGORY%%DATASRC%%RPT_CURRENCY%)
TASK(ZBPC_TEST,LOGICFILENAME,ZBPC_TEST.LGF)
In the Process Chain i did defined as below.
TAB
SUSER
SELECTION
SAPPSET
SAPP
REPLACEPARAM
MEASURES
LOGICFILENAME
EQU
In the Script
*START_BADI ZBPC_TEST
QUERY = ON
WRITE = ON
*REC(EXPRESSION=[MEASURES].[YTD])
PYEAR = $PYEAR$
CYEAR = $CYEAR$
*END_BADI
As mentioned I am trying to extract the YTD data by passing periods in DM pacakge. In BADI once i get the data in CT_DATA i am creating a CSV file. Currently i am able to get the Periodic data and able to create CSV file.
Please help me on how we can extract YTD data. Do we need to write custom abap logic to for YTD ???
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Very Sorry Vadim,
I did copied the wrong one.. below are the changes as you mentioned
PROMPT(MEASURELIST,%MEASURES%,"Please select measures") PROMPT(SELECTINPUT,%SELECTION%,,"Please select both Previous Year and Current Year Periods","TIME") INFO(%CATEGORY%,DIMENSION:CATEGORY|ACTUAL|) INFO(%DATASRC%,DIMENSION:DATASRC|SAP_INPUT|) INFO(%RPT_CURRENCY%,DIMENSION:RPT_CURRENCY|USD|) INFO(%EQU%,=) INFO(%TAB%,;) TASK(ZBPC_TEST,TAB,%TAB%) TASK(ZBPC_TEST,EQU,%EQU%) TASK(ZBPC_TEST,SUSER,%USER%) TASK(ZBPC_TEST,SAPPSET,%APPSET%) TASK(ZBPC_TEST,SAPP,%APP%) TASK(ZBPC_TEST,REPLACEPARAM,M%EQU%%MEASURES%) TASK(ZBPC_TEST,SELECTION,%SELECTION%%CATEGORY%%DATASRC%%RPT_CURRENCY%) TASK(ZBPC_TEST,LOGICFILENAME,ZBPC_TEST.LGF)
I get below error when i use
*XDIM_MEMBERSET MEASURES=$M$
before *START_BADI ...
Please don't take me wrong ....I was trying different options to get the YTD data into BADI .......
Sorry, but if you are not able to prepare post without mistakes then how can I help you?
Look on your last post:
1. No line breaks in the advance script - you are not looking on your post results!
2. Incorrectly used "Insert File" instead of correct "Insert Image"
Please correct if you want to continue!
Too many mistakes 😞
Here is the advanced script
PROMPT(MEASURELIST,%MEASURES%,"Please select measures")
PROMPT(SELECTINPUT,%SELECTION%,,"Please select both Previous Year and Current Year Periods","TIME")
INFO(%CATEGORY%,DIMENSION:CATEGORY|ACTUAL|)
INFO(%DATASRC%,DIMENSION:DATASRC|SAP_INPUT|)
INFO(%RPT_CURRENCY%,DIMENSION:RPT_CURRENCY|USD|) INFO(%EQU%,=) INFO(%TAB%,;)
TASK(ZBPC_TEST,TAB,%TAB%) TASK(ZBPC_TEST,EQU,%EQU%) TASK(ZBPC_TEST,SUSER,%USER%)
TASK(ZBPC_TEST,SAPPSET,%APPSET%) TASK(ZBPC_TEST,SAPP,%APP%)
TASK(ZBPC_TEST,REPLACEPARAM,M%EQU%%MEASURES%)
TASK(ZBPC_TEST,SELECTION,%SELECTION%%CATEGORY%%DATASRC%%RPT_CURRENCY%)
TASK(ZBPC_TEST,LOGICFILENAME,ZBPC_TEST.LGF)
I am not able to validate the script when i added the below code.
*XDIM_MEMBERSET MEASURES=$M$
Error Screenshot below.
Thanks.
PROMPT(MEASURELIST,%MEASURES%,"Please select measures")
PROMPT(SELECTINPUT,%SELECTION%,,"Please select both Previous Year and Current Year Periods","TIME")
INFO(%CATEGORY%,DIMENSION:CATEGORY|ACTUAL|)
INFO(%DATASRC%,DIMENSION:DATASRC|SAP_INPUT|)
INFO(%RPT_CURRENCY%,DIMENSION:RPT_CURRENCY|USD|)
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(ZBPC_TEST,TAB,%TAB%)
TASK(ZBPC_TEST,EQU,%EQU%)
TASK(ZBPC_TEST,SUSER,%USER%)
TASK(ZBPC_TEST,SAPPSET,%APPSET%)
TASK(ZBPC_TEST,SAPP,%APP%)
TASK(ZBPC_TEST,REPLACEPARAM,M%EQU%%MEASURES%)
TASK(ZBPC_TEST,SELECTION,%SELECTION%%CATEGORY%%DATASRC%%RPT_CURRENCY%)
TASK(ZBPC_TEST,LOGICFILENAME,ZBPC_TEST.LGF)
I am not able to validate the script when i added the below code.
*XDIM_MEMBERSET MEASURES=$M$
Error Screenshot below.
Please help..
If you don't want to provide full info I will not answer!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
I am trying to extract the YTD data into BADI to create a CSV file. I did hardcoded rest of the values but not sure how to work on Measures.
As mentioned in the script before badi i tried using *XDIM_MEMBERSET MEASURES=$M$... system throws error "Invalid Measures Value:INVALID MEASURES VALUE"$M$""
I tried *REC(EXPRESSION=[MEASURES].[YTD]) but still didn't work.
Can you please help on this issue.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vadim Kalinin for your time and reply.
I tried TASK(ZBPC_TEST,REPLACEPARAM,M%EQU%%MEASURES%) this working in passing the parameter to script and to BADI but how to get the YTD values in BADI?
Do we need to calculate YTD values in BADI through abap code? How can we calculate ?
Yeah its strange ..somehow i started and created a custom BADI..
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
3 | |
2 | |
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.