cancel
Showing results for 
Search instead for 
Did you mean: 

What is a Nested Query

Former Member
0 Kudos

Hi,

What is a nested query? Can anyone give me an example of how to create a nested query? Please expain me in detail with an example?

Thanks

Rani

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI

Please have a look at the below url for more clarity on Replacement path variable( to use one query result in another query as a parameter)

https://www.sdn.sap.com/irj/sdn/advancedsearch?query=replacementpathvariable&cat=sdn_all

Thanks,

Teja

chemicala_srimallikarjuna
Active Contributor
0 Kudos

Hi,

nested query is like one querys result is used as a input to second query.it is sort of a replacement path char variable filled by a query result is used for a char restriction in one query. Restriction is somewhat like Top N. Returned set of values is used for a restriction in the 2nd query.

Assume that in Query X, a characteristic A returns values 1,2,3. (Master data of A may be 1,2,3,4.....)

In another Query Y, you want to restrict char A to only those values that are returned in Query X, in our example its 1,2 & 3. To achieve this, you will create a replacement path variable on char A in Query Y, in the process it will ask you to give the query name, which will be Query X

For nested "If "condition in Bex Formula's:

http://help.sap.com/saphelp_nw2004s/helpdata/en/23/17f13a2f160f28e10000000a114084/frameset.htm

Regards

CSM Reddy

Former Member
0 Kudos

Hi,

Can you please explain me in a detailed way with an example. You said that the result of the first query is used as the entry values for a second query.

Can you give an example clearly.

Thanks

Rani

chemicala_srimallikarjuna
Active Contributor
0 Kudos

Hi,

For example, a query that is displaying nothing else than some documents numbers based on restrictions you made in the query. Now, in another query create a variable with replacement path for the document number and enter the first query as the source. Use the variable in your second query for restricting the document numbers to the result of the first query.I think, you can chk the example given earlier.

Regards

CSM Reddy