Basic SAP Data Types
Basic SAP Data Types
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 |
Decimal |
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.
|
|
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 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 |
Int32 |
- |
|
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 NoteThe 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 NoteThe 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 |
Int32 if length <=9 |
|
PREC (Accuracy) |
RFC_INT2 |
xsd:short |
Int16 |
|
QUAN (Quantity) |
RFC_BCD |
xsd:decimal NoteThe 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: One or more decimal places: |
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
Pattern contains time 00:00:00 to be compatible with |
XSD maxLength facet = 8 |
|
RFC_TIME |
XSD pattern facet
Pattern contains date 0001-01-01 to be compatible with |
XSD maxLength facet = 6 |
|
RFC_CHAR |
XSD maxLength facet |
same |
Basic SAP Data Types的更多相关文章
- 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 ...
- 【12c】扩展数据类型(Extended Data Types)-- MAX_STRING_SIZE
[12c]扩展数据类型(Extended Data Types)-- MAX_STRING_SIZE 在12c中,与早期版本相比,诸如VARCHAR2, NAVARCHAR2以及 RAW这些数据类型的 ...
- Oracle Schema Objects——Tables——Oracle Data Types
Oracle Schema Objects Oracle Data Types 数据类型 Data Type Description NUMBER(P,S) Number value having a ...
- 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 ...
- 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 ...
- "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 ...
- ExtJS笔记 Ext.data.Types
This is a static class containing the system-supplied data types which may be given to a Field. Type ...
- Entity Framework Code First (七)空间数据类型 Spatial Data Types
声明:本文针对 EF5+, Visual Studio 2012+ 空间数据类型(Spatial Data Types)是在 EF5 中引入的,空间数据类型表现有两种: Geography (地理学上 ...
- Delphi Data Types
http://docwiki.embarcadero.com/RADStudio/XE6/en/Delphi_Data_Types Integer Data Types Type Descriptio ...
随机推荐
- Spring Boot 项目实战(三)集成 Swagger 及 JavaMelody
一.前言 上篇介绍了 Logback 的集成过程,总体已经达到了基本可用的项目结构.本篇主要介绍两个常用工具,接口文档工具 Swagger .项目监控工具 JavaMelody 的集成步骤. 二.Sw ...
- Java中A instanceof B是什么意思?
instanceof用来判断内存中实际对象A是不是B类型 出现这种情况经常是需要强制转换的时候class Dog extends Animal譬如dog定义了自己的方法wangwang Animal ...
- vue+vue-cli+vuex+vrouter 开发学习和总结
1.项目目录结构 1.components------------------------->页面中所用的公共组件: 2.router index.js -------------------- ...
- Session失效后所有Ajax请求跳转登录地址
当登录的Session失效后,采用ajax请求数据时会没有反应,这时候应该自动跳转到登录页面,让用户重新登录. 全局配置以下可实现 $(function() { $.ajaxSetup({ compl ...
- HDU.1848.Fibonacci again and again(博弈论 Nim)
题目链接 //求三堆石子的SG函数,异或起来就是整个游戏的SG值 #include <cstdio> #include <cstring> const int N=1005; ...
- crm的知识点整理
''' # 1. 通过ChangeList封装好多数据 # 2. 销售中公共资源:Q查询,3天 15天 from django.db.models import F,Q F 使用查询条件的值,专门取对 ...
- JavaScript:谈谈let和const
最近接触到ES6的一些相关新特性,想借let和const两个命令谈谈JavaScript在变量方面的改进. 由于let和const有很多相似之处,我们就先说一说let吧. 1. let添加了块级作用域 ...
- Linux学习笔记10—Linux下chkconfig命令详解
chkconfig命令主要用来更新(启动或停止)和查询系统服务的运行级信息.谨记chkconfig不是立即自动禁止或激活一个服务,它只是简单的改变了符号连接. 使用语法: chkconfig [--a ...
- CNUTCon2017全球运维技术大会(持续更新中) - 斯达克学院 - 实战驱动的 IT 教育平台 - Powered By EduSoho
CNUTCon2017全球运维技术大会(持续更新中) - 斯达克学院 - 实战驱动的 IT 教育平台 - Powered By EduSoho https://new.stuq.org/cours ...
- golang语言并发与并行——goroutine和channel的详细理解
如果不是我对真正并行的线程的追求,就不会认识到Go有多么的迷人. Go语言从语言层面上就支持了并发,这与其他语言大不一样,不像以前我们要用Thread库 来新建线程,还要用线程安全的队列库来共享数据. ...
Note