方法一: 比较内表行数是否相同
DESCRIBE TABLEIT_TEMP LINES L_LINE1.
SORT IT_TEMP BYMATID.
DELETEADJACENT DUPLICATES FROM IT_TEMP COMPARING MATID.
DESCRIBE TABLEIT_TEMP LINES L_LINE2.
IF L_LINE1<> L_LINE2.
MESSAGE 'Reduplicate Materials Already Exist'TYPE 'E'.
ENDIF.
方法二: 直接比较内表是否相同/比较内表大小
IT_TEMP = IT_TAB.
SORT IT_TEMP BY MATID.
DELETE ADJACENT DUPLICATES FROM IT_TEMP COMPARING MATID.
IF IT_TEMP LT IT_TAB.
MESSAGE 'Reduplicate Information Already Exist' TYPE 'E'.
ENDIF.