1.Introduction
Ranges is a interal table with header line. So we query data as interal table.
2.Example
ranges: r_plant for ztsrm012-plant,
r_stge_loc for ztsrm012-stge_loc.
if r_stge_loc[] is not initial.
loop at r_stge_loc.
r_stge_loc-sign = 'I'.
r_stge_loc-option = 'EQ'.
modify r_stge_loc.
endloop.
endif.
if r_plant[] is not initial.
loop at r_plant.
r_plant-sign = 'I'.
r_plant-option = 'EQ'.
modify r_plant.
endloop.
endif.
select *
from ztsrm012
into corresponding fields of table lt_ztsrm012
where zcdte in s_udate
and plant in r_plant[]
and stge_loc in r_stge_loc[]
and ebeln2 in s_ebeln
and status = 'S'
and ( doc_type = 'CG01' or doc_type = 'CG03' or doc_type = 'CG07').
1747

被折叠的 条评论
为什么被折叠?



