Skip to Content

What is SAP B1 query by Posting date from to to date for DocNum,Customer/Vendor Code,Customer/Vendor Name,Item No,Item Description,Quantity,Price&DocTotal by using tables ODLN &DLN1 tables?

Dear Experts,

What is SAP B1 query by Posting date from to to date for DocNum,Customer/Vendor, Code,Customer/Vendor Name, Item No, Item Description, Quantity, Price& Doc Total by using tables ODLN &DLN1 tables?

Thanks & Regards,

Prabhakar Patole

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    May 22, 2015 at 05:59 AM

    Hi Prabhakar,

    Please try below query and revert back with results.

    Select DNHead.Docnum[DN Num],DNHead.DocDate[DN Date]

    ,DNHead.CardCode [BP COde], BPMstr.CardName [BP Name]

    , DNLine.ItemCode, ItmMstr.ItemName

    , DNLine.Quantity[DN Qty], DNLine.Price[DN Price]

    , DNHead.DocTotal[DN Total]

    from ODLN DNHead

    Inner Join DLN1 DNLine on DNHead.Docentry = DNLine.DocEntry

    Inner Join OCRD BPMstr on DNHead.CardCode = BPMstr.CardCode

    Left Outer Join OITM ItmMstr on DNLine.ItemCode = ItmMstr.ItemCode

    Where DNHead.DocDate>=[%0] and DNHead.DocDate<=[%1]

    group By DNHead.Docnum,DNHead.DocDate

    ,DNHead.CardCode, BPMstr.CardName

    , DNLine.ItemCode, ItmMstr.ItemName

    , DNLine.Quantity, DNLine.Price

    , DNHead.DocTotal

    Thanks

    Unnikrishnan

    Add comment
    10|10000 characters needed characters exceeded

  • May 22, 2015 at 05:59 AM

    hi

    check bellow Query and update the Status

    SELECT T0.[CardCode], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price], T0.[DocTotal] FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[DocDate]<=[%0] and T0.[DocDate]>=[%1]

    ----RAMUDU

    Add comment
    10|10000 characters needed characters exceeded