WCF LOB Adapter SDK and BizTalk Adapter Pack

The BizTalk Adapter Pack, comprising of the SAP, Siebel, OracleDB, OracleEBS and SQL WCF Bindings / Adapters which can be used with BizTalk Server 2006 R2 and R3. The Windows Communication Foundation (WCF) Line Of Business (LOB) Adapter SDK.

Date/Time handling in the Microsoft Biztalk.NET SAP Adapter (WCF).

Date/Time handling in the Microsoft Biztalk.NET SAP Adapter (WCF).

  • Comments 2

SAP has the data types DATS and TIMS, which mean Date and Time respectively. DATS means YYYYMMDD, and TIMS means HHMMSS, with no timezone information being stored anywhere. However, the adapter, working with SOAP messages, accepts date/time values having timezone information in them. Besides, since both are exposed as xsd:datetime, the adapter can accept an entire datetime value (i.e. a value containing both date and time components). How does the adapter convert them to a format which SAP understands? And how does the adapter convert the SAP values to XML format?

NOTE - The reason DATS and TIMS are exposed as xsd:datetime and not xsd:date/xsd:time, is so that the .NET proxies generated by SvcUtil.exe expose these fields as DateTime objects, rather than strings.

Sending Date/Time to SAP:

Firstly, the adapter reads the XML datetime value as a datetime in UTC format. The table below should clarify:

Value in Xml Value adapter sees
2006-03-03T18:00:00 2006-03-03T18:00:00
2006-03-03T18:00:00Z 2006-03-03T18:00:00
2006-03-03T18:00:00+05:30 2006-03-03T12:30:00

Next, for DATS, the adapter just ignores the time value. Similarly, for TIMS, the adapter simply ignores the date value.

Once the adapter has obtained the required value, it sends it to SAP.

Converting SAP Date/Time to XML:

For DATS:
20060303 (YYYYMMDD) will appear in XML as 2006-03-03T00:00:00

For TIMS:
183000 (HHMMSS) will appear in XML as 0001-01-01T18:30:00

Blog - Comment List MSDN TechNet
  • Loading...
Leave a Comment
  • Please add 1 and 6 and type the answer here:
  • Post