Skip to Content

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

report of radiobutton

dear friends i have created two radio buttons

1- material

2- sales document

and below that ther is a list box..when i click on radio buton one itshould show sattement regarding material and when i click on sales document it should show statement regarding sales document in the list box

but where ever i click its showing statement of sales only not material....following is my coding

please go through it and please suggest me mmodification in my coding.

TYPE-POOLS: VRM.

DATA: param TYPE vrm_id,

values TYPE vrm_values,

value LIKE LINE OF values.

SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME.

PARAMETERS :R RADIOBUTTON GROUP RAD,

R1 RADIOBUTTON GROUP RAD.

PARAMETERS : P1 AS LISTBOX VISIBLE LENGTH 20 MODIF ID ONE.

SELECTION-SCREEN END OF BLOCK BLK1.

AT SELECTION-SCREEN OUTPUT.

  • START-OF-SELECTION.

IF

R = 'RAD'.

PARAM = 'P1'.

VALUE-KEY = '1'.

VALUE-TEXT = 'GENERAL MATERIAL DATA'.

APPEND VALUE TO VALUES.

PARAM = 'P1'.

VALUE-KEY = '2'.

VALUE-TEXT = 'MATERIAL TYPES'.

APPEND VALUE TO VALUES.

PARAM = 'P1'.

VALUE-KEY = '2'.

VALUE-TEXT = 'UNITS OF MEASUREMENT'.

APPEND VALUE TO VALUES.

PARAM = 'P1'.

VALUE-KEY = '2'.

VALUE-TEXT = 'INDUSTRY FOR MATERIAL'.

APPEND VALUE TO VALUES.

PARAM = 'P1'.

VALUE-KEY = '2'.

VALUE-TEXT = 'MATERIAL GROUPS'.

APPEND VALUE TO VALUES.

ELSE.

R1 = 'RAD'.

PARAM = 'P1'.

VALUE-KEY = '1'.

VALUE-TEXT = 'SALES DOCUMENT HEADER DATA'.

APPEND VALUE TO VALUES.

PARAM = 'P1'.

VALUE-KEY = '2'.

VALUE-TEXT = 'SALES DOCUMENT TYPE'.

APPEND VALUE TO VALUES.

PARAM = 'P1'.

VALUE-KEY = '2'.

VALUE-TEXT = 'SALES DOCUMENT ORDER REASON'.

APPEND VALUE TO VALUES.

PARAM = 'P1'.

VALUE-KEY = '2'.

VALUE-TEXT = 'DELIVERIES BLOCKING REASON'.

APPEND VALUE TO VALUES.

PARAM = 'P1'.

VALUE-KEY = '2'.

VALUE-TEXT = 'BILLING REASON FOR BLOCKING'.

APPEND VALUE TO VALUES.

ENDIF.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = param

values = values

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

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