Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

replied

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

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question