-------------------- -------------------- -------------------- -------

 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
*&---------------------------------------------------------------------*
*& Report ZBC400_05_SELECT_CORR
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zbc400_05_select_corr.
TYPES:
*Создаем тип отличающийся от искомой таблицы на одно поле
BEGIN OF ltype_excolor,
mandt TYPE mandt,
id TYPE numc10,
colorname(20) TYPE c,
colorcode(8) TYPE c,
note1(20) TYPE c,
note(20) TYPE c,
counter TYPE numc10,
END OF ltype_excolor.
DATA lt_excolor TYPE STANDARD TABLE OF ltype_excolor.
DATA ls_excolor LIKE LINE OF lt_excolor.
*Выборка в соответствующие поля
SELECT * FROM zcolor INTO CORRESPONDING FIELDS OF TABLE lt_excolor.
LOOP AT lt_excolor INTO ls_excolor.
"Заполняем лишнее поле данными
CONCATENATE ls_excolor-counter ls_excolor-note INTO ls_excolor-note1.
WRITE: / ls_excolor-id, ls_excolor-colorname, ls_excolor-colorcode, ls_excolor-note1.
ENDLOOP.