引述
本文主要讲述怎么在open sql中选择字段怎么使用变量以及where条件怎么接变量
代码实例
"定义where条件的变量
data: lv_cond type string.
"定义select 字段的内表,可以将select的字段放到变量中,但是不能超过72个字符
"如果超过,需要用内表来接收
data:it_col type table of char70,
is_col like line of it_col.
data: it_tab type table of but000.
is_col = 'PARTNER PARTNER_GUID'.
append is_col to it_col.
is_col = 'BU_GROUP CRDAT'.
append is_col to it_col.
lv_cond = 'BU_GROUP = ''Z1'''.
select (it_col) into corresponding fields of table it_tab
from but000
where (lv_cond).