Skip to Content
0

SAP Query - Adding In Stock

Sep 18, 2017 at 10:29 AM

60

avatar image
Former Member

Hello,

I currently want to add In Stock to this query on the last column. Can this be done?

SELECT t0.Cardcode as "Customer#", t0.Cardname as "Customer Name", t0.DocNum as "SO #", t1.ItemCode, t0.DocDate, t0.DocDueDate, t1.OpenQty, t1.OpenQty*T1.price AS 'Open Value' FROM dbo.ORDR t0 INNER JOIN dbo.RDR1 t1 on t1.docentry = t0.docentry WHERE t1.LineStatus = 'O' AND t1.OpenQty > 0

SQL
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Gonzalo Gomez Sep 18, 2017 at 11:02 AM
0
SELECT t0.Cardcode as "Customer#", t0.Cardname as "Customer Name", t0.DocNum as "SO #", t1.ItemCode, t0.DocDate, t0.DocDueDate, t1.OpenQty, t1.OpenQty*T1.price AS 'Open Value', t2.onhand FROM dbo.ORDR t0 INNER JOIN dbo.RDR1 t1 on t1.docentry = t0.docentry INNER JOIN OITM t2 on t1.itemcode=t2.itemcode WHERE t1.LineStatus = 'O' AND t1.OpenQty > 0
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Sep 18, 2017 at 11:12 AM
0

Hi Gonzalo,

This is fantastic - many thanks! I also have a question, we want to add Next Purchase Order delivery date as a column. But the column we use for delivery date is a User Defined Field, that in the past i have had to convert to read as a normal date. Can i contact you to discuss further at all?

Many thanks,

James

Share
10 |10000 characters needed characters left characters exceeded