Skip to Content
avatar image
Former Member

SAP Query - Adding In Stock

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 18, 2017 at 11:02 AM
    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
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 18, 2017 at 11:12 AM

    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

    Add comment
    10|10000 characters needed characters exceeded