‎2006 Apr 25 2:12 PM
i want the field to swich but it does not happen.
i change <b>input to active, and active to input but</b>i dont solve the problem
PLS
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE gv_title.
PARAMETERS: z_period LIKE zcal_mstr-zsite.
SELECT-OPTIONS : zdate FOR sy-datum MODIF ID gr1.
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.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'GR1'.
screen-input = '0'.
MODIFY SCREEN.
ELSE.
screen-input = '1'.
ENDIF.
ENDLOOP.
clear screen.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.
CASE sy-ucomm.
WHEN 'RD1'.
IF w_but = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'GR1'.
screen-input = '0'.
MODIFY SCREEN.
ELSE.
screen-input = '1'.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'GR1'.
screen-input = '1'.
MODIFY SCREEN.
ELSE.
screen-input = '0'.
modify screen.
ENDIF.
ENDLOOP.
ENDIF.
ENDCASE.
‎2006 Apr 25 2:28 PM
Hi rani,
Remove other code just keep AT SELECTION-SCREEN OUTPUT.
this is enough to activate & deactive. i editted the message above.
just mention the condition when u have to deactivate.
When Modif id is used dont need to write logic for activation it is automatically done
‎2006 Apr 25 2:19 PM
hi,
Use below Code it will work for u
--
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF < condition when deactivate >.
IF screen-group1 = 'GR1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Dont use
AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.
just metion the proper condition when to deactive .
since u have used MODIF ID u dont need to activate the fields it is authomatically done when condition is dis satisfied.
Please feel free to ask further question.
Markhelpfull answers
Reagards,
Manoj
Message was edited by: Manoj Gupta
‎2006 Apr 25 2:20 PM
‎2006 Apr 25 2:21 PM
‎2006 Apr 25 2:23 PM
Humm...You have defined <b>gr1</b> but using <b>GR1</b> in you IF-ENDIF...Doesn't ABAP case sensitive???
Greetings,
Blag.
‎2006 Apr 25 2:27 PM
You should also specify the <b>SCREEN-NAME</b>, otherwise...The <b>LOOP AT SCREEN</b> is going to browse all fields and always put you SELECT-OPTION to 0...
Greetings,
Blag.
‎2006 Apr 25 2:27 PM
‎2006 Apr 25 2:23 PM
hi,
try ,
AT SELECTION-SCREEN OUTPUT.
if m_but ne space .
LOOP AT SCREEN.
IF screen-NAME CS 'ZDATE'.
screen-input = '0'.
ELSE.
screen-input = '1'.
ENDIF.
modify screen .
ENDLOOP.
endif .
‎2006 Apr 25 2:29 PM
‎2006 Apr 25 2:28 PM
Hi rani,
Remove other code just keep AT SELECTION-SCREEN OUTPUT.
this is enough to activate & deactive. i editted the message above.
just mention the condition when u have to deactivate.
When Modif id is used dont need to write logic for activation it is automatically done