"All fields
SELECT * FROM dbtab
WHERE ...
INTO ...
"Comma-separated list
SELECT col1, col2, col3
FROM dbtab
WHERE ...
INTO ...
"Comma-separated list, data source explicitly specified
SELECT dbtab~col1, dbtab~col2, col3
FROM dbtab
WHERE ...
INTO ...
"Data source explicitly specified, all fields
SELECT dbtab~*
FROM dbtab
WHERE ...
INTO ...
"Alias names
"Consider the following: You want to read data from a database table into a target data
"object but, for example, a name in the target is different. Provided that there will
"not be an issue regarding the type (conversion) when the values are assigned, you might
"specify an alias name for the database column to match a component's name in the target data object.
SELECT FROM dbtab
FIELDS comp1 AS comp_a, comp2 AS comp_b, comp3 AS comp_c
WHERE ...
INTO CORRESPONDING FIELDS OF TABLE @itab.
"Alias name also possible for the data source
SELECT ds~col1, ds~col2, ds~col3
FROM dbtab AS ds
WHERE ...
INTO ...
Serkan AKKAVAK
Computer Engineer BSc
SAP Department Manager
Contact : serkurumsal@yandex.com
0 Comments