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

按单生产3

时间:2018-06-06 15:16:09      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:none   分享图片   18C   engine   spl   style   attr   ndt   required   

 案例一:成品MO+半成品MO模式:
5000160338/20_1
000000101001019545CZ   001100908468
000000102001001160CZ   001201199715

技术分享图片
SELECT * FROM IN_MO where so_id=5000160338 and so_line_id=20;

SELECT DEMANDLINEID,SUPPLYORDERID,DEMANDORDERID,QTYALLOCATED,ITEM FROM ABPPMGR.SUPPLYDMDPEGPLAN  WHERE  ITEM IN(000000102001001160CZ,000000101001019545CZ);--前台显示

SELECT DEMANDORDERID,DEMANDLINEID,DEMANDTYPE,ITEM,QTYINMOVE,SOURCEDATE,SUPPLYORDERID,SUPPLYTYPE,QTYALLOCATED
 FROM ABPPMGR.supplydmdpegging WHERE (DEMANDORDERID=5000163998 AND DEMANDLINEID=20_1) OR DEMANDORDERID=5000160338/20_1-MFG001 
 OR DEMANDORDERID IN(001100908468,001201199715) OR SUPPLYORDERID IN (001100908468,001201199715) ; 
 
SELECT PRODUCTIONORDID,BOMID,ITEM,QTYORDERED,REQUIREDDATE,ROUTINGID,UDF_MO_FACTORY FROM ABPPMGR.PRODUCTIONORDERS WHERE PRODUCTIONORDID LIKE 5000160338%;--

SELECT ENTERPRISE, ENGINE_ID, SALESORDERID, SOLINENUM, ATTRIBUTECLASS, ATTRIBUTE, RELATIONSHIP, VALUE , SYS_CREATED_BY FROM ABPPMGR.SALESORDERLINE_P WHERE ATTRIBUTECLASS LIKE %5000160338_20_1%;
SELECT * FROM ABPPMGR.PRODUCTIONORDERS_P WHERE PRODUCTIONORDERID IN   (001100908468,001201199715) ; 
SELECT BOMID,ITEM,PRIORITY,ROUTINGID FROM ABPPMGR.MST_ITEMBOMROUTING WHERE ITEM IN(000000102001001160CZ,000000101001019545CZ);;
SELECT * FROM ABPPMGR.FORECASTDETAIL_P ;
SELECT * FROM ABPPMGR.INVENTORYPROPERTY WHERE ITEM IN(000000102001001160CZ,000000101001019545CZ);--
SELECT * FROM ABPPMGR.INVENTORY WHERE ITEM IN(000000102001001160CZ,000000101001019545CZ);--
View Code

 技术分享图片

技术分享图片

 技术分享图片

 技术分享图片

技术分享图片

技术分享图片

技术分享图片

 

 

 

案例二:成品MO+半成品MFG+半成品库存
5000161538/410_1
000000101001025515CZ   001100916046
000000102001001287CZ   5000161538/410_1-MFG000;2023/2010, 2023/2210;

技术分享图片
SELECT * FROM IN_MO where so_id=5000161538 and so_line_id=410;---无
SELECT * FROM IN_INVENTORY  WHERE ITEM_ID IN (000000101001025515,000000102001001287);
SELECT * FROM IN_SEMI_ONHAND_LOCKED  WHERE ITEM_ID IN (000000101001025515CZ,000000102001001287CZ);

SELECT LOCATIONID,DEMANDORDERID,DEMANDLINEID,SUPPLYTYPE,SUPPLYORDERID,QTYALLOCATED,ITEM FROM ABPPMGR.SUPPLYDMDPEGPLAN  WHERE  ITEM IN (000000101001025515CZ,000000102001001287CZ);--前台显示

SELECT ENTERPRISE, ENGINE_ID, SALESORDERID, SOLINENUM, ATTRIBUTECLASS, ATTRIBUTE, RELATIONSHIP, VALUE , SYS_CREATED_BY FROM ABPPMGR.SALESORDERLINE_P WHERE ATTRIBUTECLASS LIKE %5000161538_410_1%;

SELECT BOMID,ITEM,PRIORITY,ROUTINGID FROM ABPPMGR.MST_ITEMBOMROUTING WHERE ITEM in(000000101001025515CZ,000000102001001287CZ);

SELECT * FROM ABPPMGR.INVENTORYPROPERTY WHERE ITEM in(000000101001025515CZ,000000102001001287CZ) ;--or ITEM in(‘000000101002015678CZ‘,‘000000102002000589CZ‘);
SELECT * FROM ABPPMGR.INVENTORY WHERE ITEM in(000000101001025515CZ,000000102001001287CZ) ;
--还没开MO,不需要写入supplydmdpegging
SELECT DEMANDORDERID,DEMANDLINEID,DEMANDTYPE,ITEM,QTYINMOVE,SOURCEDATE,SUPPLYORDERID,SUPPLYTYPE,QTYALLOCATED
 FROM ABPPMGR.supplydmdpegging WHERE (DEMANDORDERID=5000161538 AND DEMANDLINEID=410_1) OR DEMANDORDERID LIKE5000161538/410_1%  OR DEMANDORDERID=001100916046 OR  SUPPLYORDERID=001100916046; 
----还没开MO,不需要写入PRODUCTIONORDERS
SELECT PRODUCTIONORDID,BOMID,ITEM,QTYORDERED,REQUIREDDATE,ROUTINGID,UDF_MO_FACTORY FROM ABPPMGR.PRODUCTIONORDERS WHERE PRODUCTIONORDID =5000161538/410_1-MFG001; --
SELECT * FROM ABPPMGR.PRODUCTIONORDERS_P WHERE PRODUCTIONORDERID IN (001100916046);

SELECT * FROM ABPPMGR.FORECASTDETAIL_P ;
View Code

 

技术分享图片

技术分享图片

 技术分享图片技术分享图片

技术分享图片

技术分享图片

技术分享图片

技术分享图片

 

 

 

 

 

 

案例三:成品MO+半成品库存
5000160338/50_1
000000101001019543CZ   001100915953
000000102001001241CZ   2023/2010

 技术分享图片

技术分享图片

 

案例四:成品MFG+半成品库存
5000161191/140_1
000000101001028842CA   5000161191/140_1-MFG000;
000000102001001650CA   2023/2010;

 技术分享图片

技术分享图片

 

案例五:成品MFG+半成品MO
5000165290/60_1
000000101001021117CA   5000165290/60_1-MFG001;
000000102001001118CA   001201194607;

技术分享图片

技术分享图片

 

按单生产3

标签:none   分享图片   18C   engine   spl   style   attr   ndt   required   

原文地址:https://www.cnblogs.com/Snowfun/p/9144361.html

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