码迷,mamicode.com
首页 > 其他好文 > 详细

IQC质检数量

时间:2020-06-07 21:26:58      阅读:99      评论:0      收藏:0      [点我收藏+]

标签:int   sele   test   info   epo   质量控制   color   loading   like   

IQC(Incoming Quality Control):来料质量控制

MMBE(库存概览)查看物料ATAA0062-22S当前的收货冻结库存为598PCS,也是是当前IQC数量为598PCS

技术图片

第1种获取物料的IQC数量方式:

*&---------------------------------------------------------------------*
*& Report ZQMRTEST
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZQMRTEST.

DATA: l_iqc LIKE mseg-menge,
      l_iqc_in LIKE mseg-menge,
      l_iqc_out LIKE mseg-menge.

"103 采购进入冻结库存
"106 冻结库存过账到未限制回转
"125 退货冻结库存回转
SELECT SUM( menge ) INTO l_iqc_in
          FROM mseg
          WHERE werks = 2000
          AND matnr = ATAA0062-22S
          AND bwart IN (103,106,125).

"104 采购进入冻结库存回转
"105 冻结库存过账到未限制
"124 退货冻结库存
SELECT SUM( menge ) INTO l_iqc_out
          FROM mseg
          WHERE werks = 2000
          AND matnr = ATAA0062-22S
          AND bwart IN (104,105,124).

l_iqc = l_iqc_in - l_iqc_out.
cl_demo_output=>write( l_iqc ).
cl_demo_output=>display(  ).

第2种获取物料的IQC数量方式:

*&---------------------------------------------------------------------*
*& Report ZQMRTEST
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZQMRTEST.

TYPES: BEGIN OF ty_xtab2,
  werks LIKE ekpo-werks,
  matnr LIKE ekpo-matnr,
  ebeln LIKE ekpo-ebeln,
  ebelp LIKE ekpo-ebelp,
  wesbs LIKE ekbe-wesbs,
  wesb2 LIKE ekbe-wesbs,
  meinh LIKE ekpo-meins,
END OF ty_xtab2.

DATA: lt_xtab2 TYPE TABLE OF ty_xtab2,
      l_iqc LIKE mseg-menge.

RANGES: lr_werks FOR ekpo-werks.

lr_werks-sign = I.
lr_werks-option = EQ.
lr_werks-low = 2000.
APPEND lr_werks.

CALL FUNCTION MB_SELECT_GR_BLOCKED_STOCK
       EXPORTING
*        X_KZVBR       = ‘ ‘
         X_MATNR       = ATAA0062-22S
         X_MEINS       = PCS
*        X_KZWSO       = ‘ ‘
*        X_NOVBR       = ‘ ‘
       TABLES
         XTAB2         = lt_xtab2
         XWERKS        = lr_werks.

LOOP AT lt_xtab2 INTO DATA(ls_xtab2).
  l_iqc = l_iqc + ls_xtab2-wesbs.
ENDLOOP.

cl_demo_output=>write( l_iqc ).
cl_demo_output=>display(  ).

 

IQC质检数量

标签:int   sele   test   info   epo   质量控制   color   loading   like   

原文地址:https://www.cnblogs.com/StephenAmell/p/13061846.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!