Skip to Content
-1
Aug 13, 2020 at 06:57 AM

the Value 'X' is not found in internal table.

112 Views

Function I will do a check for program. When the material is marked by X. It will be stopped. Method I create an internal table. And I will take data from MARA to internal table. Then I do logic judgement. But it failed. I don't know why the Value 'X' is not found in internal table.

The code is following:

" 检查删除标识   ADD IT BY JINGGUL
LOOP AT lt_up.
MOVE-CORRESPONDING lt_up TO lt_LVORM.
append lt_LVORM.
ENDLOOP.
SELECT SINGLE LVORM INTO lt_LVORM-LVORM1 FROM MARA WHERE matnr =  lt_LVORM-matnr.
SELECT SINGLE LVORM INTO lt_LVORM-LVORM2 FROM MARC WHERE matnr =  lt_LVORM-matnr.


IF lt_LVORM-LVORM1  IS NOT INITIAL.
 MESSAGE '提示物料不存在' TYPE 'S' DISPLAY LIKE 'E'.
    LEAVE PROGRAM.
ENDIF.
IF lt_LVORM-LVORM1  IS NOT INITIAL.
MESSAGE '提示物料不存在' TYPE 'S' DISPLAY LIKE 'E'.
    LEAVE PROGRAM.
ENDIF.

I have a screenshot for you .

Attachments