Get value from a query in a different query

Question: Hello,

I have a workbook with 2 queries from different Infocubes.
One of the rows of Query A should be equal to a row of query B.
This row on Query A is to be used on further row formulas.

How can I get these values from Query B into Query A?

Please note that each column of the row is made of different time selections.
To create a MultiProvider is not an option right now.

Thanks in advance.

Answer:
Based on the limited amount of information you have provided, three possible options come to mind:

1) Use Query A as a "prequery" for Query B;
2) Jump from Query A to Query B using RRI; or
3) Use the Analysis Process Designer to create a "virtual" datasource for Query B.

Without more details, it is difficult to know whether any of these will work for your situation.

Hope this helps...

Bob

Answer:
Bob

Can you kindly clarify how we implement option 1 and 3:

1) Use Query A as a "prequery" for Query B

what do you mean use Query A as a prequery

3) Use the Analysis Process Designer to create a "virtual" datasource for Query B.

How is it possible to create a datasource for APD

Thanks

Answer:
Both of these topics are too broad to discuss in detail here, but I'll try to give you some more "clues":

1) Search SAP Help documentation for "prequery". This can be a very powerful technique, where the result set for a variable of one query can be filled at run-time by the results of another query.

3) APD allows you to fill a transactional ODS with the output of multiple datasources (e.g., joining two or more queries, etc.). In particular, it can do a "left outer join" operation, which is very handy. I am certainly not an expert on this, but I am experimenting with this approach now and it looks promising for those cases where we are currently using Excel functionality to combine the results of two or more queries.

BTW, my earlier post was not quite correct. The transactional ODS is not "virtual". It must be created as a new ODS first, then chosen as the data target of the APD process output.

Hope this helps...

Bob

Answer:
Hello,

Thanks for your replies.

Cant find the topyc "prequery" on the help documentation.
I am on BW version 3.1 (content 3.3)

Regards

Answer:
After further check I tryed to use Pre-Query.
However, I could not get my result. This is because my query definition is as per bellow:

Query A:
1. rows definition: Cost Centre & Cost Element restrictions hardcode in each row;
2. Columns definition: Structure with several Restricted Key Figures made of a combination of Period/Year; Actual/plan; Plan verion; etc. This means that I have a structure with e.g.
Feb YTD - Actual;
Feb MTD Actual;
Feb YTD Plan, etc etc

Query B:
The query from where I want to get the results has:
1. row - only one row with Internal order & Cost Element restriction
2. Columns - same column struture explained above

I have done the following:
1. I have created a replacement path type variable for cost centre and entered Query B (Internal Order)
2. On Query A, where I want to get the Query B results, I have created a row and defined the cost centre replacement path define above.
3. I get the error message that this variable cannot be used with struture.

Conclusion: Although I would may have further issues with this solution, I believe I can say that I cant use this solution because I have a structure on these queries and I don't want to get only one value but several values as per the column structure.
Is this correct?

Thanks in advance

Answer:
Yes, it sounds like prequery is not a good solution for your problem.

Unfortunately, since you are on 3.1, APD is not an option either, since it first becomes available in 3.5, as I recall.

Creating a MultiProvider or some other combination of data sources on the backend seems to be your only option left.

Hope this helps...

Bob

Answer:
Hi all,
Analysis Process Designer is available since 3.0B via Tcode:

rsanwb
_________________
Mohammed
Montreal
Copyright ?2007 - 2008 www.jt77.com