Get the App
SLTechnology News&Howtos  ›  Servers  › 

One of the ALV summary: simple report, layout, average summation

Shulou Source: shulou.com Published: 2022-06-02 06:09:42 10月04日 Update

Take table MARDH as an example to develop ALV reports.

The simplest ALV report

Let's start with the simplest ALV report. The source code is as follows

REPORT zquy_alv_test_01.

TYPE-POOLS slis.

TABLES: mardh.

DATA: it_fieldcat TYPE slis_t_fieldcat_alv

Wa_fieldcat TYPE slis_fieldcat_alv

BEGIN OF wa_data

Check TYPE c

Matnr TYPE matnr

Lgort TYPE lgort_d

Labst TYPE labst

END OF wa_data

Wt_data LIKE wa_data OCCURS 100 WITH HEADER LINE.

PARAMETERS: p_lfgja TYPE lfgja OBLIGATORY

P_lfmon TYPE lfmon OBLIGATORY.

START-OF-SELECTION.

PERFORM. Get_data.

PERFORM. Set_alv_layout.

PERFORM. Dis_alv_grid.

* &-- *

* & Form get_data

* &-- *

* populate data

*-*

*-- > p1 text

* 1000.

ENDFORM. "get_data

* &-- *

* & Form set_alv_layout

* &-- *

* set the display format of data

*-*

*-- > p1 text

*

Tags: Output report data format field average material program adjustment run maximum minimum uppercase width object reservoir area inventory control data structure maximum value Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Huawei macOS Docker vpn