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

Select-screen problem

Former Member
0 Likes
1,908

Hi all

I have create one selection screen as follows

SELECTION-SCREEN BEGIN OF SCREEN 1001 ."AS WINDOW.

SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-101.

SELECT-OPTIONS : SO_PLANT FOR ZTAB_PP_PARAM-ZPLANT NO INTERVALS NO-EXTENSION OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B0 .

SELECTION-SCREEN END OF SCREEN 1001.

and call in follows

CALL SELECTION-SCREEN 1001 STARTING AT 5 5 ENDING AT 50 2.

its working properly

my problem if in the appear window has scroll in there end.

if i removed Block part its working

you can check Tcode CEWB that is standred code inthe bigining nice window displayed i want to create that type window.

please try to help me.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,800

HI,

chack it its same as cewb.

tables:mara.

SELECTION-SCREEN BEGIN OF SCREEN 1001 ."AS WINDOW.

SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-101 NO INTERVALS .

SELECT-OPTIONS: matnr FOR mara-matnr NO INTERVALS NO-EXTENSION OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B0 .

SELECTION-SCREEN END OF SCREEN 1001.

CALL SELECTION-SCREEN 1001 STARTING AT 1 1 ENDING AT 60 5.

rgds,

bharat.

14 REPLIES 14
Read only

sreenivasa_reddy1
Participant
0 Likes
1,800

Hi ,

Display length is not enough to display.

Please try to call the screen like this.

CALL SELECTION-SCREEN 1001 STARTING AT 5 5 ENDING AT 100 2.

Award points if its useful.

Regards'

Sreenivasa reddy pocha

Read only

Former Member
1,800

Hi,

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> <y1>]

[ENDING AT <x2> <y2>].

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.

When you start the program, the following sequence of screens is displayed:

1. The standard selection screen. If the user chooses Execute, the system displays

the warning SCREEN 1000 in the status bar.

2. Once the user has confirmed the warning by choosing Enter, selection screen 500

is called as a modal dialog box. When the user chooses Execute, the system

displays the warning SCREEN 500, also in a dialog box.

3. When the user has confirmed this warning, the standard selection screen is called

again, but this time as a modal dialog box. Since you cannot define the standard

selection screen as a modal dialog box, the warning message displayed when the

user chooses Execute appears in the status bar and not as a modal dialog box.

Consequently, you can only exit this selection screen using Cancel, since there is no

Enter function in the dialog box to confirm the warning message.

Regards,

Bhaskar

Read only

0 Likes
1,800

This is really helpful. Thanks!

Read only

former_member219399
Active Participant
0 Likes
1,800

Hi,

Just use CALL SCREEN 1001 STARTING AT 5 5 .

with regards,

Vamsi

Read only

0 Likes
1,800

no dear read my question again

i want a small window not default size

Starting 5 5 and ending 50 5 is correct i want to decrease there frame size.

Read only

gopi_narendra
Active Contributor
0 Likes
1,800

Check this code below.

The frame size is because of the statements

selection-screen : begin of block " Statements in your code. just remove that and your frame works.

if you want any title for ur screen just add the title text-001 extensions to your begin of screen 1001 statement like below.

TABLES : t001w.

SELECTION-SCREEN : BEGIN OF SCREEN 1001 title text-001.
PARAMETERS       : p_werks LIKE t001w-werks.
SELECTION-SCREEN : END OF SCREEN 1001.

CALL SELECTION-SCREEN 1001 STARTING AT 5 5 ENDING AT 50 2.

Hope this helps

Rewards points for all useful answers

Regards

Gopi

Read only

0 Likes
1,800

Thanks all

but all of you still not getting what i want

use standard Tcode CEWB

i want to create a window like that with same size.

Read only

Former Member
0 Likes
1,800

HI,

SELECTION-SCREEN BEGIN OF SCREEN 1001 ."AS WINDOW.

SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-101 <b>NO INTERVALS</b> .

SELECT-OPTIONS: SO_PLANT FOR ZTAB_PP_PARAM-ZPLANT NO INTERVALS NO-EXTENSION OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B0 .

SELECTION-SCREEN END OF SCREEN 1001.

CALL SELECTION-SCREEN 1001 STARTING AT 5 5 ENDING AT <b>60 5</b>.

reward all helpful answers.

rgds,

bharat.

Read only

former_member219399
Active Participant
0 Likes
1,800

Hi,

The addition WITH FRAME draws a frame around a block that is not empty. A maximum of five blocks can be nested. Since Release 6.20, a standard width of 120 columns has been defined for the outer frame (the width was previously 83 columns). The frame of each nested block has been shortened by 4 columns.

so I think the width of the frame can't be reassigned.

in the trx you mentioned it is a screen (modal dialog box) not a selection screen.

with regards,

Vamsi

Read only

Former Member
0 Likes
1,800

Hi Nelson ,,,

This code is working as like Tcode CEWB .... Please try the below

SELECTION-SCREEN BEGIN OF SCREEN 1001 ."AS WINDOW.
SELECT-OPTIONS : SO_PLANT FOR ZTAB_PP_PARAM-ZPLANT NO INTERVALS NO-EXTENSION OBLIGATORY.
SELECTION-SCREEN END OF SCREEN 1001.


CALL SELECTION-SCREEN 1001 STARTING AT 5 5 ENDING AT 50 2.

reward points if it is usefull ...

Girish

Read only

0 Likes
1,800

Hey Girish

see in the CEWB there is no any scroll bars

but when i run this code part scroll bar is comming that is the problem

Read only

0 Likes
1,800
TABLES : t001w.

SELECTION-SCREEN BEGIN OF SCREEN 1001 ."AS WINDOW.
SELECTION-SCREEN BEGIN OF BLOCK b0 WITH FRAME TITLE text-101.
SELECT-OPTIONS : so_plant FOR t001w-werks NO INTERVALS NO-EXTENSION
OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b0 .
SELECTION-SCREEN END OF SCREEN 1001.

call selection-screen 1001 starting at 2 2 ending at 85 5.

Now check this... Hope this is what you require...

You just need to adjust the co ordinates and thats all it works

Regards

Gopi

Read only

Former Member
0 Likes
1,801

HI,

chack it its same as cewb.

tables:mara.

SELECTION-SCREEN BEGIN OF SCREEN 1001 ."AS WINDOW.

SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-101 NO INTERVALS .

SELECT-OPTIONS: matnr FOR mara-matnr NO INTERVALS NO-EXTENSION OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B0 .

SELECTION-SCREEN END OF SCREEN 1001.

CALL SELECTION-SCREEN 1001 STARTING AT 1 1 ENDING AT 60 5.

rgds,

bharat.

Read only

0 Likes
1,800

Thanks all I got the correct answerer