Skip to Content
avatar image
Former Member

Read WSDL for Tables From Function Module (BAPI)

Hi All,

I need help to read table form WSDL. I'm create wsdl from function module with RFC.

How to read table parameter from this wsdl with PHP SOAP ?

I can get single value in Import or Export parameter, but in table I'm failed.

This is my XML from wsdl,

<wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style"><wsdl:documentation><sidl:sidl/></wsdl:documentation><wsdl:types><xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions"><xsd:simpleType name="char1"><xsd:restriction base="xsd:string"><xsd:maxLength value="1"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="char2"><xsd:restriction base="xsd:string"><xsd:maxLength value="2"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="char3"><xsd:restriction base="xsd:string"></xsd:restriction></xsd:simpleType><xsd:simpleType name="char30"><xsd:restriction base="xsd:string"><xsd:maxLength value="30"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="char4"><xsd:restriction base="xsd:string"><xsd:maxLength value="4"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="char6"><xsd:restriction base="xsd:string"><xsd:maxLength value="6"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="char7"><xsd:restriction base="xsd:string"><xsd:maxLength value="7"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="char8"><xsd:restriction base="xsd:string"><xsd:maxLength value="8"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="clnt3"><xsd:restriction base="xsd:string"><xsd:maxLength value="3"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="cuky5"><xsd:restriction base="xsd:string"><xsd:maxLength value="5"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="curr13.2"><xsd:restriction base="xsd:decimal"><xsd:totalDigits value="13"/><xsd:fractionDigits value="2"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="lang"><xsd:restriction base="xsd:string"><xsd:maxLength value="1"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="numeric2"><xsd:restriction base="xsd:string"><xsd:maxLength value="2"/><xsd:pattern value="\d*"/></xsd:restriction></xsd:simpleType><xsd:simpleType name="numeric3"><xsd:restriction base="xsd:string"><xsd:maxLength value="3"/><xsd:pattern value="\d*"/></xsd:restriction></xsd:simpleType></xsd:schema><xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style"><xsd:import namespace="urn:sap-com:document:sap:rfc:functions"/><xsd:complexType name="t005"><xsd:sequence><xsd:element name="Mandt" type="n0:clnt3"/><xsd:element name="Land1" type="n0:char3"/><xsd:element name="Landk" type="n0:char3"/><xsd:element name="Lnplz" type="n0:numeric2"/><xsd:element name="Prplz" type="n0:char1"/><xsd:element name="Addrs" type="n0:char3"/><xsd:element name="Xplzs" type="n0:char1"/><xsd:element name="Xplpf" type="n0:char1"/><xsd:element name="Spras" type="n0:lang"/><xsd:element name="Xland" type="n0:char1"/><xsd:element name="Xaddr" type="n0:char1"/><xsd:element name="Nmfmt" type="n0:char2"/><xsd:element name="Xregs" type="n0:char1"/><xsd:element name="Xplst" type="n0:char1"/><xsd:element name="Intca" type="n0:char2"/><xsd:element name="Intca3" type="n0:char3"/><xsd:element name="Intcn3" type="n0:numeric3"/><xsd:element name="Xegld" type="n0:char1"/><xsd:element name="Xskfn" type="n0:char1"/><xsd:element name="Xmwsn" type="n0:char1"/><xsd:element name="Lnbkn" type="n0:numeric2"/><xsd:element name="Prbkn" type="n0:char1"/><xsd:element name="Lnblz" type="n0:numeric2"/><xsd:element name="Prblz" type="n0:char1"/><xsd:element name="Lnpsk" type="n0:numeric2"/><xsd:element name="Prpsk" type="n0:char1"/><xsd:element name="Xprbk" type="n0:char1"/><xsd:element name="Bnkey" type="n0:char1"/><xsd:element name="Lnbks" type="n0:numeric2"/><xsd:element name="Prbks" type="n0:char1"/><xsd:element name="Xprso" type="n0:char1"/><xsd:element name="Pruin" type="n0:char1"/><xsd:element name="Uinln" type="n0:numeric2"/><xsd:element name="Lnst1" type="n0:numeric2"/><xsd:element name="Prst1" type="n0:char1"/><xsd:element name="Lnst2" type="n0:numeric2"/><xsd:element name="Prst2" type="n0:char1"/><xsd:element name="Landd" type="n0:char3"/><xsd:element name="Kalsm" type="n0:char6"/><xsd:element name="Landa" type="n0:char3"/><xsd:element name="Wechf" type="n0:numeric3"/><xsd:element name="Lkvrz" type="n0:char7"/><xsd:element name="Intcn" type="n0:numeric3"/><xsd:element name="Xdezp" type="n0:char1"/><xsd:element name="Datfm" type="n0:char1"/><xsd:element name="Curin" type="n0:cuky5"/><xsd:element name="Curha" type="n0:cuky5"/><xsd:element name="Waers" type="n0:cuky5"/><xsd:element name="Kurst" type="n0:char4"/><xsd:element name="Afapl" type="n0:char4"/><xsd:element name="Gwgwrt" type="n0:curr13.2"/><xsd:element name="Umrwrt" type="n0:curr13.2"/><xsd:element name="Kzrbwb" type="n0:char1"/><xsd:element name="Xanzum" type="n0:char1"/><xsd:element name="Ctnconcept" type="n0:char4"/><xsd:element name="Kzsrv" type="n0:char1"/><xsd:element name="Xxinve" type="n0:char1"/><xsd:element name="Sureg" type="n0:char8"/><xsd:element name="LandgrpVp" type="n0:char2"/></xsd:sequence></xsd:complexType><xsd:complexType name="TableOfT005"><xsd:sequence><xsd:element name="item" type="tns:t005" minOccurs="0" maxOccurs="unbounded"/></xsd:sequence></xsd:complexType><xsd:element name="ZhsnTestWsdl7"><xsd:complexType><xsd:sequence><xsd:element name="PIn1" type="n0:char30" minOccurs="0"/><xsd:element name="Xt005" type="tns:TableOfT005" minOccurs="0"/></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="ZhsnTestWsdl7Response"><xsd:complexType><xsd:sequence><xsd:element name="POut1" type="n0:char30"/><xsd:element name="Xt005" type="tns:TableOfT005" minOccurs="0"/></xsd:sequence></xsd:complexType></xsd:element></xsd:schema></wsdl:types><wsdl:message name="ZhsnTestWsdl7"><wsdl:part name="parameters" element="tns:ZhsnTestWsdl7"/></wsdl:message><wsdl:message name="ZhsnTestWsdl7Response"><wsdl:part name="parameter" element="tns:ZhsnTestWsdl7Response"/></wsdl:message><wsdl:portType name="ZWS_TEST_WSDL7"><wsdl:documentation><sapdoc:sapdoc><sapdoc:docitem docURL="http://ggs-dve.vivere.co.id:8002/sap/bc/esdt/docu/sd_text?sap-client=120&sd_name=ZWS_TEST_WSDL7"/><sapdoc:docitem applicationComponent="BC"/></sapdoc:sapdoc></wsdl:documentation><wsdl:operation name="ZhsnTestWsdl7"><wsdl:input message="tns:ZhsnTestWsdl7"/><wsdl:output message="tns:ZhsnTestWsdl7Response"/></wsdl:operation></wsdl:portType><wsdl:binding name="ZWS_TEST_WSDL7" type="tns:ZWS_TEST_WSDL7"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/><wsdl:operation name="ZhsnTestWsdl7"><soap:operation soapAction="urn:sap-com:document:sap:soap:functions:mc-style:ZWS_TEST_WSDL7:ZhsnTestWsdl7Request" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="ZWS_TEST_WSDL7_SOAP12" type="tns:ZWS_TEST_WSDL7"><wsoap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/><wsdl:operation name="ZhsnTestWsdl7"><wsoap12:operation soapAction="urn:sap-com:document:sap:soap:functions:mc-style:ZWS_TEST_WSDL7:ZhsnTestWsdl7Request" style="document"/><wsdl:input><wsoap12:body use="literal"/></wsdl:input><wsdl:output><wsoap12:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="ZWS_TEST_WSDL7"><wsdl:port name="ZWS_TEST_WSDL7" binding="tns:ZWS_TEST_WSDL7"><soap:address location="http://ggs-dve.vivere.co.id:8002/sap/bc/srt/rfc/sap/zws_test_wsdl7/120/zws_test_wsdl7/zws_test_wsdl7"/></wsdl:port><wsdl:port name="ZWS_TEST_WSDL7_SOAP12" binding="tns:ZWS_TEST_WSDL7_SOAP12"><wsoap12:address location="http://ggs-dve.vivere.co.id:8002/sap/bc/srt/rfc/sap/zws_test_wsdl7/120/zws_test_wsdl7/zws_test_wsdl7"/></wsdl:port></wsdl:service></wsdl:definitions>

My Tables Parameter in Function Module is XT005 and i want to get all of the table from my Function Module.

Please help me..

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 26, 2015 at 11:19 AM

    What is PHP SOAP ?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Avinash,

      I'am using PHP for programming language to access Function Module in SAP, and using SOAP to access web service from SAP (WSDL),

      I'am alreade success get export parameter if single line, but not with tables parameter.

      Can u tell me how do that?

      Thanks