2010 Aug 31 9:36 AM
Hi All,
I have to access a SAP web service consuming a complex data type. Iu2019m using VBA in MS-Office.
Calling a web service with a simple type like String or long is not a problem. But I have to send a NodeList (MSXML2.IXMLDOMNodeList) to the service.
Here are the relevant parts out of the wsdl file:
<xsd:element name="SEARCH"><xsd:complexType><xsd:sequence>
<xsd:element name="CT_EQART_RANGE" type="tns:ZS_EQART_RANGE" minOccurs="0"></xsd:element>
</xsd:sequence>
...
<xsd:complexType name="ZS_EQART_RANGE">
<xsd:sequence>
<xsd:element name="item" type="tns:ZS_EQART_RANGE_LINE" minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
...
<xsd:complexType name="ZS_EQART_RANGE_LINE">
<xsd:sequence>
<xsd:element name="SIGN" type="tns:char1"></xsd:element>
<xsd:element name="OPTION" type="tns:char2"></xsd:element>
</xsd:sequence>Therefore I build a nodelist with one node containing following:
<CT_EQART_RANGE><item><SIGN>F</SIGN><OPTION>TT</OPTION></item></CT_EQART_RANGE>
When I call the service with this parameter I receive following error:
Client:Fehler bei der Typumwandlung für Element "CT_EQART_RANGE"
Translation: Type conversion error for element "CT_EQART_RANGE"
Please Help
Ron
2010 Aug 31 10:59 AM
Hi,
it looks like type for SAP range but the fields LOW and HIGH are missing. For ranges you can have only I or E for sign and operators like EQ or BT for option. Have you tried with these values?
Cheers
Hi,
it looks like type for SAP range but the fields LOW and HIGH are missing. For ranges you can have only I or E for sign and operators like EQ or BT for option. Have you tried with these values?
Cheers
2010 Aug 31 10:59 AM
Hi,
it looks like type for SAP range but the fields LOW and HIGH are missing. For ranges you can have only I or E for sign and operators like EQ or BT for option. Have you tried with these values?
Cheers
2010 Aug 31 1:21 PM
Yes, you right.
I removed this fields out of my question, because I didn't know that this is a SAP standard range.
But when this is a standard, do you have any code example on your side, to send such SAP range to a web service?
Thanks
Ron
2010 Sep 06 8:21 AM
Please help me.
Can any body tell me how to send a SAP range to SAP using Web-Services?
Thanks
Ron
2010 Sep 07 1:24 AM
Hi,
you can find how ranges work in ABAP [here|http://help.sap.com/saphelp_470/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htm]. That tells you allowed values in each field. What's complete definition for type ZS_EQART_RANGE_LINE? You did not paste full definition.
Cheers
2010 Sep 08 7:32 AM
Sorry,
I didn't know that this was necessary to find a solution.
Here are the definition out of the WSDL File:
<xsd:complexType name="ZS_EQART_RANGE_LINE">
<xsd:sequence>
<xsd:element name="SIGN" type="tns:char1"/>
<xsd:element name="OPTION" type="tns:char2"/>
<xsd:element name="LOW" type="tns:char10"/>
<xsd:element name="HIGH" type="tns:char10"/>
</xsd:sequence>
</xsd:complexType>Thanks for Help
Ron
2010 Sep 08 7:41 AM
Hi,
so I was right. It's a range. I already gave you a link which describes how ranges work in ABAP. What values do you want to pass to your web service?
Cheers
2010 Sep 08 1:42 PM
I will send following values:
Sign="I"
Option="EQ"
Low="We100"
High=""
I'm still receiving the error message: Client:Fehler bei der Typumwandlung für Element "CT_EQART_RANGE"
Ron
2010 Sep 09 12:42 AM
Hi,
it looks OK. Only one comment. The type EQART does not allow to have lower case characters. Have you tried with WE100?
Cheers
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |