URGETNT: SAP Business Connector 4.0.1 and VB6 Integration pr

I am trying to integrate SAP with VB6 using SAP Business connector 4.0.1 on
windows NT(service pack 4). This project is including both SAP->BC->VB6 and
VB6->BC->SAP integration. I am facing some problems in this project. I would
appreciate if you can provide some quick help in this regard. The server is
running on sun jdk1.2.2.

  1. I want to implement a RFC using a method of vb dll. There is a map for
    the RFC (sap->sapbc) in SAP BC for the RFC. In the service, i want to call a
    vb dll method which would process the import/export/tables of the RFC. What
    would be signature of the VB DLL method and which service amoung the
    late-binding service(win32.COM:invokeLate) and early-binding service
    (win32.COM:invoke) we should use to call the vb dll from sap bc. Can you
    give me a sample vb dll which accepts the import, export and tables from the
    RFC and processes them? The HelloWorld example in the
    SAPBCIntegratorGuide.pdf is too simple to solve my problem and to give me
    some insight.
  2. I want to call a service in Business Connector(which in turn calls a RFC
    in SAP) from VB6. I am able to create the vb client code ( a vb project with forms and .bas/.cls files) for the service in BC Integrator using
    compose->generate client code. In the project the webMethods.dll is used in
    the project->reference section.
    But when i compile and run the project, when the statement
    wc.Connect getServer & “:” & getServerPort, getServerUser, getServerPass
    is executed, the system gives fatal error like
    VB6.E - Application Error
    The instruction at “0x10010424” referenced memory at “0x00000000”. The
    memory could not be “read”.
    If we have vc++ and we click the cancel to debug, it shows that there was
    some error while executing webMethods.dll . Similar error occurs for all the
    objects under webMethods.dll like Values Object.
    Dim Inputs as Values
    Set Inputs = new Values
    MSGBOX Inputs.count
    We can run statements like
    Dim Inputs as Values
    Set Inputs = new Values
    But when when we run statement like msgbox Inputs.count, then the same fatal
    error occurs.

What can be the possible reason for this? Is it because of VB installation
or SAP BC installation or is it because SAP BC server is running using
JDK1.2.2 with jview = 5.00.3155 ? Should we use only Java Virtual Machine
1.2 or later or JView build 5.00.3177 or later for visual basic integration.

If you have a working client code for calling a service in Business
Connector, can you please give the same to me and the prerequisites for
calling a sap bc service from vb client( like which java virtual machine for
sap bc server ) ?

There is another way you can invoke a SAP RFC via webMethods from clients like VB.

Generate RFC XML for that RFC using SAP BC.
Using the XML as template populate values and create a RFC XML that can be passed the RFCXMLPost service in SAP Adapter.

There is generic service i think the name is RFCXMLPost that will take a string and the server name as parameters and call the appropriate RFC in the XML and get the return parameters as XML.

From within your VB program use the http post to post the populate RFC XML to the service and get the response as XML.

Hope this helps.

SV

Hi:

The same thing has just happened to me.
I just cannot execute the statement
wc.connect

The visual basic gives an error and crack.

I don’t know what to do!