Welcome to MSDN Blogs Sign in | Join | Help

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.

Syndication

News

CTP4 released (Adapter Pack V2, Adapter SDK V1 SP2) on October 21, 2008

Other Blogs Related to BizTalk Adapter Pack

The “DataTypesBehavior” binding property in the SAP Adapter

Firstly, if you haven’t already seen it, have a look at the post describing the EnableSafeTyping binding property - http://blogs.msdn.com/adapters/archive/2007/11/24/the-enablesafetyping-binding-property.aspx.

Since the Adapter Pack V1 released, we have had requests from users, wherein, they want to expose the Date (DATS) and Time (TIMS) data types as a .NET DateTime (strong typing), but yet want the adapter to be able to handle common SAP values such as 00000000 for DATS (which in SAP would mean a MINVALUE or NULL for the Date field). Besides, we already know that SAP doesn’t validate the data in DATS, TIMS and NUMC fields, so you might end up receiving “invalid” data from a SAP RFC, but you yet want the strong typing in your client code.

As a result, we’ve added a new binding property named “DataTypesBehavior” in the SAP adapter. This property is actually a “complex” property, containing 12 sub-properties. I’ll first list the names of the sub-properties.

  • DateTimeMaxToDats
  • DateTimeMinToDats
  • DateTimeMaxToTims
  • DateTimeMinToTims
  • DatsMaxToDateTime
  • DatsMinToDateTime
  • TimsMaxToDateTime
  • DateTimeNullToDats
  • DateTimeNullToTims
  • InvalidDatsToDateTime
  • InvalidNumcToInt
  • InvalidTimsToDateTime
  • EmptyDatsToDateTime

I’ll explain just a few of the above; you should then be able to figure out what the rest mean.

  • DateTimeMaxToDats – this property controls the behavior when converting DateTimeMax (the .NET DateTime.MaxValue value) “To” Dats (the SAP DATS value). The .NET DateTime.MaxValue can only be present in the request message. The adapter needs to convert this to a DATS value when sending it to SAP. Therefore, this property controls the behavior of how the adapter parses the request message.
  • DatsMaxToDateTime – this property controls the behavior when converting DatsMax (the SAP DATS MaxValue, which is 99999999) “To” DateTime. DATS values can only be sent from SAP right? And, only a client consuming the adapter can understand .NET DateTime, right? Hence, this property controls the behavior of the adapter, when it receives the DATS value from SAP (as the response to a RFC invocation), and when the adapter is converting this value to XML in order to give the response to the client.

Additional information for each property, including details on the values which need to be specified for each property, can be obtained by peeking through the attached .txt file – it contains the comments present in the source code of the adapter for these individual properties.

NOTE – this binding property is present in the SAP Adapter in the Adapter Pack v2. For the Adapter Pack v1, there is a hotfix available (KB # 954539) – your Microsoft support contact should be able to obtain it for you.

Published Wednesday, August 13, 2008 9:38 AM by mdoctor

Filed under:

Attachment(s): DataTypesBehavior.TXT

Comments

# re: The “DataTypesBehavior” binding property in the SAP Adapter @ Wednesday, June 17, 2009 10:48 PM

Can we control the behaivor of the WCF adapter to parse 20090422 date format sent from SAP to .NET strong datetime type

Ashi

Anonymous comments are disabled
Page view tracker