Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issues while disabling fields on the Radio button click

Hi Group,

I have a requirement as under:

in my screen, I have 2 frames:

first frame contains 2 radio buttons....

in the second frame, 2 input fields are there.....one for each of the radio buttons in the frame 1.

on selection of one radio button, the corresponding field should be enabled and the other should be disabled...and vice versa...

so please kindly give inputs to overcome this requirement.

Thanks in advance.

Regards,

Vishnu.

Tags:
Former Member
Former Member replied

hi vishnu .

REPORT zradio_button.

PARAMETERS: r_sale RADIOBUTTON GROUP r1 USER-COMMAND aaa DEFAULT 'X',

r_mat RADIOBUTTON GROUP r1.

SELECTION-SCREEN BEGIN OF BLOCK b1.

PARAMETERS: p_vbeln TYPE vbeln modif id aa.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2.

PARAMETERS: p_matnr TYPE matnr modif id bb.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN .

IF r_sale = 'X'.

IF screen-group1 = 'AA'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

if screen-group1 = 'BB'

screen-active =1.

modify screen.

endif.

ELSE.

IF screen-group1 = 'BB'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

if screen-group1 = 'AA'

screen-active =1.

modify screen.

endif.

ENDIF.

ENDLOOP.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question