我用下面的条件去表中取数,表里明明有数据,可是就是取不到,经过后面debug分析,发现是aufnr的前导0的问题。
CHECK gt_out IS NOT INITIAL.
SELECT * INTO TABLE lt_pickinglis
FROM ztlwm_pickinglis
FOR ALL ENTRIES IN gt_out
WHERE aufnr = gt_out-aufnr
AND zklist = gt_out-zklist
AND zlist = gt_out-zlist
AND zmatklp = gt_out-zmatklp
AND matnr = gt_out-matnr.
内表gt_out中的数据是通过Excel上传得来的,所以是不带有前导0的,唉,这个坑纠结了半天,心中甚是纳闷,那就转换一下吧:
LOOP AT gt_out INTO gs_out.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = gs_out-aufnr
IMPORTING
output = gs_out-aufnr.
MODIFY gt_out FROM gs_out.
ENDLOOP.
网友评论