对于相同的前面,后面必须一样
DATA: BEGIN OF ls_qsjsbz, werks TYPE ztfi_zco001_001-werks, matnr TYPE ztfi_zco001_001-matnr, zqsjsbz TYPE ztfi_zco001_001-zqsjsbz, END OF ls_qsjsbz, lt_qsjsbz LIKE SORTED TABLE OF ls_qsjsbz WITH UNIQUE KEY werks matnr zqsjsbz. LOOP AT total. CHECK <action> <> 'D'. MOVE-CORRESPONDING <vim_total_struc> TO ls_qsjsbz. INSERT ls_qsjsbz INTO TABLE lt_qsjsbz. ENDLOOP. LOOP AT lt_qsjsbz INTO ls_qsjsbz. AT NEW matnr. DATA(lv_count) = 0. ENDAT. lv_count += 1. IF lv_count > 1. MESSAGE s001(cj) WITH '物料' ls_qsjsbz-matnr '只能使用一个标准' DISPLAY LIKE 'E'. RAISE saving_correction_failed. ENDIF. ENDLOOP.
标签:matnr,lv,lt,qsjsbz,ls,SM30,ztfi From: https://www.cnblogs.com/ckstock/p/17892994.html