You are on page 1of 6

How to Hide Parameters on Selection Screen

REPORT ZSACHIN_ALV_DEEP27. *----------------------------------------------------------------------* *TABLES* *----------------------------------------------------------------------* tables: mara, skb1, BSEG. *----------------------------------------------------------------------* *SELECTIONSCREEN* *----------------------------------------------------------------------* selection-screen: Begin of block b1 with frame title text-001. parameters : R1 radiobutton group g1 default 'X' user-command AA. select-options : s_bukrs for skb1-bukrs MODIF ID AA. parameters : p_GJAHR type bseg-GJAHR MODIF ID AA. parameters : p_MONAT type bkpf-MONAT MODIF ID AA. select-options : s_SEG for BSEG-SEGMENT MODIF ID AA. parameters : R2 radiobutton group g1. select-options: s1_bukrs for skb1-bukrs MODIF ID CC. parameters: p1_GJAHR type bseg-GJAHR MODIF ID CC. parameters: p1_MONAT type bkpf-MONAT MODIF ID CC. select-options: s1_SEG for bseg-SEGMENT MODIF ID CC. select-options: s1_PRCTR for bseg-PRCTR MODIF ID CC. selection-screen: end of block b1. *----------------------------------------------------------------------* * AT S E L E C T I O N S C R E E N O U T P U T * *----------------------------------------------------------------------* At selection-screen output. If R1 = 'X'. loop at screen. if screen-group1 = 'AA'. screen-input = '1'. modify screen. endif. if screen-group1 = 'CC'. screen-input = '0'. modify screen. endif. endloop.

CLEAR EMP_NO. screen-input = '1'. AT SELECTION-SCREEN. if screen-group1 = 'AA'. EMP_NO-SIGN = 'I'. screen-input = '0'. SELECT-OPTIONS: EMP_NO FOR ZKA_EMP-EMPNO. INITIALIZATION.elseif R2 = 'X'.ZKA_COM. endif. EMP_NO-HIGH = '10'. EMP_NO-OPTION = 'BT'. IF EMP_NO-LOW < '1'. MESSAGE S000(ZKA). ELSEIF EMP_NO-HIGH > '10'. if screen-group1 = 'CC'. endloop. endif. modify screen. . DATA: JTAB LIKE ZKA_COM OCCURS 0 WITH HEADER LINE. MESSAGE S001. APPEND EMP_NO. ENDIF. endif. DATA: ITAB LIKE ZKA_EMP OCCURS 0 WITH HEADER LINE. loop at screen. modify screen. TABLES: ZKA_EMP. EMP_NO-LOW = '1'. Example of Report having all events REPORT ZKA_REPORT MESSAGE-ID ZKA LINE-SIZE 255 LINE-COUNT 10(2). SET PF-STATUS 'ZKA_MENU'.

18 ITAB-EMPNAME. WRITE:/5 SY-VLINE.18 'EMPNAME'. WRITE:/ 'THE PAGE NO IS'. LOOP AT ITAB. LOOP AT ITAB. ENDLOOP.39 SY-VLINE.17 SY-VLINE. . WRITE:/5 SY-VLINE.18 ITAB-EMPNAME. WRITE:/5 SY-ULINE(35). SELECT * FROM ZKA_COM INTO TABLE JTAB WHERE EMPNO = ITAB-EMPNO. 29 ITAB-EMPPHONE.6 ITAB-EMPNO. IF SY-LSIND = 1. END-OF-SELECTION. WRITE:/ 'THE RECORD IS CLOSED'. WRITE:/5 SY-VLINE. END-OF-PAGE. ELSEIF SY-LSIND = 2.SY-PAGNO.39 SY-VLINE. AT LINE-SELECTION.6 ITAB-EMPNO. WRITE:/5 SY-ULINE(35). WRITE:/5 SY-ULINE(35).28 SY-VLINE. WRITE:/5 SY-ULINE(35).START-OF-SELECTION.39 SY-VLINE. SELECT * FROM ZKA_EMP INTO TABLE ITAB WHERE EMPNO = ITAB-EMPNO. WRITE:/5 SY-ULINE(35).17 SY-VLINE. LOOP AT JTAB. ENDLOOP. SELECT * FROM ZKA_EMP INTO TABLE ITAB WHERE EMPNO IN EMP_NO. TOP-OF-PAGE. HIDE: ITAB-EMPNO. 29 ITAB-EMPPHONE.17 SY-VLINE.28 SY-VLINE.6 'EMPNO'. 29 'EMPPHONE'.28 SY-VLINE.

ENDLOOP.28 SY-VLINE. WRITE:/5 SY-ULINE(35). ENDLOOP.28 SY-VLINE.6 JTAB-COMNO. WRITE:/5 SY-VLINE. WRITE:/5 SY-VLINE. WRITE:/5 SY-ULINE(35). IF SY-LSIND = 1. SELECT * FROM ZKA_COM INTO TABLE JTAB WHERE EMPNO = ITAB-EMPNO. LOOP AT ITAB. WRITE:/5 SY-VLINE.17 SY-VLINE.6 ITAB-EMPNO.WRITE:/5 SY-VLINE. ENDIF. ENDLOOP.28 SY-VLINE.18 ITAB-EMPNAME. SELECT * FROM ZKA_EMP INTO TABLE ITAB WHERE EMPNO = ITAB-EMPNO. 29 JTAB-COMPHONE. . 29 ITAB-EMPPHONE. ELSEIF SY-LSIND = 2.18 JTAB-COMNAME.18 JTAB-COMNAME. 29 ITAB-EMPPHONE.18 ITAB-EMPNAME.39 SY-VLINE. WRITE:/5 SY-ULINE(35). 29 JTAB-COMPHONE. SELECT * FROM ZKA_EMP INTO TABLE ITAB WHERE EMPNO = ITAB-EMPNO.17 SY-VLINE.39 SY-VLINE. ENDIF. AT USER-COMMAND. AT PF7. LOOP AT ITAB.28 SY-VLINE.17 SY-VLINE.6 ITAB-EMPNO.6 JTAB-COMNO.39 SY-VLINE. IF SY-LSIND = 1.39 SY-VLINE. LOOP AT JTAB.17 SY-VLINE. IF SY-UCOMM = '0001'.

17 SY-VLINE.39 SY-VLINE. ENDLOOP.18 JTAB-COMNAME. WRITE:/5 SY-VLINE. LOOP AT JTAB. Output is Given Below : .28 SY-VLINE. ELSEIF SY-LSIND = 2. 29 JTAB-COMPHONE. WRITE:/5 SY-ULINE(35). ENDIF.ENDLOOP. SELECT * FROM ZKA_COM INTO TABLE JTAB WHERE EMPNO = ITAB-EMPNO. WRITE:/5 SY-ULINE(35).6 JTAB-COMNO. ENDIF.

the system automatically sets the following system fields: System field Information SY-LINCT total line count of a list SY-LINNO current line no where cursor is placed. SY-LSIND Index of the list currently created during the current event (basic list = 0) SY-LISTI Index of the list level from which the event was triggered SY-LILLI Absolute number of the line from which the event was triggered SY-LISEL Contents of the line from which the event was triggered SY-CUROW Position of the line in the window from which the event was triggered (counting starts with 1) SY-CUCOL Position of the column in the window from which the event was triggered (counting starts with 2) SY-UCOMM Function code that triggered the event SY-PFKEY Always contains the status of the current list. SYLSIND equals 0.System fields used in interactive Reporting The SY-LSIND system field contains the index of the list currently created. --------------------- . With each interactive event. While creating a basic list.