SAP 可用库存统计及MM自定义分类
减去已下订单未发货的数量
CLEAR zomeng. SELECT SUM( omeng ) INTO zomeng FROM vbbe WHERE matnr = mchb-matnr AND werks = mchb-werks AND lgort = mchb-lgort AND charg = mchb-charg. zkykc = mchb-clabs - zomeng.
CLEAR:ZHXPC,ZATINN. SELECT SINGLE ATINN INTO ZATINN FROM CABN WHERE ATNAM = 'ZHXPC'. SELECT SINGLE ATWRT INTO ZHXPC FROM AUSP WHERE OBJEK = MCHA-CUOBJ_BM AND KLART = '022' AND ATINN = ZATINN. **SAP定义的物料字典类,保存在CABN中,关联AUSP表,取出定义的批次属性;
CLEAR:ZLI_CHARG,ZATINN. SELECT SINGLE ATINN INTO ZATINN FROM CABN WHERE ATNAM = 'ZLI_CHARG'. SELECT SINGLE ATWRT INTO ZLI_CHARG FROM AUSP WHERE OBJEK = MCHA-CUOBJ_BM AND KLART = '022' AND ATINN = ZATINN. **供应商批号
CLEAR:ZLINAME,ZATINN.. SELECT SINGLE ATINN INTO ZATINN FROM CABN WHERE ATNAM = 'ZLINAME'. SELECT SINGLE ATWRT INTO ZLINAME FROM AUSP WHERE OBJEK = MCHA-CUOBJ_BM AND KLART = '022' AND ATINN = ZATINN. **供应商名称
活到老,学到老。