Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Single program to execute several queries

0 Likes
870

Hi guys

I have two queries that I have created in SQ01. Both queries have PRPS-PSPHI as a selection parameter and have variants with output into private files.

The above works just fine.

What I would like to do is execute a single program that calls both queries with just one selection screen.

Is that somehow possible?

BR
Stefan

P.S. I have located the FM RSAQ_QUERY_CALL that might be usefull?

1 ACCEPTED SOLUTION
Read only

Sijin_Chandran
Active Contributor
0 Likes
742

Hi Stefan ,

Am not sure about FM RSAQ_QUERY_CALL , but I think that you can use SUBMIT command to accomplish your task.

When you execute your Query from SQ01 , selection screen appears just check the program name from System > Status.

The name usually is alpha numeric and a bit long.

I think you can use SUBMIT command with Variant option to call this from another program.

eg : SUBMIT AQZZ/GRC/APPL===FI_AP_21_Q1=== USING SELECTION-SET variant.


3 REPLIES 3
Read only

Sijin_Chandran
Active Contributor
0 Likes
743

Hi Stefan ,

Am not sure about FM RSAQ_QUERY_CALL , but I think that you can use SUBMIT command to accomplish your task.

When you execute your Query from SQ01 , selection screen appears just check the program name from System > Status.

The name usually is alpha numeric and a bit long.

I think you can use SUBMIT command with Variant option to call this from another program.

eg : SUBMIT AQZZ/GRC/APPL===FI_AP_21_Q1=== USING SELECTION-SET variant.


Read only

0 Likes
742

Hi Sijin

That seems to work just fine!

Thanks!

Read only

RaymondGiuseppi
Active Contributor
0 Likes
742

For information on RSAQ_QUERY_CALL and more recent IQAPI_QCALL, read Note 393160 - SAP Query: Using queries

You could also generate program name (and insure it is generated in a transport target system or after an upgrade, database change, etc.) with RSAQ_CREATE_QUERY_REPORT, then SUBMIT the returned program WITH parameters or selection set.

Regards,

Raymond