Skip to Content
0

How to filter Measures in DM?

Apr 25 at 09:08 PM

43

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

8 Answers

Vadim Kalinin Apr 26 at 06:38 AM
1

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


Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Apr 26 at 02:55 PM
1

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!

Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Apr 26 at 05:22 PM
1

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!

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 26 at 02:47 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 26 at 03:24 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Vadim Kalinin Apr 26 at 03:50 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 26 at 04:01 PM
0

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.


Show 6 Share
10 |10000 characters needed characters left characters exceeded

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

0
Former Member

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

capture.jpg (29.2 kB)
0

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!

0
Former Member

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.

capture.jpg (29.2 kB)
0

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

0
Former Member
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..

capture.jpg (29.2 kB)
0
avatar image
Former Member Apr 26 at 05:56 PM
0

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.

Show 6 Share
10 |10000 characters needed characters left characters exceeded

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!

1
Former Member

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.



0

"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!

0
Former Member

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.

0

"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!

0

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

0