SAP ABAP4 Learning --- Report Analysis Packet Display

xiaoxiao2021-03-06  109

* Description: Define a report, and the range of material numbers are corresponding to the range of materials by the range of materials input by the user. * Out of a horizontal line below each group. Differentiate different sets. Report ZTEST_LEANRED8233.

Tables: MSEG, SPFLI.

Data: ITAB Like SPFLI Occurs 0 with Header Line, JTAB Like Mseg Occurs 0 with header line.

* Define the screen input object.Selection-Screen BEGIN OF BLOCK Query_Car with frame titlext-000. Select-options input for mseg-mblnr obligatory.selection-screen end of block query_car.

* Initialization.

***************************** AT Selection-Screen *************** ************** At Selection-Screen.

****************************** Start-of-select. ************ ***************** Start-of-selection. * Call the subunies of the read data. Perform Fill Tables JTAB. * Call the subunies of the display data. Perform Out Tables JTAB.

*************************************** Then inserts such a inner table. * Take Carrid as a packet object, then select * The minimum data in these packets. ************************************** Form Fill Tables JTAB_TMP LIKE JTAB []. Select Mblnr Mjahr from MSEG INTO CORRESPONDING FIELDS OF TABLE JTAB_TMP WHERE MBLNR in Input Order by Mblnr.Endform.

*********************************** The data in the inner table is displayed. ************ ************************* FORM OUT TABLES JTAB_TMP LIKE JTAB []. * Print the header Perform Print_report_header.

* Start printing the internal table data. LOOP AT JTAB_TMP. WRITE: / 0 SY-VLINE, JTAB_TMP-MBLNR, 30 SY-VLINE, JTAB_TMP-MJAHR, 80 SY-VLINE. * Prints a horizontal line and jumps. At end of mjahr. Skip. Write: / sy-uline (80). Endat. Endloop.endform.

***************************** Output Head *************** . ************** FORM PRINT_REPORT_HEADER WRITE: / SY-ULINE (80), / 0 SY-VLINE, 'material document number' COLOR COL_POSITIVE, 30 SY-VLINE, 'material in IDOC 'Color Color Color Color Color Color Color Color Color COL_POSTIVE, 80 SY-VLINE, / SY-ULINE (80) .endform.

转载请注明原文地址:https://www.9cbs.com/read-105158.html

New Post(0)