04-25-2006 2:37 PM
<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.
04-25-2006 3:21 PM
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.
04-25-2006 2:47 PM
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.
04-25-2006 2:50 PM
04-25-2006 2:50 PM
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
04-25-2006 3:00 PM
<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.
04-25-2006 2:54 PM
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?
04-25-2006 3:07 PM
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
04-25-2006 3:23 PM
BURAK
when i click on m_but i get another box
do you see that
04-25-2006 3:11 PM
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
04-25-2006 3:21 PM
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.
04-25-2006 3:29 PM
Manoj wher have you been all the time
THANKS
thank you all guys
04-25-2006 3:35 PM
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