Skip to Content

Is there a BAPI for general SQL query

I wonder is there a BAPI which take a SQL as import parameter and return the result in a table´╝čor I have to write BAPI for each query I need? Thx.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Mar 13 at 06:55 AM

    There is a RFC-enabled function RFC_READ_TABLE that you might consider. Just go through SAP support noted on the function so you know its limitations and authorization concept.

    Otherwise there is no generic, all purpose, Swiss-army-knife BAPI that would allow to execute an arbitrary SQL query. That would be a gaping hole in the security.

    Best regards

    Dominik Tylczynski

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 13 at 07:27 AM

    If it is Web related, naybe you have to check this blog:

    https://blogs.sap.com/2016/04/06/expose-cds-views-as-odata-service/

    You will have some job to do, creating the CDS view (if the standard is not enough) and you could create a Odata service for each CDS (Rest).

    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.