0% found this document useful (0 votes)
77 views3 pages

Table Control: in Screen Painter (Se51) Write The Following

The document describes how to control a table using screen painter (SE51) and program code. It defines a table TAB1 with fields AIRLINE CARRIER and FLIGHT NUMBER. It contains ABAP code for a program ZSIR_TABLECONTROL that defines an internal table ITAB based on fields from database table SPFLI. It includes modules for output before and after input that populate and update the internal table from SPFLI. A user command module reads input and writes the internal table if a specific code is entered.

Uploaded by

Strider_17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views3 pages

Table Control: in Screen Painter (Se51) Write The Following

The document describes how to control a table using screen painter (SE51) and program code. It defines a table TAB1 with fields AIRLINE CARRIER and FLIGHT NUMBER. It contains ABAP code for a program ZSIR_TABLECONTROL that defines an internal table ITAB based on fields from database table SPFLI. It includes modules for output before and after input that populate and update the internal table from SPFLI. A user command module reads input and writes the internal table if a specific code is entered.

Uploaded by

Strider_17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 3

TABLE CONTROL

IN SCREEN PAINTER ( SE51) WRITE THE FOLLOWING


PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT ITAB WITH CONTROL TAB1 CURSOR TAB1-TOP_LINE.
MODULE MOVE.
ENDLOOP.

PROCESS AFTER INPUT.


MODULE USER_COMMAND_0100.
LOOP.
ENDLOOP.

-------------------------------------------------------------------------------------------------------------------------------------

PROPERTIES
TABLE NAME : TAB1
CONTROLS
FIELD1 :
NAME : SPFLI-CARRID
TEXT : AIRLINE CARRIER
FROM DICTIONARY : CHECKIT
FIELD2:
NAME : SPFLI-CONNID
TEXT : FLIGHT NUMBER
FROM DICTIONARY : CHECKIT
------------------------------------------------------------------------------------------------------------------------------------SE38 - IN PROGRAM WRITE THE FOLLOWING

PROGRAM ZSIR_TABLECONTROL .
TABLES SPFLI.
DATA : BEGIN OF ITAB OCCURS 0,
CARRID LIKE SPFLI-CARRID,
CONNID LIKE SPFLI-CONNID,
END OF ITAB.
CONTROLS TAB1 TYPE TABLEVIEW USING SCREEN '0100'.
DATA : OK_CODE LIKE SY-UCOMM.

*&---------------------------------------------------------------------*
*&
Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS SPACE.
* SET TITLEBAR 'xxx'.
SELECT CARRID CONNID FROM SPFLI INTO TABLE ITAB.
ENDMODULE.
" STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*&
Module MOVE OUTPUT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
MODULE MOVE OUTPUT.
MOVE-CORRESPONDING ITAB TO SPFLI.
ENDMODULE.
" MOVE OUTPUT
*&---------------------------------------------------------------------*
*&
Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0100 INPUT.
IF OK_CODE EQ 'DET'.
LEAVE TO LIST-PROCESSING.
LOOP AT ITAB.
WRITE:/ ITAB-CARRID,
ITAB-CONNID.
ENDLOOP.
ENDIF.
ENDMODULE.

" USER_COMMAND_0100 INPUT

You might also like