cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter Measures in DM?

former_member187255
Active Contributor
0 Kudos

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.

Accepted Solutions (0)

Answers (8)

Answers (8)

former_member186338
Active Contributor

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!

former_member186338
Active Contributor

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!

former_member186338
Active Contributor

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


former_member187255
Active Contributor
0 Kudos

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.

former_member186338
Active Contributor

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!

former_member187255
Active Contributor
0 Kudos

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.



former_member186338
Active Contributor
0 Kudos

"My company did not updated BPC because of the budget issues." - budget??? How it's related??? The upgrade is free!

Memory issue is related to your badi! You are doing some crazy things... Sorry!

former_member187255
Active Contributor
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

"Upgrade from BPC 7.5 to 10 is free..?" - yes, it's free, and it's a well known fact!

For YTD - try to minimize scope for other dimensions to test!

former_member186338
Active Contributor
0 Kudos

Sorry, but why I have to spend my time? You haven't upvoted any of my answers or liked any of my comments!

former_member187255
Active Contributor
0 Kudos

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.


former_member186338
Active Contributor
0 Kudos

Is it a joke???

I see the same incorrect line:

TASK(ZBPC_TEST,MEASURES,%MEASURES%)

And I don't see

*XDIM_MEMBERSET MEASURES=$M$

before *START_BADI ...

And I see also unsupported line in the body of badi call:

*REC(EXPRESSION=[MEASURES].[YTD])

What are you doing??

former_member187255
Active Contributor
0 Kudos

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 ...

capture.jpg

Please don't take me wrong ....I was trying different options to get the YTD data into BADI .......

former_member186338
Active Contributor
0 Kudos

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!

former_member187255
Active Contributor
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

Even in this post number of lines has no line breaks! Sorry, but looks like it's not possible to help you!

former_member187255
Active Contributor
0 Kudos
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..

former_member186338
Active Contributor
0 Kudos

If you don't want to provide full info I will not answer!

former_member187255
Active Contributor
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

Sorry, but you are not providing full info!

How can I help you?

Where is your final advanced script?

Where is you script logic text???

Asking the same questions again and again... 😞

former_member187255
Active Contributor
0 Kudos

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.