cancel
Showing results for 
Search instead for 
Did you mean: 

How to consume the SAP rfc_read_table via VBA

Former Member
0 Kudos

Hi,

I converted the rfc_read_table into web server and tested via Microsoft Infopath. but when tried to consume the SAP web service via Access with Microsoft SoapTool 3.0, I had no idea how to put the complex type like parameters Tab512. Could somebody help me to give me the example program code ? appreciate.

- <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:n0="urn:sap-com:document:sap:rfc:functions">

<xsd:import namespace="urn:sap-com:document:sap:rfc:functions" />

- <xsd:simpleType name="RfcException.Message.Number">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="3" />

<xsd:pattern value="\d*" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:complexType name="RfcDbOpt">

- <xsd:sequence>

<xsd:element name="Text" type="n0:char72" />

</xsd:sequence>

</xsd:complexType>

+ <xsd:complexType name="RfcDbFld">

- <xsd:sequence>

<xsd:element name="Fieldname" type="n0:char30" />

<xsd:element name="Offset" type="n0:numeric6" />

<xsd:element name="Length" type="n0:numeric6" />

<xsd:element name="Type" type="n0:char1" />

<xsd:element name="Fieldtext" type="n0:char60" />

</xsd:sequence>

</xsd:complexType>

+ <xsd:complexType name="Tab512">

- <xsd:sequence>

<xsd:element name="Wa" type="n0:char512" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="RfcException.Message">

- <xsd:sequence>

<xsd:element name="ID" type="xsd:string" />

<xsd:element name="Number" type="tns:RfcException.Message.Number" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="RfcReadTable.RfcException">

- <xsd:sequence>

<xsd:element name="Name" type="tns:RfcReadTable.RfcExceptions" />

<xsd:element name="Text" type="xsd:string" minOccurs="0" />

<xsd:element name="Message" type="tns:RfcException.Message" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="TableOfRfcDbOpt">

- <xsd:sequence>

<xsd:element name="item" type="tns:RfcDbOpt" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="TableOfRfcDbFld">

- <xsd:sequence>

<xsd:element name="item" type="tns:RfcDbFld" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="TableOfTab512">

- <xsd:sequence>

<xsd:element name="item" type="tns:Tab512" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

- <xsd:simpleType name="RfcReadTable.RfcExceptions">

- <xsd:restriction base="xsd:string">

<xsd:enumeration value="FieldNotValid" />

<xsd:enumeration value="OptionNotValid" />

<xsd:enumeration value="NotAuthorized" />

<xsd:enumeration value="TableNotAvailable" />

<xsd:enumeration value="DataBufferExceeded" />

<xsd:enumeration value="TableWithoutData" />

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Use the office web service toolkit to convert the web service function call in VBA mode, the tool will help you to create the necessary parameters to call the service. for the complex parameter, it most possible to use the iXMLnodelist to pass the array data back to SAP.