Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to creat small selection screen

Former Member
0 Likes
572

hi all,

i need to creat small selection screen. any body help me in that....

hi all,

i need to creat small selection screen. any body help me in that....

4 REPLIES 4
Read only

Former Member
0 Likes
552
Read only

Former Member
0 Likes
552

hi

You can create user-defined selection screens in executable programs (reports), function modules and module pools. There are three ways how user-defined selection screens can be called.

Call From a Program

From any program in which selection screens are defined, you can call these screens at any point of the program flow using the following statement:

CALL SELECTION-SCREEN <numb> [STARTING AT <x1> <y 1>]

[ENDING AT <x2> <y 2>].

This statement calls selection screen number <numb>. The selection screen called must be defined in the calling program either as the standard selection screen (screen number 1000) or as a user-defined selection screen (any screen number). You must always use CALL SELECTION-SCREEN to call selection screens, and not CALL SCREEN. If you use CALL SCREEN, the system will not be able to process the selection screen.

You can display a user-defined selection screen as a modal dialog box using the STARTING AT and ENDING AT additions. This is possible even if you have not used the AS WINDOW addition in the definition of the selection screen. However, you are recommended to do so, since warnings and error messages that occur during selection screen processing will then also be displayed as modal dialog boxes (see example below).

When it returns from the selection screen to the program, the CALL SELECTION-SCREEN statement sets the return value SY-SUBRC as follows:

SY-SUBRC = 0 if the user has chosen Execute on the selection screen

SY-SUBRC = 4 if the user has chosen Cancel on the selection screen

Any time a selection screen is processed, the selection screen events are triggered. System field SY-DYNNR of the associated event blocks contains the number of the selection screen that is currently active.

REPORT SELSCREENDEF.

SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.

PARAMETERS: CITYFR LIKE SPFLI-CITYFROM,

CITYTO LIKE SPFLI-CITYTO.

SELECTION-SCREEN END OF BLOCK SEL1.

SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.

SELECTION-SCREEN INCLUDE BLOCKS SEL1.

SELECTION-SCREEN BEGIN OF BLOCK SEL2

WITH FRAME TITLE TIT2.

PARAMETERS: AIRPFR LIKE SPFLI-AIRPFROM,

AIRPTO LIKE SPFLI-AIRPTO.

SELECTION-SCREEN END OF BLOCK SEL2.

SELECTION-SCREEN END OF SCREEN 500.

INITIALIZATION.

TIT1 = 'Cities'.

AT SELECTION-SCREEN.

CASE SY-DYNNR.

WHEN '0500'.

MESSAGE W159(AT) WITH 'Screen 500'.

WHEN '1000'.

MESSAGE W159(AT) WITH 'Screen 1000'.

ENDCASE.

START-OF-SELECTION.

TIT1 = 'Cities for Airports'.

TIT2 = 'Airports'.

CALL SELECTION-SCREEN 500 STARTING AT 10 10.

TIT1 = 'Cities again'.

CALL SELECTION-SCREEN 1000 STARTING AT 10 10.

This executable program contains definitions for the standard selection screen and the user-defined screen number 500. Selection screen 500 is defined to be displayed as a modal dialog box and contains the SEL1 block of the standard selection screen. Note the phase in which the titles of the screens are defined. For the purpose of demonstration, the program calls warning messages with message class AT during the AT SELECTION-SCREEN event.

reward if helpful.

regards,

kiran kumar k

Read only

Former Member
0 Likes
552

Hi,

check this link for help and defining selection-screen

http://help.sap.com/search/highlightContent.jsp

SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 14 LINES.

SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1

DEFAULT SCREEN 12.

SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2

DEFAULT SCREEN 2000.

SELECTION-SCREEN END OF BLOCK tabb1.

Regards,

Sruthi.V

Read only

Former Member
0 Likes
552

hi ,

this is the syntax for the creating small screen

CALL SELECTION-SCREEN <numb> [STARTING AT <x1> <y 1>]

[ENDING AT <x2> <y 2>].

depending on requirement u give x1,x2,y1,y1