查询以检查紧急生产订单

2020-09-22 03:45发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


嗨,专家

我写了一个查询来检查紧急生产订单请求

当生产订单链接到销售订单时,它可以很好地工作,但是一旦生产订单被单独提出并且不与销售订单链接时,

它没有出现在查询结果中吗?

有人可以帮我找出我要去哪里的地方吗?

选择


 前百分之(100)


 T2.DueDate AS [构建日期],


 T1.ShipDate AS [必须发送],


 T0.DocNum AS [销售订单],


 T0.CardName AS [销售合作伙伴],


 T1.U_Prod_Order_No AS [Prodn.Order],


 T1。数量AS数量,


 T1.ItemCode AS [产品代码],


 T1.Dscription AS [产品说明],


 T2。评论


 从


 dbo.ORDR AS T0内部联接dbo.RDR1 AS T1在T0.DocEntry = T1.DocEntry



 内联接dbo.OWOR AS T2 ON ISNULL(T1.U_Prod_Order_No,-1)
 = T2.DocNum


 哪里


 (T2。状态IN('P','R'))和


 (T1.ShipDate <> CONVERT(DATETIME,'2033-03-03
 00:00:00',102))和


 (T1.ShipDate <> CONVERT(DATETIME,'2044-04-04
 00:00:00',102))和


 (T1.ShipDate <> CONVERT(DATETIME,'2033-03-04
 00:00:00',102))和


 (T1.ShipDate> = GETDATE()-1)和


 (T1.ShipDate <= GETDATE()+ 20)


 通过...分组


 T0.DocNum,T1.ShipDate,T0.CardName,T1.U_Prod_Order_No,
 T1.Quantity,T1.ItemCode,T1.Dscription,T2.Comments,T2.DueDate


 拥有


 (T2。评论,例如N'%% URGENT %%')或


 (T2。评论,例如N'%% urgent %%')或


 (T2。评论类似N'%% PRIORITY %%')


 ORDER BY [必须发货],[销售伙伴],[销售订单]
 

感谢和问候

拉胡尔

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


嗨,专家

我写了一个查询来检查紧急生产订单请求

当生产订单链接到销售订单时,它可以很好地工作,但是一旦生产订单被单独提出并且不与销售订单链接时,

它没有出现在查询结果中吗?

有人可以帮我找出我要去哪里的地方吗?

选择


 前百分之(100)


 T2.DueDate AS [构建日期],


 T1.ShipDate AS [必须发送],


 T0.DocNum AS [销售订单],


 T0.CardName AS [销售合作伙伴],


 T1.U_Prod_Order_No AS [Prodn.Order],


 T1。数量AS数量,


 T1.ItemCode AS [产品代码],


 T1.Dscription AS [产品说明],


 T2。评论


 从


 dbo.ORDR AS T0内部联接dbo.RDR1 AS T1在T0.DocEntry = T1.DocEntry



 内联接dbo.OWOR AS T2 ON ISNULL(T1.U_Prod_Order_No,-1)
 = T2.DocNum


 哪里


 (T2。状态IN('P','R'))和


 (T1.ShipDate <> CONVERT(DATETIME,'2033-03-03
 00:00:00',102))和


 (T1.ShipDate <> CONVERT(DATETIME,'2044-04-04
 00:00:00',102))和


 (T1.ShipDate <> CONVERT(DATETIME,'2033-03-04
 00:00:00',102))和


 (T1.ShipDate> = GETDATE()-1)和


 (T1.ShipDate <= GETDATE()+ 20)


 通过...分组


 T0.DocNum,T1.ShipDate,T0.CardName,T1.U_Prod_Order_No,
 T1.Quantity,T1.ItemCode,T1.Dscription,T2.Comments,T2.DueDate


 拥有


 (T2。评论,例如N'%% URGENT %%')或


 (T2。评论,例如N'%% urgent %%')或


 (T2。评论类似N'%% PRIORITY %%')


 ORDER BY [必须发货],[销售伙伴],[销售订单]
 

感谢和问候

拉胡尔

付费偷看设置
发送
7条回答
宇峰科技
1楼-- · 2020-09-22 04:15

嗨,大家好

我已经尝试使用LEFT OUTER JOINS,但是未链接到销售订单的生产订单不会出现在查询结果中

下面是我从发布的原始查询中修改的查询,该查询使用了Augusto的联接,由于遇到了错误,我不得不对其进行了一些更改

选择
 前百分之(100)
 T2.DueDate AS [构建日期],
 T1.ShipDate AS [必须发送],
 T0.DocNum AS [销售订单],
 T0.CardName AS [Sales Partnet],
 T1.U_Prod_Order_No AS [Prodn.Order],
 T1。数量AS数量,
 T1.ItemCode AS [项目代码],
 T1.Dscription AS [项目说明],
 T2。注释AS备注
 从
 dbo.OWOR AS T2左外连接dbo.RDR1 AS T1 ON ISNULL(T1.U_Prod_Order_No,-1)= T2.DocNum
 左外连接dbo.ORDR AS T0在T0.DocEntry = T1.DocEntry
 哪里
 (T2。状态IN('P','R'))和(
 (T1.ShipDate <> CONVERT(DATETIME,'2033-03-03 00:00:00',102))和
 (T1.ShipDate <> CONVERT(DATETIME,'2044-04-04 00:00:00',102))和
 (T1.ShipDate <> CONVERT(DATETIME,'2033-03-04 00:00:00',102))和
 (T1.ShipDate> = GETDATE()-1)和
 (T1.ShipDate <= GETDATE()+ 14)
 GROUP BY T2.DueDate,T1.ShipDate,T0.DocNum,T0.CardName,T1.U_Prod_Order_No,T1.Quantity,T1.ItemCode,T1.Dscription,T2.Comments
 拥有
 (T2。评论,例如N'%% URGENT %%')或
 (T2。评论,例如N'%% urgent %%')或
 (T2。评论类似N'%% PRIORITY %%')
 订购[必须发货],[销售订单],[销售零件网]

 

致谢

拉胡尔

一周热门 更多>