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

RFC server using VB.NET

Hi Experts,

I am new to .NET connector, and would like your help if you could let me know the step by step process to create a RFC Server using VB .NET.

Thanks for all the help!!

Kind Regards


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 28, 2005 at 11:08 AM

    1. Define the signature of your Server Function(s) in SE37 in ABAP. If you want to reuse an existing function's signature, skip this step.

    2. In VS create a new Command Line Application.

    3. Add new Item->SAP Connector Proxy.

    4. You see an empty designer.

    5. Configure Server Explorer so that you see the SAP Server.

    6. Drag the function(s) defined in 1. to the designer.

    7. Click on background and change to Properties window. Change the ProxyType property from "Client" to "Server" and save the designer.

    8. Delete the original "Program.Vb", as the ...Impl.vb already contains a Main function.

    9. Fill the server code into the ...Impl.vb file.

    10. In SM59 define a TCP/IP destination form 'Registered Server Program' and invent a Program ID.

    11. Run your .NET application with command line "prog -g<GatewayHost> -x<GatewayPort> -a<ProgramID". GatewayHost is usually the name or IP of you SAP server. GatewayPort is usualy 3600+SystemNumber or somthing like "sapgw00". ProgramID is the string you entered in step 10.

    12. Call you function from ABAP specifying the destinatio name configured in step 10.

    Add a comment
    10|10000 characters needed characters exceeded

    • Ah, you are using external COM-objects. You should know that most COM-objects require the so-called Appartment-Threading model, which is based on Windows message passing.

      Please try adding in the Main function where your server instances are created, after

      Server = new SAPProxy1Impl(args,Host)

      to add the following line.

      Server.COMApartmentModel = Threading.ApartmentState.STA

      I'm not sure if this is sufficient. You may also need to add a message loop somewhere in your application-

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.