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

Module Pool Programming

maltesh0188
Participant
0 Likes
721

Hi,

Can any one suggest me how to go ahead with gray out the text box on selection of radio button,

simple Scenario ,

i have two radio buttons and two text boxes, so, when i select the 1st radio button second text box(T2) should be grayed out and if i select 2nd radio button then the 1st Text box(T1) should be grayed out.

6 REPLIES 6
Read only

Former Member
0 Likes
687

when you select one check box..

then check SY-UCOMM

if SY-UCOOMM is having that check box value..

then do

LOOP AT SCREEN.

IF SCREEN-NAME EQ 'TEXTBOX' "your text bax name

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
687

Hi,

There are tons of threads related to your question. Please search the SDN.

Read only

Former Member
0 Likes
687

Hi Malathesha,

In the PBO module of the screen ... try something like this ..

Check whether the Radio - button is SET ...if yes .. then make the text-box disabled...

LOOP AT SCREEN.

IF SCREEN-NAME EQ 'TEXTBOX' --> Your text box name...

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP

Hope this helps!

Cheers,

Kripa Rangachari.

Read only

Former Member
0 Likes
687

hi,

try this.

if r1 = 'X'.

loop at screen.

if screen-name = 'T2'.

screen-inpout = 0.

modify screen.

endif.

endloop.

elseif r2 = 'X'.

loop at screen.

if screen-name = 'T2'.

screen-inpout = 0.

modify screen.

endif.

endloop.

endif.

Read only

Former Member
0 Likes
687

Hi Malathesha,

It is difficult to explain the suggestion, Instead you cut and paste the code below and see the output .

PARAMETERS: rd1 RADIOBUTTON GROUP rad USER-COMMAND abc,

rd2 RADIOBUTTON GROUP rad.

PARAMETERS: mat1 TYPE matnr,

mat2 type matnr.

INITIALIZATION.

LOOP AT SCREEN.

IF screen-name = 'MAT2'.

screen-input = 0.

modify screen.

ENDIF.

ENDLOOP.

AT SELECTION-SCREEN OUTPUT.

IF rd1 IS not INITIAL.

LOOP AT SCREEN.

IF screen-name = 'MAT1'.

screen-input = 1.

modify screen.

ELSEIF screen-name = 'MAT2'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF rd2 IS not INITIAL.

LOOP AT SCREEN.

IF screen-name = 'MAT1'.

screen-input = 0.

modify screen.

ELSEIF screen-name = 'MAT2'.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Hope this may help you.

Regards,

Smart Varghese

Read only

maltesh0188
Participant
0 Likes
687

thank u all