List Boxes on Selection Screens

New Site Address: http://abap.mirrorz.com



Home

Definitions
OK Code Values
Other Useful Tips
SAP and ABAP Links
SAP Functions
SAP Reports
SAP Tables
Source Code
Transaction Codes

Site Map (Index)

ABAP Keyword Help


List Boxes on Selection Screens

Here is a short example of using list boxes on selection screens:


Example:
 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. 

New Site Address: http://abap.mirrorz.com


Send any hints or tips to ABAP Hints & Tips .
All submissions will be recognized along with the tip.

Get a cool web address
Free subdomains from
ShortURL.com