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: 

problem with screen input--i close the other

Former Member
0 Kudos

<b>here is my parametrs</b>

<b>at the start-w_but active z_period is gray

i want when i click in m_but or p_but

the field z_period will be gray and zdate active

now you can understand me</b>

SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE gv_title.

PARAMETERS: z_period LIKE zcal_mstr-zsite MODIF ID gr1.

SELECT-OPTIONS : zdate FOR sy-datum.

SELECTION-SCREEN END OF BLOCK bl1.

SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE g_title.

PARAMETERS: w_but RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND rd1.

PARAMETERS: m_but RADIOBUTTON GROUP rad1.

PARAMETERS: p_but RADIOBUTTON GROUP rad1.

SELECTION-SCREEN END OF BLOCK bl2.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

use one more MODIF ID ( different :- GR2 ) for the select option ZDATE.

AT SELECTION-SCREEN OUTPUT.

Loop at screen.

IF condition 1.

If screen-group3 = 'GR1'.

screen-active = '0'.

Endif.

endif.

if condition 2.

If screen-group3 = 'GR2'.

screen-active = '0'.

Endif.

endif.

Endloop.

Hope this solve the problem.

11 REPLIES 11

Former Member
0 Kudos

Hi Rani,

I am a bit confused about what you really want to do. Assuming you want to make some fields inactive based on some condition, this is what I would suggest you do.

use the

AT SELECTION SCREEN OUTPUT event.

Loop at screen.

If screen-group3 = 'GR1'. <which is ur MODIF ID>

screen-active = '0'.

Endif.

Endloop.

0 Kudos

why group3 and not group1?

0 Kudos

For my solution to work, you'll have to press 'Enter'.

Also, you'll have to use 'Modify Screen' statement in the If-Endif block.

It will be better if you could again clarify your requirements.

-Ameya

0 Kudos

<b>i made that and it's not work<b></b></b>

SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE gv_title.

PARAMETERS: z_period LIKE zcal_mstr-zsite MODIF ID GR1.

SELECT-OPTIONS : zdate FOR sy-datum.

*PARAMETERS: w_but RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND rd1.

SELECTION-SCREEN END OF BLOCK bl1.

SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE g_title.

PARAMETERS: w_but RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND rd1.

PARAMETERS: m_but RADIOBUTTON GROUP rad1.

PARAMETERS: p_but RADIOBUTTON GROUP rad1.

SELECTION-SCREEN END OF BLOCK bl2.

****************************

******GRAY FIELD*********

*************************

INITIALIZATION.

LOOP AT SCREEN.

IF screen-group1 = 'GR1'.

screen-input = '0'.

MODIFY SCREEN.

ELSE.

screen-input = '1'.

ENDIF.

ENDLOOP.

clear screen.

AT SELECTION-SCREEN OUTPUT.

Loop at screen.

If screen-group3 = 'GR1'.

screen-active = '0'.

Endif.

Endloop.

Former Member
0 Kudos

Rani,

I am sorry. It should be group1 and not group3. You'll understand the way values are passed by debugging.

Also, rani, I guess there is some confusion in your query. You said --

here is my parametrs

at the start-w_but active z_period is gray

i want when i click in m_but or p_but

the field z_period will be gray and zdate active

now you can understand me

But isnt z_period already gray?

Former Member
0 Kudos

Hi Rani,

u say it doesnt work but i tried here and it works...

just write below your selection definitions.


AT SELECTION-SCREEN OUTPUT.
if w_but ne space .
LOOP AT SCREEN.
IF screen-NAME CS 'Z_PERIOD'.
screen-input = '0'.
ENDIF.
IF screen-NAME CS 'ZDATE'.
screen-input = '1'.
ENDIF.
modify screen .
ENDLOOP.
elseif w_but = space .
LOOP AT SCREEN.
IF screen-NAME CS 'Z_PERIOD'.
screen-input = '1'.
ENDIF.
IF screen-NAME CS 'ZDATE'.
screen-input = '0'.
ENDIF.
modify screen .
ENDLOOP.
endif .

thats all...u dont need to use gr1 or anything else...

regards,

Burak

0 Kudos

BURAK

when i click on m_but i get another box

do you see that

Former Member
0 Kudos

Hi Rani,

You have used the group3 and not group1. Use Group1.

Also, what Burak said can be used. But if there a list of fields you want to control, going for MODIF ID would be suggested.

-Ameya

Former Member
0 Kudos

Hi

use one more MODIF ID ( different :- GR2 ) for the select option ZDATE.

AT SELECTION-SCREEN OUTPUT.

Loop at screen.

IF condition 1.

If screen-group3 = 'GR1'.

screen-active = '0'.

Endif.

endif.

if condition 2.

If screen-group3 = 'GR2'.

screen-active = '0'.

Endif.

endif.

Endloop.

Hope this solve the problem.

0 Kudos

Manoj wher have you been all the time

THANKS

thank you all guys

Former Member
0 Kudos

Hi Rani,

I am not getting any other box.

Its very simple actually.

You can write something like ::

SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE gv_title.

PARAMETERS: z_period TYPE ext_ui MODIF ID gr1.

SELECT-OPTIONS : zdate FOR sy-datum.

SELECTION-SCREEN END OF BLOCK bl1.

SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE g_title.

PARAMETERS: w_but RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND rd1.

PARAMETERS: m_but RADIOBUTTON GROUP rad1.

PARAMETERS: p_but RADIOBUTTON GROUP rad1.

SELECTION-SCREEN END OF BLOCK bl2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF m_but IS NOT INITIAL

OR p_but IS NOT INITIAL.

  • Disable MPRN field

IF screen-group1 = 'GR1'.

z_period = space.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Similar logic can be used to enable disable other fields

-Ameya