Application Development 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: 

SELECTION-SCREEN

Former Member
0 Kudos

Guys I have two SELECTION-SCREEN in my program , one of them have a option group and the other parameters , What I want to do is to make dissapear the parameters selection screen depending on one of the options of my options group selection screen , How Can I do that ? , I tried several ways in my AT SELECTION-SCREEN OUTPUT event but without any result , Could you give me any advice?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

did u write modify screen....if not do it.

you can use this sample code.

But instead of parameters im using select options.

Ans im hiding them depens on condition.

But, if you want to disable them,

you need to do like this :

SCREEN-INPUT = 0. instead of screen-active = 0.

once execute this code. ypu will get an idea.

REPORT Z50871_SELECTOPS_DYNAMIC.

PARAMETERS : CH_EBELN AS CHECKBOX,

CH_VBELN AS CHECKBOX.

DATA: V_EBELN TYPE EKKO-EBELN,

V_VBELN TYPE VBAK-VBELN.

SELECTION-SCREEN BEGIN OF SCREEN 100.

SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,

VBELN FOR V_VBELN MODIF ID G2.

SELECTION-SCREEN END OF SCREEN 100 .

AT SELECTION-SCREEN OUTPUT.

IF SY-DYNNR = 100.

IF CH_EBELN = 'X' AND

CH_VBELN = ''.

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'G1'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF CH_VBELN = 'X' AND

CH_EBELN = '' .

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'G2'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'G1'

OR SCREEN-GROUP1 EQ 'G2' .

SCREEN-ACTIVE = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

ENDIF.

AT SELECTION-SCREEN.

IF SY-DYNNR = 1000.

IF CH_EBELN = 'X' OR CH_VBELN = 'X'.

CALL SELECTION-SCREEN 100.

ELSE.

MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.

ENDIF.

ENDIF.

Regards

Sandeep Reddy

Edited by: Sandeep Reddy on May 27, 2008 5:24 PM

4 REPLIES 4

Former Member
0 Kudos

Have u used 'Screen' table for this.

Former Member
0 Kudos

hi,

write screen-input = 0 after checking the condition.

Cheers

vamshi

Former Member
0 Kudos

Hi,

In order to make the parameters invisible you can simply declare them as below :

parameter : lv_data like mara-matnr no-display.

or at selection-screen you will have to loop on the dynamic internal table 'screen' and for the screen fields you have to set screen-invisible = 'X' and then modify screen.

Regards,

Himanshu Verma

Former Member
0 Kudos

Hi,

did u write modify screen....if not do it.

you can use this sample code.

But instead of parameters im using select options.

Ans im hiding them depens on condition.

But, if you want to disable them,

you need to do like this :

SCREEN-INPUT = 0. instead of screen-active = 0.

once execute this code. ypu will get an idea.

REPORT Z50871_SELECTOPS_DYNAMIC.

PARAMETERS : CH_EBELN AS CHECKBOX,

CH_VBELN AS CHECKBOX.

DATA: V_EBELN TYPE EKKO-EBELN,

V_VBELN TYPE VBAK-VBELN.

SELECTION-SCREEN BEGIN OF SCREEN 100.

SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,

VBELN FOR V_VBELN MODIF ID G2.

SELECTION-SCREEN END OF SCREEN 100 .

AT SELECTION-SCREEN OUTPUT.

IF SY-DYNNR = 100.

IF CH_EBELN = 'X' AND

CH_VBELN = ''.

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'G1'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF CH_VBELN = 'X' AND

CH_EBELN = '' .

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'G2'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 EQ 'G1'

OR SCREEN-GROUP1 EQ 'G2' .

SCREEN-ACTIVE = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

ENDIF.

AT SELECTION-SCREEN.

IF SY-DYNNR = 1000.

IF CH_EBELN = 'X' OR CH_VBELN = 'X'.

CALL SELECTION-SCREEN 100.

ELSE.

MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.

ENDIF.

ENDIF.

Regards

Sandeep Reddy

Edited by: Sandeep Reddy on May 27, 2008 5:24 PM