cancel
Showing results for 
Search instead for 
Did you mean: 

Result of a query as a prompt of a second one

Former Member
0 Kudos


Hello,

I want to have in one Excel File, two queries.

I want to use the result of the first query as a prompt of the second one.

It is possible in Analysis for Office ?

Thanks a lot.

Regards,

Hamza

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hamza,

a second option would be to do it with custom VBA.

1) disable variable merging

2) disable the second query in the inital start

3) execute the 1st Query

4) with the "after redisplay"-event you catch the point after the first Query was done

5) with "SAPGetData" you can crap the information you need

6) with "SAPSetVariable" you can set the value to the second Query

7) with "SAPExecuteCommand,Refresh,DS_2" you can refresh the second Query as well

that should help you


Regards

Thorsten

Answers (3)

Answers (3)

IngoH
Active Contributor
0 Kudos

Hi,

using a query as a resultset for a prompt of a second query is a replacement path in the BEx query designer.

regards

Ingo Hilgefort, SAP

Former Member
0 Kudos

Hi Hamza,

what Thorsten describes is the best solution --> read the Help, there you will find the definitions of the functions.

If you want to open the prompt window of the second query, (with filled variables), you must be sure, your users are at least on AO 1.4.4 --> http://scn.sap.com/docs/DOC-51321

Variable prompt via VBA is not available in earlier Versions.

Regards, Martin

TammyPowlas
Active Contributor
0 Kudos

This sounds like RRI (report-to-report interface)

Please be sure you are searching your questions prior to posting per SCN guidelines.

Thank you