cancel
Showing results for 
Search instead for 
Did you mean: 

Steps t o create a prequery

Former Member
0 Kudos
73

Hi, everybody,

I would like to know the process to create a prequery for my query. Could any one give me some documents or ideas?

Thanks in advance and a Happy New Year!!!

xiaoxuan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Xiaoxuan,

A prequery should consist of all the data from which the other query can take values from it. For example if you have a query which is executed for all the company codes, then it can act as prequery for a query which is executed for a particular company code.

Hope this helps you......

Former Member
0 Kudos

Thanks for the reply.

So I should add a variable in the InfoObject Company code?

It is a variable with processing type 'replacement", and I should restrit the company code to the variable?

It that the method to realise it?

Former Member
0 Kudos

Hi Xiaoxuan,

Pre-query also called as control query. We use this in generating precalculated queries using reporting agent. For example u have a base query (Q1)with 100 company codes, but if u want to generate 100 single queries (one for each company code) based on main base query then ...

Then create Query Q2 with company code variable, restrict to specific comp code & save that as variant.--> in reporting agent U can split the main query Q1 based on Q2 & it's variant..

Hope it helps..

Ramesh

Former Member
0 Kudos

Thanks for the replies. I had a based query A which runs all the result for the sales of different kind of materials. And I would like to run another query B to show only those materials with sales more than 1000K€ last year. I create a variable of 0Material in query A. How should i continue to realise this scenario?

Thanks

Former Member
0 Kudos

Hi Xiaoxuan,

In Query A try to use result of Quaery B(material values) as replacement path.

Hope it helps..

Regards,

Ramesh

Former Member
0 Kudos

Hi, Ramesh,

thanks for the reply.

But the order is reverse or not? As A is the prequery for B, so I should use the result of A in Query B as replacement path?

Former Member
0 Kudos

Hi Xiaoxuan,

As you want to restrict Result of Query A(sales query), based on some condition in Query B(>1000). So you should treat result of B as pre-query to A.

Regards,

Ramesh

Former Member
0 Kudos

For your requirement, I guess you may need to do the following.

1) Create a calculated key figure where you restrict the key figure > 1000.

For example: 0amount > 1000 * 0amount.

2) Clone the base query and use the calculated key figure and suppress Zeros in the display option.

Viswa

(Assign points if helpful)

Former Member
0 Kudos

Dear all,

thanks for your replies.

I solved my problem. I created the condition(>1000) for the key figure in my prequery.

Answers (0)