forked from PavelJaros/ABAP-Sublime-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistbox.sublime-snippet
36 lines (32 loc) · 1.02 KB
/
listbox.sublime-snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<snippet>
<content><![CDATA[
PARAMETERS:
p_${1:[field]} AS LISTBOX VISIBLE LENGTH 20 DEFAULT '1' OBLIGATORY.
*---------------------------------------------------------------------*
* FORM fill_listbox *
*---------------------------------------------------------------------*
FORM fill_listbox.
DATA: lt_values TYPE vrm_values,
ls_values TYPE LINE OF vrm_values,
l_id TYPE vrm_id.
ls_values-key = '1'.
ls_values-text = text-t01.
APPEND ls_values TO lt_values.
ls_values-key = '2'.
ls_values-text = text-t02.
APPEND ls_values TO lt_values.
ls_values-key = '3'.
ls_values-text = text-t03.
APPEND ls_values TO lt_values.
l_id = p_${1:[field]}.
TRANSLATE l_id TO UPPER CASE.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_id
values = lt_values.
ENDFORM. "fill_listbox
]]></content>
<tabTrigger>listbox</tabTrigger>
<scope>source.abp</scope>
<description>Listbox on sel. screen</description>
</snippet>