BADI:BOM_UPDATE
METHOD if_ex_bom_update~change_at_save. ******ADD BY ZJ 20231108 校验存储地点是否为空 S IF sy-tcode EQ 'CS01' OR sy-tcode EQ 'CS02' OR sy-tcode EQ 'CS03'. LOOP AT delta_stpob INTO DATA(ls_stpob) WHERE vbkz EQ 'U' OR vbkz EQ 'I'. SELECT COUNT(*) FROM mara AS a INNER JOIN marc AS b ON a~matnr EQ b~matnr WHERE b~lgpro = '' AND b~rgekz = '1' AND a~matkl EQ '331001' AND a~matnr EQ ls_stpob-idnrk. IF sy-subrc EQ 0 AND ls_stpob-lgort IS INITIAL. MESSAGE '组件料号' && ls_stpob-idnrk && ':' && '存储地点不能为空' TYPE 'E'. ENDIF. CLEAR:ls_stpob. ENDLOOP. ENDIF. ******ADD BY ZJ 20231108 校验存储地点是否为空 S ENDMETHOD.
标签:sy,CS02,CS03,CS01,ls,&&,stpob,EQ From: https://www.cnblogs.com/ap-ad-java-abap/p/17823521.html