Skip to Content

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

On radiobutton group event is not triggered..

Hi,

Based on radiobutton selection, I want to make select option field as input enabled or not.

This is the code I used. But the event ON RADIOBUTTON GROUP is not triggered at time of choosing the radio button. It is triggered only if I execute. But however the select option is also not changed in either ways. Please correct the code if I am wrong somewhere.

REPORT zk_chdoc.

TABLES: proj, aufk, cdhdr.

***************************************************************

SELECTION-SCREEN BEGIN OF BLOCK blk1

WITH FRAME TITLE text-001.

SELECT-OPTIONS: prjid FOR proj-pspid,

netid FOR aufk-aufnr MATCHCODE OBJECT auko.

SELECTION-SCREEN END OF BLOCK blk1.

SELECTION-SCREEN BEGIN OF BLOCK blk2

WITH FRAME TITLE text-002.

PARAMETERS: dis_last RADIOBUTTON GROUP rad DEFAULT 'X',

dis_perd RADIOBUTTON GROUP rad.

SELECT-OPTIONS: period FOR cdhdr-udate.

SELECTION-SCREEN END OF BLOCK blk2.

****************************************************************

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'PERIOD-LOW' OR screen-name = 'PERIOD-HIGH'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad.

IF dis_perd = 'X'.

LOOP AT SCREEN.

IF screen-name = 'PERIOD-LOW' OR screen-name = 'PERIOD-HIGH'.

screen-input = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF dis_last = 'X'.

LOOP AT SCREEN.

IF screen-name = 'PERIOD-LOW' OR screen-name = 'PERIOD-HIGH'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Tags:
Former Member replied

Hi,

I have changed the code you have written now run this code, you will get desired result-


TABLES: proj, aufk, cdhdr.

***************************************************************
SELECTION-SCREEN BEGIN OF BLOCK blk1
WITH FRAME TITLE text-001.
SELECT-OPTIONS: prjid FOR proj-pspid,
netid FOR aufk-aufnr MATCHCODE OBJECT auko.

SELECTION-SCREEN END OF BLOCK blk1.

SELECTION-SCREEN BEGIN OF BLOCK blk2
WITH FRAME TITLE text-002.
PARAMETERS: dis_last RADIOBUTTON GROUP rad DEFAULT 'X' user-command comm,
dis_perd RADIOBUTTON GROUP rad.
SELECT-OPTIONS: period FOR cdhdr-udate.

SELECTION-SCREEN END OF BLOCK blk2.
****************************************************************
AT SELECTION-SCREEN OUTPUT.

IF dis_perd = 'X'.
LOOP AT SCREEN.
IF screen-name = 'PERIOD-LOW' OR screen-name = 'PERIOD-HIGH'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF dis_last = 'X'.
LOOP AT SCREEN.
IF screen-name = 'PERIOD-LOW' OR screen-name = 'PERIOD-HIGH'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

0 View this answer in context

Helpful Answer

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