Basic SAP Data Types

6 out of 11 rated this helpful - Rate this topic

The parameter types that the Microsoft BizTalk Adapter 3.0 for mySAP Business Suite supports are governed by the:

  • ABAP data types that SAP supports
  • Database data types that SAP supports

This section presents a mapping between the ABAP and database data types, and their corresponding .NET and XML schema types.

Note
The information in this section applies to RFCs, tRFCs, and BAPIs. SAP data types are always represented as strings (xsd:string) in IDOCs. This is to support the BizTalk Server flat file parser.

The Microsoft BizTalk Adapter 3.0 for mySAP Business Suite supports safe typing for some ABAP data types. When safe typing is enabled, these data types are represented as strings. You configure safe typing by setting the EnableSafeTyping binding property. Safe typing is disabled by default. For more information about the SAP adapter binding properties, see Working with BizTalk Adapter 3.0 for mySAP Business Suite Binding Properties.

The following table shows how the ABAP data types are surfaced when safe typing is not enabled. (EnableSafeTyping is false). Data types that are surfaced differently when safe typing is enabled are marked with an asterisk (*).

ABAP Data Type RFC Type XSD type .NET type Format string

I (Integer)

RFC_INT

xsd:int

Int32

-

Internal (RFC_INT1)

RFC_INT1

xsd:unsignedByte

Byte

-

Internal (RFC_INT2)

RFC_INT2

xsd:short

Int16

-

F (Float)

RFC_FLOAT

xsd:double

Double

-

P (BCD number)

RFC_BCD

xsd:decimal if length <= 28
xsd:string if length > 28

Decimal
String

Decimal number. with 0 decimal places
Decimal number. with >0 decimal places

C (Character)

RFC_CHAR

xsd:string

String

-

D (Date: YYYYMMDD)*

RFC_DATE

xsd:dateTime

DateTime

Internally, the adapter deserializes the value into a DateTime object. It then invokes theDateTime.ToUniversalTime method to convert the value of this object to UTC. Finally the date component (DateTime.Date) is used to create the value that is sent to the SAP system. The SAP system treats this date value as local time.

You should specify date values as UTC to avoid conversion.

  • For xsd:dateTime, the following pattern is recommended: "(\d\d\d\d-\d\d-\d\d)T(00:00:00)(.*)Z".
  • For DateTime objects set DateTime.Kind to DateTimeKind.Utc.

T (Time: HHMMSS)*

RFC_TIME

xsd:dateTime

DateTime

Internally, the adapter deserializes the value into a DateTime object. It then invokes theDateTime.ToUniversalTime method to convert the value of this object to UTC. Finally the time component (DateTime.Time) is used to create the value that is sent to the SAP system. The SAP system treats this time value as local time.

You should specify time values as UTC to avoid conversion.

  • For xsd:dateTime, the following pattern is recommended: "(0001-01-01)T(\d\d:\d\d:\d\d)(.*)".
  • For DateTime objects set DateTime.Kind to DateTimeKind.Utc.

For example, if your local time is 9:15 am, express this as "(001-01-01)T(09:15:00)Z"

N (Numeric string)*

RFC_NUM

xsd:int if lenrth <= 9
xsd:long if length > 9 and <= 19
xsd:string if length > 19

Int32
long
String

-

X (Byte)

RFC_BYTE

xsd:base64Binary

Byte[]

-

STRING

RFC_STRING

xsd:string

String

-

XSTRING

RFC_BYTE

xsd:base64Binary

Byte[]

-

*Indicates that the data type is surfaced differently when safe typing is enabled.

Safe Typing Enabled

The following table shows the ABAP data types that are surfaced differently when safe typing is enabled (the EnableSafeTyping binding property is true).

ABAP Data Type RFC Type XSD type .NET type Format string

D (Date: YYYYMMDD)

RFC_DATE

xsd:string

String

SAP date format: YYYYMMDD.

Characters are allowed for date digits, so the value is essentially an eight character string

T (Time: HHMMSS)

RFC_TIME

xsd:string

String

SAP time format: HHMMSS.

Characters are allowed for time digits, so the value is essentially a six character string

N (Numeric string)

RFC_NUM

xsd:string

String

An n character string; where n = length of the numc field.

ABAP data types that are not in this table are surfaced in the same way as when safe typing is not enabled.

Support for Date and Time Fields

When safe typing is not enabled, ABAP Date (D) and Time (T) types are surfaced as xsd:dateTime; however, the pattern facet surfaced for the Date and Time types is different.

  • The pattern facet for Date is: (\d\d\d\d-\d\d-\d\d)T(00:00:00)(.*)

    For example, July 7, 2007 (2007-07-07) is represented as:

    (2007-07-07)T(00:00:00).

  • The pattern facet for Time is: (0001-01-01)T(\d\d:\d\d:\d\d)(.*)

    For example, 18:30:30 (6:30 pm and 30 seconds) is represented as:

    (0001-01-01)T(18:30:30).

How does the Adapter Represent Minimum and Maximum Time Values on Inbound Messages (from SAP)?

The SAP adapter uses the following guidelines when it receives time values from the SAP system:

  • The adapter treats 000000 (hhmmss) and 240000 (hhmmss) as 0 hours, 0 mins, and 0 seconds.

The way in which the Microsoft BizTalk Adapter 3.0 for mySAP Business Suite surfaces database data types also depends on whether safe typing is enabled. The following table shows how the adapter surfaces database data types when safe typing is not enabled (the EnableSafeTyping binding property is false). Data types that are surfaced differently when safe typing is enabled are marked with an asterisk (*).

Database Data Type RFC Type XSD .NET Type

ACCP (Posting Period)*

RFC_NUM

xsd:int

Int32

CHAR

RFC_CHAR

xsd:string

String

CLNT (Client)

RFC_CHAR

xsd:string

String

CURR (Currency field)

RFC_BCD

xsd:decimal

Note
The SAP adapter rounds off the decimal values based on the definition of the DECIMAL parameter. For example, if a DECIMAL parameter can accept up to five digits after the decimal point, a value such as 4.000028 is rounded off to 4.00003.

Decimal

CUKY (Currency Key)

RFC_CHAR

xsd:string

String

DATS (Date field)*

RFC_DATE

xsd:dateTime

Internally, the adapter deserializes the value into a DateTime object. It then invokes theDateTime.ToUniversalTime method to convert the value of this object to UTC. Finally the date component (DateTime.Date) is used to create the value that is sent to the SAP system. The SAP system treats this date value as local time.

You should specify date values as UTC to avoid conversion. The following pattern is recommended: "(\d\d\d\d-\d\d-\d\d)T(00:00:00)(.*)Z".

DateTime

You should specify date values as UTC (DateTime.Kind = DateTimeKind.Utc) to avoid conversion.

DEC (Amount)

RFC_BCD

xsd:decimal

Note
The SAP adapter rounds off the decimal values based on the definition of the DECIMAL parameter. For example, if a DECIMAL parameter can accept up to five digits after the decimal point, a value such as 4.000028 is rounded off to 4.00003.

Decimal

FLTP (Floating point)

RFC_FLOAT

xsd:double

Double

INT1

RFC_INT1

xsd:unsignedbyte

Byte

INT2

RFC_INT2

xsd:short

Int16

INT4

RFC_INT

xsd:int

Int32

LANG (Language Key)

RFC_CHAR

xsd:string

String

LCHR

RFC_STRING

xsd:string

String

LRAW (long byte seq)

RFC_BYTE

xsd:base64binary

Byte[]

NUMC*

RFC_NUM

xsd:int
xsd:long
xsd:string

Int32 if length <=9
Int64 if length >9 and <=19
String if length > 19

PREC (Accuracy)

RFC_INT2

xsd:short

Int16

QUAN (Quantity)

RFC_BCD

xsd:decimal

Note
The SAP adapter rounds off the decimal values based on the definition of the DECIMAL parameter. For example, if a DECIMAL parameter can accept up to five digits after the decimal point, a value such as 4.000028 is rounded off to 4.00003.

Decimal

RAW (byte sequence)

RFC_BYTE

xsd:base64binary

Byte[]

RAWSTRING (variable length)

RFC_BYTE

xsd:base64binary

Byte[]

STRING (variable length)

RFC_STRING

xsd:string

String

TIMS (Time field)*

RFC_TIME

xsd:datetime

Internally, the adapter deserializes the value into a DateTime object. It then invokes theDateTime.ToUniversalTime method to convert the value of this object to UTC. Finally the time component (DateTime.Time) is used to create the value that is sent to the SAP system. The SAP system treats this time value as local time.

You should specify time values as UTC to avoid conversion. The following pattern is recommended: "(0001-01-01)T(\d\d:\d\d:\d\d)(.*)Z".

For example, if your local time is 9:15 am, express this as "(001-01-01)T(09:15:00)Z"

DateTime

You should specify time values as UTC (DateTime.Kind = DateTimeKind.Utc) to avoid conversion.

UNIT (Unit for Qty)

RFC_CHAR

xsd:string

String

[Unsupported]

--

--

String

*Indicates that the adapter surfaces the data type differently when safe typing is enabled.

Safe Typing Enabled

The following table shows the database data types that are surfaced differently when safe typing is enabled (the EnableSafeTyping binding property is true).

 Database Data Type RFC Type XSD .NET type String Value Format

ACCP (Posting Period)

RFC_NUM

xsd:string

String

Character string

NUMC

RFC_NUM

xsd:string

String

Character string

DATS (Date field)

RFC_DATE

xsd:string

String

YYYYMMDD

TIMS (Time field)

RFC_TIME

xsd:string

String

HHMMSS

Data types that are not in this table are surfaced in the same way as when safe typing is not enabled.

The SAP adapter supports the following XSD facets.

RFC Type XSD Facet (EnableSafeTyping = false) XSD Facet (EnableSafeTyping = true)

RFC_BCD

XSD pattern facet

Zero decimal places: "([\\-]{0,1})(([0-9]{1," + digitsBeforeDecimal + "}))"

One or more decimal places: "([\\-]{0,1})(([0-9]{0," + digitsBeforeDecimal + "}\\.[0-9]{0," + digitsAfterDecimal + "})|([0-9]{1," + digitsBeforeDecimal + "}))"

same

RFC_NUM

XSD totalDigits facet if length <=19

XSD pattern facet if length > 19

XSD maxLength facet (depends on the length of the value on SAP)

RFC_DATE

XSD pattern facet

"(\d\d\d\d-\d\d-\d\d)T(00:00:00)(.*)"

Pattern contains time 00:00:00 to be compatible with xsd:datetime

XSD maxLength facet = 8

RFC_TIME

XSD pattern facet

"(0001-01-01)T(\d\d:\d\d:\d\d)(.*)"

Pattern contains date 0001-01-01 to be compatible with xsd:datetime

XSD maxLength facet = 6

RFC_CHAR

XSD maxLength facet

same

Basic SAP Data Types的更多相关文章

  1. Core Java Volume I — 3.3. Data Types

    3.3. Data TypesJava is a strongly typed language(强类型语音). This means that every variable must have a ...

  2. 【12c】扩展数据类型(Extended Data Types)-- MAX_STRING_SIZE

    [12c]扩展数据类型(Extended Data Types)-- MAX_STRING_SIZE 在12c中,与早期版本相比,诸如VARCHAR2, NAVARCHAR2以及 RAW这些数据类型的 ...

  3. Oracle Schema Objects——Tables——Oracle Data Types

    Oracle Schema Objects Oracle Data Types 数据类型 Data Type Description NUMBER(P,S) Number value having a ...

  4. C and SQL data types for ODBC and CLI

    C and SQL data types for ODBC and CLI   This topic lists the C and SQL data types for ODBC and CLI a ...

  5. allow zero datetime=true导致datetime转换失败:MySql.Data.Types.MySqlDateTime”的对象无法转换为类型“System.Nullable`1[System.DateTime]

    allow zero datetime=true导致datetime转换失败:MySql.Data.Types.MySqlDateTime”的对象无法转换为类型“System.Nullable`1[S ...

  6. "SQL Server does not handle comparison of NText, Text, Xml, or Image data types."

    "SQL Server does not handle comparison of NText, Text, Xml, or Image data types." sql2000 ...

  7. ExtJS笔记 Ext.data.Types

    This is a static class containing the system-supplied data types which may be given to a Field. Type ...

  8. Entity Framework Code First (七)空间数据类型 Spatial Data Types

    声明:本文针对 EF5+, Visual Studio 2012+ 空间数据类型(Spatial Data Types)是在 EF5 中引入的,空间数据类型表现有两种: Geography (地理学上 ...

  9. Delphi Data Types

    http://docwiki.embarcadero.com/RADStudio/XE6/en/Delphi_Data_Types Integer Data Types Type Descriptio ...

随机推荐

  1. mybatis DATE_FORMAT 格式化时间输出

    参考:http://www.cnblogs.com/yangy608/p/3950095.html 一.在oracle中,当想把字符串为‘2011-09-20 08:30:45’的格式转化为日期格式, ...

  2. 快速幂-hdu1097

    题目描述: 题目大意:给出两个数,求出a^b的最后一个数字. 代码实现: #include<stdio.h> using namespace std; int pow(int a,int ...

  3. 洛谷 p1164 小A点菜 【dp(好题)】 || 【DFS】 【恰好完全装满】

    题目链接:https://www.luogu.org/problemnew/show/P1164 题目背景 uim神犇拿到了uoi的ra(镭牌)后,立刻拉着基友小A到了一家……餐馆,很低端的那种. u ...

  4. uva 674 Coin Change 换钱币【完全背包】

    题目链接:https://vjudge.net/contest/59424#problem/A 题目大意: 有5种硬币, 面值分别为1.5.10.25.50,现在给出金额,问可以用多少种方式组成该面值 ...

  5. 操作系统概述(os 笔记一)

    操作系统概述 操作系统的目标和功能 1.目标:作为用户/计算机接口 ​ 计算机的使用人群大致可以分为三类,终端用户,程序开发者,操作系统设计人员. 对于终端用户,即应用程序的用户来说,他们通常不关注计 ...

  6. TFT LCD显示原理详解

    <什么是液晶> 我们一般认为物体有三态:固态.液态.气态,其实这只是针对水而言,有一些有机化和物 还有介于固态和液态中间的状态 就是液晶态,如下图(一):                 ...

  7. 项目冲刺Third

    Third Sprint PS:经今天讨论,我们小队决定撤掉用GUI设计界面,改用html和php制作,所以需要修改前面的博客及重新分配任务 1.各个成员今日完成的任务 蔡振翼:撰写博客 谢孟轩:借阅 ...

  8. bzoj4237: 稻草人 cdq分治 单调栈

    目录 题目链接 题解 代码 题目链接 bzoj4237: 稻草人 题解 暴力统计是n^2的 考虑统计一段区间对另一端的贡献 对于y值cdq分治,降调一维 对于当前两个分治区间统计上面那部分对下面那部分 ...

  9. AD软件原理图封装过程(即由原理图转换到PCB)

    第一步:先画出你所要的原理图 第二步:点击菜单栏的工具→封装管理器,进去封装管理器页面,点击左边的每一个元件, 然后选择封装时的元器件,再点击右边的确定(每一个元器件确定好封装要用的元件都要点确定) ...

  10. 目标(web前端)

    在学习web前端开发技术之前,对该课程的了解并不多,目标就是好好认真学习该课程的每一点知识,并好好掌握它.老师说该课程的内容比较多而且繁杂,那我希望我可以在今后的学习中有耐心的学好该门课程.