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

Function module to call existing query SQ07

Former Member
0 Likes
1,726

Dear Gurus

I have a question regarding the possibility to call query from FM

I need in my program to call exising SAP Query and got the result

(I need to put the result in file first modyfining it etc etc)

So is there any FM that allows to call query and got the result of this query

to be able to do something with this result in my Z-program?

Best regards

Bogumila

1 REPLY 1
Read only

Former Member
0 Likes
806

Hi,

Whenever query is created in SQ01 a report program will be created.In Z program you can call this report to execute query.

For finding the report name in your program use FM RSAQ_REPORT_NAME provide Query name and User group to this FM.

Which will export REPID which has report name.

Now you can SUBMIT repid in order to execute the report.

Hope it helps,

Shanmugavel Chandrasekaran