cancel
Showing results for 
Search instead for 
Did you mean: 

String was not recognized as a valid DateTime (SAP_BASIS 702)

Former Member
0 Kudos

Hello guys,

We could consume a web service in .Net and get back the results sucessfully if there are no date fields in the output parameters. The issue is when there is a date field in the output parameters with NULL value, the web service is throwing error "String was not recognized as a valid DateTime". Even though the RFC is has no value in the date fields the web service shows '0000-00-00' as date format. And there are no trace of this issue in SOAMANAGER or SRT_UTIL. We identified that the DATE data types are not convereted to strings in the web service (it does convert all data types to strings in SAP_BASIS 701) and causing issues. Take a look at the diffrence in WSDL lines for date fields in 701 and 702.

Did anyone faced this type of issue? How to overcome this?

SAP_BASIS 702 - Date field

- <xsd:simpleType name="date">

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

<xsd:pattern value="[0-9]{4}-[0-9]{2}-[0-9]{2}" />

</xsd:restriction>

</xsd:simpleType>

SAP_BASIS 701 - Date field

- <xsd:simpleType name="date">

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

<xsd:maxLength value="10" />

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

</xsd:restriction>

</xsd:simpleType>

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Got it fixed by applying OSS note 1655336.

Thanks for your suggestions.

Answers (1)

Answers (1)

jitendra_it
Active Contributor
0 Kudos

Hi Karthik,

Check below thread.

http://scn.sap.com/thread/1898269

Many Thanks,

Jitendra