08-31-2010 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
08-31-2010 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
08-31-2010 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
08-31-2010 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
09-06-2010 8:21 AM
Please help me.
Can any body tell me how to send a SAP range to SAP using Web-Services?
Thanks
Ron
09-07-2010 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
09-08-2010 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
09-08-2010 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
09-08-2010 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
09-09-2010 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