当前位置:网站首页>A specific example of ABAP type and EDM type mapping in SAP segw transaction code
A specific example of ABAP type and EDM type mapping in SAP segw transaction code
2022-07-05 12:55:00 【Wang Zixi】
The examples in this article focus on Edm Attribute ABAP Datetime Processing logic .Datetime Just mapping ABAP The type and EDM One of the examples of possible inconsistencies when typing .
about Edm.Datetime attribute , On the back end ,ABAP A field can be represented as a simple date or timestamp , It can be with or without decimal seconds .
therefore , stay Service Builder For one EDM.Datetime Properties of type , Additional information is needed to put this EDM Type maps to the correct in the backend ABAP Field type . If not mapped correctly , It will lead to wrong type assignment .
The correct type assignment is for MPC Automatic generation of is crucial , because DPC The implementation is based on MPC Types generated in the class .
stay Service Builder The initial solution to achieve this goal in is :
If precision = 0 also scale = 0, that ABAP internal type by type D.
If precision = 8 also scale = 0, that ABAP internal type by type P,length by 8 decimals by 0 (
timestamp without fractional seconds)If scale = 7, that ABAP internal type by type P,length 11 decimals 7 (
timestamp with fractional seconds)
In addition to using precision and scale Beyond attribute , You can also use Service Builder Medium ABAP Type Editor Come on Set up directly Internal type . stay ABAP In the type editor , You can manually set the category to internal type , The following rules :
- Type Kind = Date, Length = 8, Decimals = 0 ( representative Simple Date, internal type by D)
- Type Kind = Packed, Length = 15, Decimals = 0 (timestamp without fractional seconds, internal type stay MPC Shown in type P length 8 decimals 0)
- Type Kind = Packed, Length = 21, Decimals = 7 (timestamp with fractional seconds, internal type stay MPC Shown in type P,length 11 decimals 7)
The above described rules are reflected in the screenshot below :

perhaps , You can use ABAP The type editor will be a Data Element Assign to an attribute . stay ABAP In the type editor , You can manually turn Category Set to Date, And enter the data element name in the association type field .
When using RFC/BOR Import or assign DDIC Type , If the structure is assigned to the parent component ( That is to say Entity Type Or complex types ), Not in property Assign by level .
When used from DDIC Structure import options , The date field is handled as follows :
If the field's field is type
TZNTSTMPS, Then there is no decimal second timestamp ,MPC The internal type of is type P, length 8, decimal point 0If the domain type of this field is
TZNTSMPl, be MPC The internal type is P type , The length is 11 position , Would have a 7
边栏推荐
- Redis master-slave configuration and sentinel mode
- 以VMware创新之道,重塑多云产品力
- 10 minute fitness method reading notes (2/5)
- Research: data security tools cannot resist blackmail software in 60% of cases
- jxl笔记
- Kotlin变量
- Common commands and basic operations of Apache Phoenix
- 2021.12.16-2021.12.20 empty four hand transaction records
- Vonedao solves the problem of organizational development effectiveness
- Annotation problem and hidden Markov model
猜你喜欢

Annotation problem and hidden Markov model

JSON parsing error special character processing (really speechless... Troubleshooting for a long time)

How to connect the API interface of Taobao open platform (super detailed)

Transactions from December 27 to 28, 2021

What if wechat is mistakenly sealed? Explain the underlying logic of wechat seal in detail

I met Tencent in the morning and took out 38K, which showed me the basic smallpox

RHCSA5

What is the difference between Bi software in the domestic market

开发者,云原生数据库是未来吗?

前几年外包干了四年,秋招感觉人生就这样了..
随机推荐
Kotlin变量
Research: data security tools cannot resist blackmail software in 60% of cases
2021.12.16-2021.12.20 empty four hand transaction records
NFT: how to make money with unique assets?
Distance measuring sensor chip 4530a used in home intelligent lighting
I'm doing open source in Didi
SAP ui5 objectpagelayout control usage sharing
SAP SEGW 事物码里的 Association 建模方式
Transactions from January 6 to October 2022
RHCSA1
RHCSA4
Introduction to sap ui5 flexiblecolumnlayout control
2021-12-22 transaction record
Introduction to the principle of DNS
Annotation problem and hidden Markov model
Iterator details in list... Interview pits
10 minute fitness method reading notes (5/5)
LeetCode20.有效的括号
石臻臻的2021总结和2022展望 | 文末彩蛋
深度长文探讨Join运算的简化和提速