当前位置:网站首页>SAP ABAP data types and data objects
SAP ABAP data types and data objects
2022-06-11 08:54:00 【Boating in rainy days】
Data type and data object
stay abap In the sentence , Before using variables , Variables must be declared . During the declaration process , The following concepts will be involved :
1. data type
1.1.1. Data types describe the technical attributes of data objects ( Type and length ), User defined data objects
1.1.2. Itself cannot be directly referenced or assigned
1.1.3. data elements (data element ): The user defines a variable of field type
1.1.4. Structure (structre) : The user defines a structure variable in memory
1.1.5. Internal table type (table type): Used to define an internal table in memory
1.2 Where data types are used
1.2.1. Define screen fields
1.2.2. Define data objects in memory
1.2.3. Define subroutine (subroutine) Parameters of
1.2.4. Define the parameters of class methods in object-oriented
1.2.5. Definition function module Parameters in
1.3 Data type classification
1.3.1. Global type data element : structure,table type
1.3.2. Standard type
1.3.3. Local type :data type,structure type,tabletype
1.3.4. Type creation basic syntax :
grammar :
TYPE obj2 [TYPE type1 | LIKE obj1]
Example :
TYPE gty_char TYPE C LENGTH 10 . " Definition char The type length is 10 The type of
1.4. Variable
Declaration method 1: Reference data type
example :
DATA GV_DATA TYPE DATA_TYPE.
Classification of data types :
- Global type (se11) -data element , Str ,tty
- Standard type (C,N,D,T,F,I,P,STRING…)
- Local type ( In the program types)
Declaration method 2: Parameters are based on data objects
example :
DATA GV_DATA2 LIKE GV_DATA1.
1.5. structure
Local struct type declaration
example :
TYPES BEGIN OF STR_TYPE
TYPES F1 ....
TYPES F2 ....
.............
TYPES END OF STR_TYPE.
DATA GS_STR TYPE STR_TYPE.
1.6. Internal table
Table type declaration :
TYPES TABLE_TYPE TYPR TABLE OF LINE_TUPE
Internal table :
DATA GT_ITAB TYPE TABLE_TYPE.
DATA GT_ITAB2 TYPE TABLE OF STR_TYPE .
* suffix :
WITH HEADER LIKE " With header row
INITIAL SIZE N " Initialization size
OCCURS " Initialization size
2. Data objects
2.1. Data objects ( Text , Variable , Constant )
2.2.data The variable or entity structure that the keyword is used to declare has actual memory space .
3. System standard parameters
System defined data objects do not need to be declared , It can be used directly in the program (syst) In structure
- SY-SUBRC: Return code value ( 0 Represents successful operation )
- SY-UNAME: Current user name
- SY-TCODE Current transaction code
- SY-DATUM The current date
- SY-UZEIT current time
- SY-REPID Current program name
边栏推荐
- (二)从架构设计角度分析AAC源码-我的LiveData
- LiveData 与 StateFlow,我该用哪个?
- EN 45545-2:2020 T11烟毒性检测
- Zookepper===>动物管理员系统
- Display DIN 4102-1 Class B1 fire test requirements
- Mazhiqiang: research progress and application of speech recognition technology -- RTC dev Meetup
- Matlab learning 9- nonlinear sharpening filter for image processing
- vagrant 安装踩坑
- Sword finger offer 51 Reverse pair in array
- 【clickhouse专栏】新建库角色用户初始化
猜你喜欢

Introduction to knowledge atlas -- yedda annotation

处理RAW格式的图像,需要什么软件?

leetcode - 739. Daily temperature

Matlab r2022a installation tutorial

(一)aac开篇-核心组件原理之Lifecycle、LiveData、ViewModel与源码分析技巧(转载)

一些学习记录i=

File system check of the root filesystem failed

Award winning survey | how Apache pulsar lived in 2022, you the final say

M1 chip guide: M1, M1 pro, M1 Max and M1 ultra

Sword finger offer 10- ii Frog jumping on steps
随机推荐
[software tool] installation ffmpeg
CodeTop - 排序奇升偶降链表
预编译,编译,汇编,链接,静态库,动态库都是什么
GCC AVR (ATMEL studio+ AVR studio) how to define the structure array in the program memory (flash) space and read it
Matlab学习7-图像处理之线性平滑滤波
leetcode - 518. 零钱兑换 II
Can not connect to local MySQL server through socket ‘/tmp/mysql. sock (2)‘
剑指 Offer 51. 数组中的逆序对
Codetop - sort odd ascending even descending linked list
Codeworks round 680 div2
How many items should the indoor intumescent fire retardant coating meet according to BS 476-21 fire resistance standard?
Zookepper===> animal management system
K8s application (IV) - build a redis5 cluster (for direct external access)
【C语言-数据存储】数据在内存中是怎样存储的?
【Image Processing】空间域图像增强
Introduction to knowledge atlas -- yedda annotation
B+ super tree helps you know the underlying structure of MySQL
【clickhouse专栏】新建库角色用户初始化
K8S应用(四)—— 搭建redis5 集群(可供外部直接访问)
B+超强树,带你知晓MySQL的底层是怎样的结构