What's kind of query ?
About BW : http://help.sap.com/saphelp_bw31/helpdata/en/a9/71563c3f65b318e10000000a114084/frameset.htm
Message was edited by: Jerome FORTIAS
Here is a suggestion on how to show the (SQ01) SAP Query output (list) on the web using BSP. This approach can also be used to display any report list using BSP.
Write a BSP to carry-out the following...
1. Get the name of the Report for a given SAP Query using Function module 'RSAQ_REPORT_NAME' (pass the Usergroup & Query name).
2. If the report is already not generated use 'RSAQ_GENERATE_PROGRAM' function module to generate it.
3. Now, we are going to execute the Report and store the output List in the memory. Use the following statement to do that.
"SUBMIT (l_report) AND RETURN EXPORTING LIST TO MEMORY"
where l_report is the name of the report got from step 1.
If needed, pass necessary parameters to the query report.
4. Download the list from memory into an internal table.
"CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES LISTOBJECT = it_listobject"
5. Now, convert the list to HTML format.
"CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING REPORTNAME = l_report
TABLES HTML = it_html
LISTOBJECT = it_listobject"
6. Concatenate the html stored in the internal table (it_html) to a single string (html_stream). If needed, manipulate it as you wish.
7. Finally, set the response cdata to this html stream.
"CALL METHOD SERVER->RESPONSE->SET_CDATA( DATA = html_stream )."
Hope it is helpful...
Regards,
Venky Varadadesigan
SAP Netweaver consulting.
Add a comment