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

Ways to build BAPI/RFC data packet at runtime


In a traditional .NET based SAP client application, one simply generates the proxy code for the BAPIs in question. This works well for most scenarios as the BAPIs/RFCs to be called are known up front. However, for the application that I am working on, we do not know the RFCs/BAPIs that a customer has. I am looking at ways to invoke any arbitrary RFC in a generic way. I would appreciate it if you can share your ideas with me.

From the SAP interface repository, each BAPI is accompanied by a XML schema and template. I am wondering if I can use this to my advantage. Given an XML schema for a BAPI, I can create the needed XML data on the fly. The question is, is there some other RFC I can use to pass the name of the BAPI along with the XML data?

Thank you in advance for sharing your thoughts with me.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Feb 22, 2005 at 08:07 AM

    Sure, if you only needs to support SAP NetWeaver (or 6.20 based) systems, you can use pure XML techniques to build dynamic invoke. E.g. you can use the following strategy:

    - Get WSDL or XML schema from NetWeaver server, your NetWeaver XI Repository or the generic

    - Use Microsoft's WSDL or XSD classes to create a CodeDom of the file.

    - Use VB or C# CodeDom provider to create a Proxy class in a temporary assembly.

    - Reflect over the the temporary assembly and call the needed proxies.

    You have to decide if this is the best strategy for you or if you prefer to use other NetWeaver technologies.

    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.