Quick Contact

    SAP Tutorial
    Sap FI

    Using at Selection Screen output

    At Selection Screen output is a selection-screen event, which is used to manipulate dynamic changes on selection-screen.

    Loop At Screen. Screen is structure with Name, Group1, Group2, Group3, Group4, invisible, active, intensified etc fields, this holds the screen information at run time, Loop at Screen…Endloop. is used to loop through screen elements, and based on the values in above structure (SCREEN) we can manipulate changes.

    MODIF ID :

    MODIF ID is a three character id (without quotes), we can process a screen elements group using this MODIF ID, this will be stored in SCREEN-GROUP1.

    All Screen modifications should be done under AT SELECTION-SCREEN OUTPUT event only.

    MODIFY SCREEN is keyword which is used to apply screen modification.

    REPORT ZSPN_SELECTION_SCREEN_OUTPUT.

    PARAMETERS P_ENABLE AS CHECKBOX USER-COMMAND UC1.

    PARAMETERS: INPUT(5) TYPE C MODIF ID IN1 . “Based on modif id we will perform dynamic operations

    AT SELECTION-SCREEN OUTPUT.
    
      LOOP AT SCREEN.
        IF P_ENABLE = 'X'  ." If check box is selected
          IF SCREEN-GROUP1 = 'IN1' .
            SCREEN-ACTIVE = 1.
            MODIFY SCREEN.
          ENDIF.
        ELSE.
          IF SCREEN-GROUP1 = 'IN1' .
            SCREEN-ACTIVE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    

    Difference between at selection screen on field and at selection screen events

    At selection screen on the field and at selection screen are selection-screen events which are used for input validations in SAP report programming.

    At Selection Scteen on Field At Selection Screen
    This event is used to validate a single input field. This event is used to validate multiple input fields.
    If we this event, if any, error the error field will be highlighted and the remaining fields will be disabled. By using this event, the error field is heightened and all the remaining fields will be enabled.
    REPORT  ZSPN_SELECTION_SCREEN_EVENT.
    PARAMETERS P_FIELD1 TYPE CHAR10 .
    PARAMETERS P_FIELD2 TYPE CHAR10.
    
    AT SELECTION-SCREEN.
      IF P_FIELD1 IS INITIAL.
        MESSAGE 'Please enter field1' TYPE 'E'.
      ENDIF.
      IF P_FIELD2 IS INITIAL.
        MESSAGE 'Please enter field2' TYPE 'E'.
      ENDIF.
    
    REPORT  ZSPN_SELECTION_SCREEN_EVENT.
    PARAMETERS P_FIELD1 TYPE CHAR10 .
    PARAMETERS P_FIELD2 TYPE CHAR10.
    
    AT SELECTION-SCREEN ON P_FIELD1.
      IF P_FIELD1 IS INITIAL.
        MESSAGE 'Please enter field1' TYPE 'E'.
      ENDIF.
    AT SELECTION-SCREEN ON P_FIELD2.
      IF P_FIELD2 IS INITIAL.
        MESSAGE 'Please enter field2' TYPE 'E'.
      ENDIF.
    

     

    Apply now for Advanced SAP Course

    Copyright 1999- Ducat Creative, All rights reserved.

    Anda bisa mendapatkan server slot online resmi dan terpercaya tentu saja di sini. Sebagai salah satu provider yang menyediakan banyak pilihan permainan.