2011年3月23日 星期三

[Code] Selection Screen - Drop Down List


TYPE-POOLS: vrm.

DATA: gt_vrm TYPE vrm_values,
          gw_vrm TYPE LINE OF vrm_values,
          gv_vrm_id TYPE vrm_id.

DEFINE append_vrm.
    clear: gw_vrm.
    gw_vrm-key = &1.
    gw_vrm-text = &2.
    append gw_vrm to gt_vrm.
END-OF-DEFINITION.


PARAMETERS:
    p_brsch LIKE komg-brsch AS LISTBOX VISIBLE LENGTH 7
                                          MODIF ID b1b.

*----------------
* INITIALIZATION
*----------------
INITIALIZATION.
  gv_vrm_id = 'P_BRSCH'.
  append_vrm 'K001' '中華'.
  append_vrm 'K002' '台哥大'.
  append_vrm 'K003' '遠傳'.

*--------------------
* AT SELECTION-SCREEN
*--------------------
AT SELECTION-SCREEN OUTPUT.
* Set Drop Down List
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id = gv_vrm_id
      values = gt_vrm.




沒有留言:

張貼留言