IQC质检数量

Posted stephenamell

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IQC质检数量相关的知识,希望对你有一定的参考价值。

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质检数量的主要内容,如果未能解决你的问题,请参考以下文章

SAP 质检使用非物料基本单位

Part2.3 P1314 聪明的质检员 二分答案前缀和优化

IQC来料质量管理检验工作职责和开展方式要点

什么是在 C++ 中获取总内核数量的跨平台代码片段? [复制]

为啥尽管源代码没有变化,但从一个系统到另一个系统的片段数量却有很大差异?

生产制造追溯系统-IQC来料检验