Skip to Content

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

Enabling/disabling a parameter based on radiobutton

Hello experts,

I have a selection screen that has 3 radiobuttons named 'Display', 'Add' and 'Edit'.

Below the edit radiobutton I have a parameter named Ship-to code and here is what I want to do:

the parameter 'Ship-to code' must not be enabled if the user clicks on either the 'Display' or

'Add' radiobutton. It will only be enabled if user clicks on the 'Edit' radiobutton.

Again, thank you guys and have a nice day!

Tags:
replied

JUST COPY AND PASTE.....

Parameters: rd1 RADIOBUTTON group g1 default 'X' user-command ch ,

rd2 RADIOBUTTON group g1 ,

rd3 RADIOBUTTON group g1 ,

kishan1(10) type c modif id ID1.

AT SELECTION-SCREEN.

check sy-ucomm = 'CH'.

AT SELECTION-SCREEN output.

IF rd1 = 'X' or rd2 = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'ID1' .

screen-input = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

IF RD3 = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'ID1' .

screen-input = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

<b> 2) CHECK THAT ONE IF U WANT TO PARAMETER DISPLAY ONLY CLICK OF EDIT....</b>

Parameters: rd1 RADIOBUTTON group g1 default 'X' user-command ch ,

rd2 RADIOBUTTON group g1 ,

rd3 RADIOBUTTON group g1 ,

kishan1(10) type c modif id ID1.

AT SELECTION-SCREEN.

check sy-ucomm = 'CH'.

AT SELECTION-SCREEN output.

IF rd1 = 'X' or rd2 = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'ID1' .

screen-active = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

IF RD3 = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'ID1' .

screen-active = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question