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

Dynamic selection screen

Former Member
0 Likes
574

Hi,

I have declared in the selection screen as dynamic selection but when i run thre report its now showing the dynamic selection.How to get it

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
535

instead of changing the selection screen

u can group the field under groups and u can use this

PARAMETERS: p_myparm TYPE c LENGTH 15,

rb_rbn1 TYPE flag RADIOBUTTON GROUP g1 DEFAULT 'X' MODIF ID id1 ,

rb_rbn2 TYPE flag RADIOBUTTON GROUP g1 MODIF ID id2 ,

rb_rbn3 TYPE flag RADIOBUTTON GROUP g1 MODIF ID id3.

AT SELECTION-SCREEN OUTPUT.

PERFORM sub_output.

FORM sub_output.

IF p_myparm = ''.

LOOP AT SCREEN.

IF screen-group1 = 'ID1' OR screen-group1 = 'ID2' OR screen-group1 = 'ID3'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

ENDFORM.

4 REPLIES 4
Read only

Former Member
0 Likes
535

Hi,

Call that selection screen using call selection screen

CALL SELECTION-SCREEN dynnr

[STARTING AT col1 lin1

[ENDING AT col2 lin2]]

[USING SELECTION-SET variant].

ELECTION-SCREEN BEGIN OF BLOCK sel1 WITH FRAME TITLE tit1.

PARAMETERS: cityfr TYPE spfli-cityfrom,

cityto TYPE 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 TYPE spfli-airpfrom,

airpto TYPE 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 w888(SABAPDOCU) WITH 'Screen 500'.

WHEN '1000'.

MESSAGE w888(SABAPDOCU) 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.

Regards

Krishna

Edited by: Krishna Gowrneni on Apr 21, 2009 6:21 PM

Read only

Former Member
0 Likes
535

can u specify more as what do you mean by dynamic selection screen

Is it field validation at selection screen that you want ?

or specify the piece of code thats not working.

Read only

Former Member
0 Likes
536

instead of changing the selection screen

u can group the field under groups and u can use this

PARAMETERS: p_myparm TYPE c LENGTH 15,

rb_rbn1 TYPE flag RADIOBUTTON GROUP g1 DEFAULT 'X' MODIF ID id1 ,

rb_rbn2 TYPE flag RADIOBUTTON GROUP g1 MODIF ID id2 ,

rb_rbn3 TYPE flag RADIOBUTTON GROUP g1 MODIF ID id3.

AT SELECTION-SCREEN OUTPUT.

PERFORM sub_output.

FORM sub_output.

IF p_myparm = ''.

LOOP AT SCREEN.

IF screen-group1 = 'ID1' OR screen-group1 = 'ID2' OR screen-group1 = 'ID3'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

ENDFORM.

Read only

Former Member
0 Likes
535

HI,

Please mention in detail what is the problem?