Skip to Content
author's profile photo Former Member
Former Member

Calling SAP Query from BSP

Hello ,

i've a question concerning SAP Query and BSPs. Is there a possibility to call a SAP Query from a BSP, and to display the Output ?

Thanks for your help

Daniel Mitschke

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 05, 2004 at 09:43 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 06, 2004 at 06:30 PM

    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
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.