Function implementation ALV Table 1: The simplest ALV display

Source: Internet
Author: User

ALV has three implementation methods: cl_salv_table, cl_gui_grid_display, and function, they are reuse_alv_list_display and reuse_alv_grid_display. Currently, functoin is used to implement Alv. In fact, the underlying layer of these two functions is also based on the class cl_gui_grid_display.

 

Let's take a look at the differences between the two functoin implementations of ALV?

 

ALV effect implemented with reuse_alv_grid_display

 

ALV effect implemented by reuse_alv_list_display

In fact, implementing ALV is quite simple, mainly called the two functions. The following describes the implementation steps:

I, Declare the internal table of the content to be displayed and obtain data

Data: it_spfli type table of spfli.

Select * From spfli into Table it_spfli.

II, Call the function of ALV

Call function 'reuse _ alv_list_display'

 
Exporting


I _structure_name = 'spfli'

Tables

T_outtab = it_spfli.

Note: The function called here is reuse_alv_list_display. If you want to achieve the first effect, you should call

Use reuse_alv_grid_display. The two display effects are different and the operation methods are basically the same.

In this example, two parameters are used to call the function: I _structure_name and

T_outtab. I _structure_name is the structure of the output list, And t_outtab is the content of the output list.

 

Below are all the source code

Data: it_spfli type table of spfli.

Select * From spfli into Table it_spfli.

 

Call function 'reuse _ alv_list_display'

Exporting


I _structure_name = 'spfli'

Tables

T_outtab = it_spfli.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.