当前位置:网站首页>ALV report flow diagram
ALV report flow diagram
2022-07-26 05:11:00 【Lunar Yin shortage】
https://zhuanlan.zhihu.com/p/355316708
Write a ALV The steps of the report are as follows :
1. Declare the variables needed
TABLES: mseg , mkpf , ztmm063h , mara , makt , ekpo , ekko ,ztbc120h.
2. Define various options for the screen :
for example
SELECT-OPTIONS : s_mblnr FOR mseg-mblnr,
s_budat FOR mkpf-budat,
s_werks FOR mseg-werks,
s_lgort FOR mseg-lgort,
s_matnr FOR mara-mathn,
s_charg FOR ztmm063h-charg,
s_ebeln FOR ekpo-ebeln,
s_lifnr FOR mseg-lifnr.
SELECT-OPTIONS END OF BLOCK b1.
3. Reference output structure
DATA: gt_alv TYPE TABLE OF zsmm141a_alv,
gwa_alv TYPE zsmm141a_alv.
4. Define data processing logic
START-OF-SELECTION.
PERFORM frm_get_data.

Related knowledge
Internal table
An internal table is a sequence of data objects of the same type .
The internal table only exists during the operation of the program .
1. Purpose of internal table :
Temporarily store the data read from the database table , For further processing
Temporarily store the list data for display
As a data buffer, it is used for data exchange with other programs
2. Characteristics of internal tables
The number of rows in the internal table is not predefined , But dynamic growth ( Every time I grow 8K)
Row type of internal table (LINETYPE) It can be any kind of ABAP data type .
3. Types of internal tables :
Standard table , There is a linear index , Access mainly through index .
Sort table , Defined primary key , It can be accessed through primary key and index .
Hashtable , No index , It can only be accessed through the primary key .
4. Processing keywords of internal tables
APPEND: Add the contents of the workspace to the end of the internal table
INSERT: Add the contents of the workspace to the location specified by the internal table ( Line number )
COLLECT: Compare non numeric fields , Add numeric fields to the internal table
MODIFY: Overwrite the contents of the workspace with the rows specified in the internal table
DELECT: Delete the specified row from the internal table
LOOP AT: Read the data of the internal table row by row into the workspace
READ TABLE: Read the data of a specific row of the internal table into the workspace
SORT: Sort the interior
CLEAR: Be clear about the contents of the workspace
REFRESH: Delete all records in the internal table
database
stay ABAP In the program , There are two ways to access the database
OPEN SQL : standard SQL Subset , And ABAP Fully integrated , It is database independent , The database interface will automatically convert it to the standard of the database used SQL.
NATIVE SQL: Related to databases , Use the standards provided by the database SQL, Without syntax checking and conversion of database interface .
Avoid using NATIVE SQL
OPENSQL Visit introduction
OPENSQL Only function data operation language DML, Data definition language DDL adopt ABAP Dictionary object control .
adopt OPEN SQL What can be done :SELECT , UPDATE , INSERT , DELETE , MODIFY
You can use the system variable SY-SUBRC Judge whether the operation is successful ,SY-SUBRC = 0 Indicates successful execution , SYBRC <>0 It means that the execution is unsuccessful ,
For more detailed information, refer to the online help document
SAP SQL The basic format
SELECT Clause is used to determine what data to read - What fields does the result contain - Need to read single record or multiple records (SINGLE)- Whether the result can contain duplicate records (DISTINCT)
INTO Clause indicates the declared location where the read data is put into memory ( Variable , work area , Internal table )FROM Clause represents the data source ( Tables or views )
SAP SQL Read mode
have access to SELECT SINGLE Read a single record , Make sure that the records read out are unique , Need to be in WHERE Determine all primary keys in the statement
If not applicable SINGLE keyword , Then read all that meet WHERE Record of conditions , There are two ways to read :
1. Read the target area line by line in a circular way , Need by ENDSELECT Statement with .
2. Use SELECT…INTO TABLE sentence , Read all records that meet the conditions into the internal table at one time , No loops are used , Step needs ENDSELECT. This way of reading data is more efficient than the previous one .
3. stay INO clause , have access to CORRENPSONDING FIELDS OF , The system only fills in fields with the same name , If not applicable , Fill in from left to right
4. In the field list and WHERE clause , Just specify the field name , There is no need to specify the table name .•WHERE You can use AND or OR Realize complex logical conditions .
5.SELECT * Statement to read all fields of the transparent table , There can be no INTO Clause , But you have to use TABLES Declare transparent table .
SAP SQL Table linking method
have access to JOIN Connect multiple transparent tags to query
INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
Transparent tables can use aliases .
If the field exists in only one table , There is no need to specify the table name
边栏推荐
猜你喜欢

ALV程序收集
![[acwing] 1268. Simple questions](/img/f3/7eeae566dd74d77cf6f8b4640e4f29.png)
[acwing] 1268. Simple questions

C语言-指针进阶

5个chrome简单实用的日常开发功能详解,赶快解锁让你提升更多效率!

nacos注册中心

五个维度着手MySQL的优化,我和面试官都聊嗨了

DOM事件流 事件冒泡-事件捕获-事件委托
![[pytorch] install torch 1.8.1 and check whether torch version and GPU are available](/img/97/078c72729a29675939a84895b5ab86.png)
[pytorch] install torch 1.8.1 and check whether torch version and GPU are available

Alibaba three sides: how to solve the problems of MQ message loss, duplication and backlog?

MySQL basic learning
随机推荐
CMD operation command
ALV报表流程图解
Mysql主从同步及主从同步延迟解决方案
unity场景跳转脚本
MODFLOW flex, GMS, FEFLOW, hydraus practical application
开发转测试:从零开始的6年自动化之路
security权限管理详解
npm操作指令
Trend of the times - the rise of cloud native databases
ABAP语法学习(ALV)
Improve reduce parallelism in shuffle operation
[Luogu] p1383 advanced typewriter
Excel VBA:将多个工作表保存为新文件
BigDecimal 的 4 个坑,你踩过几个?
阿里云工业视觉智能工程师ACP认证——备考
MySQL master-slave synchronization and master-slave synchronization delay solution
Map making of environmental impact assessment based on remote sensing interpretation and GIS technology
Redis solves the problem of oversold inventory
Teach you how to use code to realize SSO single sign on
分子骨架跃迁工具-DeLinker介绍