在实际业务中会碰到这样的问题:就是自主开发的程序,在选择屏幕界面输入的变量太多(即ALL ENTRIES超过9998),SQL语句会出现DUMP。
这个问题可以参照SAP NOTES 139003中的办法处理,
利用FOR ALL ENTRIES IN < TAB > 的方法实现。见下面例子:
REPORT ZDRMODEL.
tables : mara,marc.
data: begin of itab occurs 0,
matnr like mara-matnr,
werks like marc-werks,
end of itab.
parameters: p_werks like marc-werks.
select-options: s_matnr for mara-matnr.
initialization.
top-of-page.
skip 1.
write :/ ‘matnr‘.
skip 1.
end-of-page.
start-of-selection.
if s_matnr <> ‘‘.
loop at s_matnr.
itab-matnr = s_matnr-low.
append itab.
clear itab.
endloop.
endif.
end-of-selection.
loop at itab.
write:/ itab-matnr.
endloop.
原文:http://www.cnblogs.com/cikyblog/p/3680347.html