异常提示: "B3220018730C" cannot be i

2022-01-26  本文已影响0人  SmalltalkVoice

异常提示: "B3220018730C" cannot be interpreted as a number

代码提示:

      DATA(ls_zcjjh) = itab-zi007 && '%'.
      IF itab-zi007 IS NOT INITIAL.
        SELECT zcjjh
        INTO TABLE @DATA(it_zcjjh)
        FROM ztpp008
        WHERE zcjjh LIKE @ls_zcjjh.
        DESCRIBE TABLE it_zcjjh LINES DATA(lines).
        IF lines = 0.
          itab-zi008 = ''.
        ELSE.
          LOOP AT it_zcjjh INTO DATA(wa_zcjjh).
            DATA(B_zcjjh) = |B{ wa_zcjjh-zcjjh+1 }|.
            SELECT SINGLE zlyjh
            INTO @DATA(ls_b_zcjjh)
            FROM ztpp008
            WHERE zlyjh = @b_zcjjh.
            IF sy-subrc = 0.
              DELETE it_zcjjh FROM wa_zcjjh.
            ENDIF.
            DATA(c_zcjjh) = |C{ wa_zcjjh-zcjjh+1 }|.
            SELECT SINGLE zlyjh
            INTO @DATA(ls_c_zcjjh)
            FROM ztpp008
            WHERE zlyjh = @c_zcjjh.
            IF sy-subrc = 0.
>>>            DELETE it_zcjjh wa_zcjjh.
            ENDIF.
          ENDLOOP.
          DESCRIBE TABLE it_zcjjh LINES DATA(ls_lines).
          IF ls_lines > 0.
            LOOP AT it_zcjjh INTO DATA(wa_ls_zcjjh).
              MOVE-CORRESPONDING itab TO zi008_itab.
              zi008_itab-zi008 = wa_ls_zcjjh-zcjjh.
              APPEND zi008_itab .
              itab-xflag = 'X'.
            ENDLOOP.

          ENDIF.
        ENDIF.
      ENDIF.

问题分析:

        SELECT zcjjh
        INTO TABLE @DATA(it_zcjjh)
        FROM ztpp008
        WHERE zcjjh LIKE @ls_zcjjh.

这里使用了临时定义的变量,结果系统没有检查到DELETE it_zcjjh wa_zcjjh语法错误

解决方案:

DELETE it_zcjjh WHERE zcjjh = wa_zcjjh-zcjjh.
上一篇 下一篇

猜你喜欢

热点阅读