Application Development 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: 

Is it possible to fire an event when radio buttons are clicked in a report?

Former Member
0 Kudos
1,299

Hi All,

I have got a requirement. In the selection screen i have certain input fields and three radio buttons. When radio buttons are clicked i have to grey out certain input fields. Is it possible to fire an event when i write program through se38??

Thanks

Rakesh

1 ACCEPTED SOLUTION

former_member386202
Active Contributor
0 Kudos
142

Hi,

Yes its possible use at selection screen event

AT SELECTION-SCREEN ON RADIO BUTTON

REgards,

PRashant

4 REPLIES 4

former_member386202
Active Contributor
0 Kudos
143

Hi,

Yes its possible use at selection screen event

AT SELECTION-SCREEN ON RADIO BUTTON

REgards,

PRashant

Former Member
0 Kudos
142

Hi,

You can do in SE38.

While defining your selection screen group the fields into different and at selection screen output event you need to use the below code :

at selection screen.

check for the radio button selection.

if rad1 = 'X'.

loop at screen.

screen-group = 'GP1'.

screen-fieldname = selection screen field.

screen-visible = '0' "greyed out.

modify screen.

endloop.

else.

screen-group = 'GP2.

screen-fieldname = selection screen field.

screen-visible = '0' "greyed out.

modify screen.

endloop.

endif.

Thanks,

Sriram Ponna.

Former Member
0 Kudos
142

Hi

You can assign a user command for your Radio button group. In the PAI, i.e AT SELECTION-SCREEN event, you can check what is the command which has triggered the PAI. If it is due to the Radio button, then you can grey out the desired fields in the Selection screen.

Thanks

Sharath.

former_member402443
Contributor
0 Kudos
142

Hi Rakesh,

Check this code.

SELECTION-SCREEN BEGIN OF BLOCK FINPUT WITH FRAME TITLE TEXT-001.

PARAMETERS : FILENAME(132) TYPE C LOWER CASE NO-DISPLAY,

FDLOAD RADIOBUTTON GROUP RAD1

USER-COMMAND R1 ,

FUPLOAD RADIOBUTTON GROUP RAD1 .

SELECTION-SCREEN END OF BLOCK FINPUT.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.

PARAMETERS : FUNAME(132) TYPE C LOWER CASE MODIF ID AA.

SELECTION-SCREEN PUSHBUTTON /33(30) ACTION USER-COMMAND

BTNACT MODIF ID AA VISIBLE LENGTH 8 .

SELECTION-SCREEN PUSHBUTTON 43(30) CANCEL USER-COMMAND

BTNCAN MODIF ID AA VISIBLE LENGTH 8 .

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.

PARAMETERS : FDNAME(132) TYPE C LOWER CASE MODIF ID BB.

SELECTION-SCREEN PUSHBUTTON /33(30) ACTIONS USER-COMMAND

BTNACT1 MODIF ID BB VISIBLE LENGTH 8.

SELECTION-SCREEN PUSHBUTTON 43(30) CANCELS USER-COMMAND

BTNCAN1 MODIF ID BB VISIBLE LENGTH 8.

SELECTION-SCREEN END OF BLOCK B2.

DATA : ACTNAME(8) TYPE C,SCRGRUP(2) TYPE C.

INITIALIZATION.

ACTIONS = 'Download'.

CANCEL = 'Cancel'.

ACTION = 'Upload'.

CANCELS = 'Cancel'.

ACTNAME = 'Download'.

SCRGRUP = 'AA'.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.

IF FUPLOAD = 'X'.

MOVE 'Upload' TO ACTION.

MOVE 'Upload' TO ACTNAME.

ELSEIF FDLOAD = 'X'.

MOVE 'Download' TO ACTION.

MOVE 'Download' TO ACTNAME.

ENDIF.

AT SELECTION-SCREEN.

IF SY-UCOMM = 'R1'.

IF ACTION = 'Download'.

SCRGRUP = 'AA'.

  • MESSAGE S007(ZMESSAGE).

ELSEIF ACTION = 'Upload'.

SCRGRUP = 'BB'.

  • MESSAGE S008(ZMESSAGE).

ENDIF.

ELSEIF SY-UCOMM = 'BTNCAN' OR SY-UCOMM = 'BTNCAN1'.

LEAVE PROGRAM.

ENDIF.

*AT USER-COMMAND.

  • CASE SY-UCOMM.

  • WHEN 'ACTIONS'.

  • LOOP AT SCREEN.

  • IF SCREEN-NAME = 'FUNAME'.

  • ENDIF.

  • ENDLOOP.

  • ENDCASE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR FUNAME.

PERFORM call_filedialog CHANGING FUNAME.

  • PERFORM call_filedialog CHANGING FUNAME.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Download' .

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Upload'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

FORM call_filedialog CHANGING fname.

DATA: li_filetable TYPE STANDARD TABLE OF file_table,

lv_return TYPE i,

lw_filetable TYPE file_table.

CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'

TABLES

file_table = li_filetable

EXCEPTIONS

cntl_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

READ TABLE li_filetable INDEX 1 INTO lw_filetable.

fname = lw_filetable-filename.

ENDFORM. "call_filedialog

Reward Points, if useful.

Regards,

Manoj Kumar