How to Design Selection Screen in SAP ABAP
How to Design Selection Screen in SAP ABAP
In SAP ,we are using the selection screen to create input screen for the ABAP Programs ,End user enter the the input values in selection screen to get his required data .
There are three ABAP statements for defining selection screens:
PARAMETERS for single fields
SELECT-OPTIONS for complex selections
SELECTION-SCREEN for formatting the selection screen and defining user-specific selection screens.
The standard selection screen of executable programs is predefined and has the screen number 1000.
You can specify any of the following elements that have already been declared in another selection screen:
Blocks with the name block
Parameters with the name p
Selection criteria with the name selcrit
Comments with the name comm
Push buttons with the name push
Creating selection screens with Parameters
Single Input field.
*&---------------------------------------------------------------------*
*& Report ZSELECTIONSCREEN
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZSELECTIONSCREEN.
Types: BEGIN OF TY_EKKO,
EBELN TYPE EKKO-EBELN,
BUKRS TYPE EKKO-BUKRS,
BSTYP TYPE EKKO-BSTYP,
BSART TYPE EKKO-BSART,
END OF TY_EKKO.
data :it_ekko TYPE TABLE OF ty_ekko,
wa_ekko TYPE ty_ekko.
SELECTION-SCREEN begin of BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS p_ebeln type ekko-ebeln.
SELECT-OPTIONS s_ebeln for wa_ekko-ebeln.
SELECTION-SCREEN END OF BLOCK b1.
*& Report ZSELECTIONSCREEN
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZSELECTIONSCREEN.
Types: BEGIN OF TY_EKKO,
EBELN TYPE EKKO-EBELN,
BUKRS TYPE EKKO-BUKRS,
BSTYP TYPE EKKO-BSTYP,
BSART TYPE EKKO-BSART,
END OF TY_EKKO.
data :it_ekko TYPE TABLE OF ty_ekko,
wa_ekko TYPE ty_ekko.
SELECTION-SCREEN begin of BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS p_ebeln type ekko-ebeln.
SELECT-OPTIONS s_ebeln for wa_ekko-ebeln.
SELECTION-SCREEN END OF BLOCK b1.
Creating Selection screen with Select-options
We can select the data from low value to high value.
Creating selection with Block with frame and Title
Defining the text symbols for frame title and selection textxs(parameters)
Observe the Frame Title and Input field labels.
Calling user defined selection screens
CALL SELECTION-SCREEN screennumb [STARTING AT x1 y1]
[ENDING AT x2 y2].
Push button selection screen
SELECTION SCREEN PUSHBUTTON [/]pos(len) push
USER-COMMAND fcode [MODIF ID key].
Check boxes and Radio Buttons selection screen with Function Codes
Pushbuttons in the Application Toolbar
SELECTION-SCREEN FUNCTION KEY i .
Changing the Standard GUI Status
RS_SET_SELSCREEN_STATUS
Sets another GUI status defined in the same ABAP program, or deactivates functions of the standard GUI status.
RS_EXTERNAL_SELSCREEN_STATUS
Selection Screen Processing
The basic form of the selection screen events is the AT SELECTION-SCREEN event. This event occurs after the run time environment has passed all input data from the selection screen to the ABAP program. The other selection screen events allow programmers to modify the selection screen before it is sent and specifically check user input.
Finally ,we have Learnt ,what is selection screen ?how to create selection screen?and syntax of selection screen.
not enough clear, especially for SELECTION-SCREEN begin of BLOCK b1 WITH FRAME TITLE text-001.
ReplyDeleteyou should explain step by step how to config the frame title text