Skip to Content

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

Radio Buttons are not getting populated

Hi

this is my program...

plz can any one tell me wt is wrong in my program?

my problm is wn i select " 2 line 2 " in drop down list Radio button 1 and Radio Button 2 should be

invisible and it should display only Radio Button 3....

bt in my program it is not happening....

TABLES: sscrfields.

DATA: name TYPE vrm_id,

list TYPE vrm_values,

value LIKE LINE OF list.

PARAMETERS: ps_parm AS LISTBOX VISIBLE LENGTH 10 USER-COMMAND abc.

PARAMETERS: r1 RADIOBUTTON GROUP ab MODIF ID bl2,

r2 RADIOBUTTON GROUP ab MODIF ID bl2,

r3 RADIOBUTTON GROUP ab MODIF ID bl3.

INITIALIZATION.

name = 'ps_parm'.

value-key = '1'. value-text = 'line 1'. APPEND value TO list.

value-key = '2'. value-text = 'line 2'. APPEND value TO list.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name

values = list.

LOOP AT SCREEN.

IF ps_parm = 1.

IF screen-name = 'r1' OR screen-name = 'r2'.

screen-invisible = 0.

ELSEIF screen-name = 'r3'.

screen-invisible = 1.

ENDIF.

MODIFY SCREEN.

ELSEIF ps_parm = 2.

IF screen-name = 'r1' OR screen-name = 'r2'.

screen-invisible = 1.

ELSEIF screen-name = 'r3'.

screen-invisible = 0.

ENDIF.

MODIFY SCREEN.

ELSEIF ps_parm = space.

r1 = 'X'.

CLEAR: r2,r3.

IF screen-name = 'r1' OR screen-name = 'r2' OR

screen-name = r3.

screen-invisible = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

AT SELECTION-SCREEN.

IF sscrfields-ucomm = 'abc'.

ENDIF.

START-OF-SELECTION.

WRITE: / 'Parameter:', ps_parm.

Former Member replied

Use capital letters in quotes and use at selection-screen output event.


type-pools:vrm.
TABLES: sscrfields.

DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.

PARAMETERS: ps_parm AS LISTBOX VISIBLE LENGTH 10 USER-COMMAND abc.

PARAMETERS: r1 RADIOBUTTON GROUP ab MODIF ID bl2,
r2 RADIOBUTTON GROUP ab MODIF ID bl2,
r3 RADIOBUTTON GROUP ab MODIF ID bl3.

INITIALIZATION.

name = 'PS_PARM'.
value-key = '1'. value-text = 'line 1'. APPEND value TO list.
value-key = '2'. value-text = 'line 2'. APPEND value TO list.

CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.

at selection-screen output.

LOOP AT SCREEN.
IF ps_parm = 1.
IF screen-name = 'R1' OR screen-name = 'R2'.
screen-invisible = 0.
ELSEIF screen-name = 'R3'.
screen-invisible = 1.
ENDIF.
MODIFY SCREEN.
ELSEIF ps_parm = 2.

IF screen-name = 'R1' OR screen-name = 'R2'.
screen-invisible = 1.
ELSEIF screen-name = 'R3'.
screen-invisible = 0.
ENDIF.
MODIFY SCREEN.
ELSEIF ps_parm = space.
r1 = 'X'.
CLEAR: r2,r3.
IF screen-name = 'R1' OR screen-name = 'R2' OR
screen-name = R3.
screen-invisible = 0.
MODIFY SCREEN.

ENDIF.
ENDIF.

ENDLOOP.

AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'abc'.
ENDIF.

START-OF-SELECTION.
WRITE: / 'Parameter:', ps_parm.

0 View this answer in context

Helpful Answer

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