Application Development and Automation 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: 
Read only

Report listbox

Former Member
0 Likes
471

how to inter values in the listbox .

how to inter values in the listbox .

3 REPLIES 3
Read only

Former Member
0 Likes
449

Refer this program:

DEMO_DROPDOWN_LIST_BOX

Regards,

Ravi

Read only

Former Member
0 Likes
449
PROGRAM zcmtest01. 
 TYPE-POOLS: vrm. 
 DATA: name TYPE vrm_id, 
       list TYPE vrm_values, 
       value LIKE LINE OF list. 
 
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT. 
  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. 
              
START-OF-SELECTION. 
  WRITE: / 'Parameter:', ps_parm. 
report z.
type-pools: vrm.
data: it_val type vrm_values,
      w_line like line of it_val.
parameters p_bukrs like t001-bukrs as listbox
           visible length 25 obligatory.
 
initialization.
  select bukrs butxt from t001 into (w_line-key, w_line-text).
    append w_line to it_val.
    check p_bukrs is initial.
    p_bukrs = w_line-key.
  endselect.
 
at selection-screen output.
  call function 'VRM_SET_VALUES'
       exporting
            id     = 'P_BUKRS'
            values = it_val.
 
end-of-selection.
  write: / 'Company Code:', p_bukrs.
Read only

Former Member
0 Likes
449

hi praveen,

use the FM VRM_SET_VALUES

check this thread...

https://forums.sdn.sap.com/click.jspa?searchID=1235922&messageID=2951115

do reward if it helps,

priya.