Skip to Content
0

Replacement path using Query - How to filter based on values entered in main query?

Nov 18, 2016 at 02:23 AM

153

avatar image

Hi guys,

Just want to ask if there is a way to filter the query used in the replacement path (query) based on the values entered in the main query?

For example:

QUERY1 (main query) - FILTER TAB (doesn't have the SEGMENT field) - under DSO1

ZVAR_MONTH - variable for 0CALMONTH with MANUAL INPUT (interval)

ZVAR_COMPCODE - variable for 0COMPCODE with replacement path (using the QUERY2)

QUERY2 (sub query) - FILTER TAB - under DSO2

SEGMENT - filter to include "TEST" values only

ROWS/COLUMNS TAB

0COMP_CODE (jn ROWS)

With the queries above, my result in QUERY1 will be all the company codes under the SEGMENT "TEST". Right?

However, I have several data in my DSO2 so the query reads all the data just to get the values of company codes under segment "TEST". Thus, the QUERY1 runs SO SLOW, more than 30 mins just for a month data. Without the ZVAR_COMPCODE, the query runs under 5 minutes for 1 month of data.

I'm just wondering if there is a way to filter the QUERY2 using the values entered in QUERY1 for ZVAR_MONTH? So, if user entered 10/2016 in QUERY1, I wanted QUERY2 to read only the data under 10/2016 also and not the whole data of DSO2.

Is this possible?

Thank you.

Loed Despuig

10 |10000 characters needed characters left characters exceeded

Any idea guys?

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Diego Seben
Nov 24, 2016 at 09:22 PM
0

Hi Loed,

Take a look at the following for helping out here:

1385580 - How does a formula variable with a replacement path work?

https://wiki.scn.sap.com/wiki/display/BI/OT-OLAP+Formula+Variables

Thanks,
Diego Seben.

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

Hi,

I think you did not understand my question?

I was wondering if there is a way to filter my QUERY2 using the values entered in QUERY1.

Anyway thanks for your reply. ;-)

Any other idea guys?

Loed

0
seshu P Nov 25, 2016 at 11:07 AM
0
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Seshu,

I already applied same concept with the link you have posted. I already have the QUERY1 and QUERY2.

Right now, I was wondering if there is a way to filter my QUERY2 using the values entered in QUERY1.

So, if user entered 10/2016 in QUERY1, I wanted QUERY2 to read only the data under 10/2016 also and not the whole data of DSO2 since it will affect the query performance of QUERY2.

Hope you get my explanation.

Thank you.

Loed

0