当前位置:网站首页>ALV report in SAP tutorial - ABAP list viewer -012
ALV report in SAP tutorial - ABAP list viewer -012
2022-06-22 16:22:00 【Boating in rainy days】
SAP In the tutorial ALV The report - ABAP List viewer -012
A common required feature of any report is “ Column alignment ”, Sort , Filter , Subtotal , Total, etc . To do this from scratch , A lot of coding work is required . To avoid that , We can use one called ABAP List viewer (ALV) The concept of .
In this tutorial , You will learn :
- Simple report
- Block report
- Tiered reporting
- Show variations
Each of these reports provides Function module , These modules help to easily generate the required output . Let's take a closer look at them -
Simple report
The important functional modules in these reports are –
- Reuse_alv_fieldcatalog_merge
- Reuse_alv_list_display
- Reuse_alv_events_get
- Reuse_alv_grid_display
- Reuse_alv_commentary_write
REUSE_ALV_FIELDCATALOG_MERGE
This function module is used to populate the field directory , This is true of ALV It is important to display data in .
If the output data comes from a single dictionary table , And all columns are selected , Then we do not need to create the field directory exclusively . stay REUSE_ALV_LIST_DISPLAY Take the table name as a parameter (I_structure_name) Mention is enough . But in other cases , We need to create it .
Be careful : Field directories can also be manually populated by populating the internal table with all the required details
The important parameters in :
1. exit :
- I_program_name: The report ID
- I_internal_tabname: Internal output table
- I_inclname: contain Or the name of the report that processes all dynamic forms .
2. change
- ct_fieldcat : The type is SLIS_T_FIELDCAT_ALV The internal table of , In type pool SLIS In a statement .
REUSE_ALV_LIST_DISPLAY
This is the function module for printing data .
Important parameters are :
1. exit :
- I_callback_program: The report ID
- I_bypassing_buffer : ‘X’
- I_buffer_active : ’ ’
- I_callback_pf_status_set : routine , Users can set their own pf Status or change existing pf Function of state .
- I_callback_user_command: Routines that handle function code .
- I_structure name : The name of the dictionary table
- Is_Layout: Set the structure of the report layout
- It_fieldcat: Internal tables , It contains a list of all fields to be printed and their attributes ( This table can be automatically populated by functions )
- It_events : Internal table , It includes ALV A list of all possible events and their corresponding form names .
2. form :
- a. t_outtab: Internal table containing the data to be output
REUSE_ALV_EVENTS_GET:
Returns a table of possible events of list type
1. Import :
Et_Events : The event table will return the specified list type ( Column “NAME”) All possible callback events for . For the event to be handled by the callback , Its... Must be filled in “FORM” Field . If the field is initialized , Then ignore the event . This entry can be read from the event table , Fill in fields “FORM”, And use the type pool SLIS The constants in modify the entry .
2. exit :
I_list_type:0 = Simple list REUSE_ALV_LIST_DISPLAY
1 = Hierarchical order list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = Simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = Hierarchical order block list REUSE_ALV_BLOCK_LIST_HS_APPEND
REUSE_ALV_GRID_DISPLAY
ABAP4.6 New features in version , Used to display results in a grid , Instead of previewing .
Parameters : And reuse_alv_list_display identical
Be careful : The grid cannot handle high volumes . Sorting and other functions , If the amount of data to be displayed is very high , Scrolling down consumes a lot of resources / Time . There is no clear definition , If the amount of data is X, Then select a list or grid , But the developer must call it based on his experience . If not sure , Then the list is a better choice
REUSE_ALV_COMMENTARY_WRITE
This is in “ The first page ” Event to print the title and other comments of the list .
Important parameter
- It_list_commentary : The title is slis_t_listheader Internal table for .
This internal table has three fields :
- type : ‘H’ – title , ‘S’ – choice , ‘A’ – action
- key : Only if the typical value is “S” when .
- Information : Text to print
Block report
This looks like a simple report , But this report only has sorting and filtering functions . If you have to display multiple reports on the output , Use this report . Technically speaking , If you have multiple internal tables , The data is displayed as separate blocks , Then we will choose ALV Block report for .
Important functions for creating this report include :
- REUSE_ALV_BLOCK_LIST_INIT
- REUSE_ALV_BLOCK_LIST_APPEND
- REUSE_ALV_BLOCK_LIST_DISPLAY
REUSE_ALV_BLOCK_LIST_INIT
This function module is used to set the default GUI State, etc . These parameters are similar to reuse_alv_list_display or reuse_alv_grid_display
REUSE_ALV_BLOCK_LIST_APPEND
This function module adds data to the block .
Important parameter
1. exit :
- is_layout: Block layout settings
- it_fieldcat: Field Directory
- I_tabname: Internal table name containing all possible events
2. form : - t_outtab: Internal table containing output data .
REUSE_ALV_BLOCK_LIST_DISPLAY
This function module displays a list containing the data attached to the above function .
Parameters : All parameters are optional .
Tiered reporting
Hierarchical display is used to display relevant data . Such as sales order and material details . here , Sales order details can be header data , The items in the sales order can be item data
The function modules used for this purpose are
REUSE_ALV_HIERSEQ_LIST_DISPLAY
exit :
- I_CALLBACK_PROGRAM
- I_CALLBACK_PF_STATUS_SET
- I_CALLBACK_USER_COMMAND
- IS_LAYOUT
- It_fieldcat
- It_events
- I_tabname_header : The name of the internal table in the program that contains the highest hierarchy level output data .
- I_tabname_item : The name of the internal table in the program that contains the output data at the lowest hierarchy level .
- Is_keyinfo: This structure contains links between two tables ( Share key ) Title and item table field name .
surface
- t_outtab_header: Picture table to output data
- t_outtab_item : The name of the internal table in the program that contains the output data at the lowest hierarchy level .
Internal table 、 All definitions of structures and constants are in the name SLIS Declared in the type pool of . have access to REUSE_ALV_FIELDCATALOG_MERGE Auto populate this internal table .
Show variations
- Show variations for setting alv Default properties for output , Such as sorting conditions 、 Filter conditions 、 Total and subtotal, etc
- Display variations can be user specific and standard ( Standard variants can be used by any user )
- The display variant type that can be saved is determined by the parameters passed in the function module i_save control reuse_alv_list_display/ reuse_alv_grid_display
- You can provide an option on the selection screen , To select the display variant to use
And selection / Verify that the common functional modules related to display variants are
- Reuse_alv_variant_default_get
- Reuse_alv_variant_f4
- Reuse_alv_variant_existence
This is it. ABAP-ALV The whole content of programming !
Reference resources :https://www.guru99.com/alv-list-view-programming.html
边栏推荐
猜你喜欢

买网红雪糕的我,成了大冤种

数睿数据荣获第二届ISIG中国产业智能大会两项年度大奖

POD 类型

SAP ABAP 对话框编程教程:中的模块池-09

Runtime -- explore the nature of classes, objects, and classifications

使用stream api替代sql

Dear students, don't read the textbooks any more. Just read this one for the complexity of time

Runtime——探索类,对象,分类本质

SAP abap 数据类型,操作符和编辑器-02

【小程序项目开发-- 京东商城】uni-app开发之配置tabBar & 窗口样式
随机推荐
5. reading and writing of documents (students)
6.GUI(图形,填充)
二叉树练习第二弹
Deploy odoo to the server and configure it as a service
Simulation of stack and queue
Reddit对LaMDA模型的探讨:并非无状态,采用双重过程,相比它编辑维基百科的方式,有没有感情并不重要
过气剧本杀,被露营“复活”
wallys/WiFi6 MiniPCIe Module 2T2R 2×2.4GHz 2x5GHz
SAP ABAP data types, operators and editors-02
2.接口(计算器)
首个赛博格人陨落背后:科技与渐冻症的极限赛跑
中信建投证券是跟启牛学堂存在什么关系?开证券账户安全吗
ironSource Luna 推出苹果搜索广告限时优惠,注册即享3个月免费服务
Mysql触发器
SAP ABAP 数据字典教程 SE11:表、锁定对象、视图和结构 -03
[Shanda conference] definitions of some basic tools
SAP ABAP table control and example-07
What is SAP ABAP? Type, ABAP full form and meaning
Differences between Oracle client and server
Applet development - Custom expiration cache