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

problem with screen input

Former Member
0 Likes
1,713

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,286

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,286

hi,

Use below Code it will work for u

--


Activate & Deactivate Screen Fields--

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

Read only

0 Likes
1,286

what's new?

Read only

0 Likes
1,286

i think the problem is in selevct-option

Read only

0 Likes
1,286

Humm...You have defined <b>gr1</b> but using <b>GR1</b> in you IF-ENDIF...Doesn't ABAP case sensitive???

Greetings,

Blag.

Read only

0 Likes
1,286

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.

Read only

0 Likes
1,286

no it's not sensitive

Read only

Former Member
0 Likes
1,286

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 .

Read only

0 Likes
1,286

burak it not work

Read only

Former Member
0 Likes
1,287

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