Skip to Content
author's profile photo Former Member
Former Member

QUERY

Dear Rahul sir,

You have suggested below query in forum. I need of some changes in this query. We create outgoing excise invoice after delivery in SAP. I want in this query outgoing excise invoice no. & outgoing excise inv date instead of A/R inv no. & A/R inv date and also want SO status column (Open or close), outgoing excise inv quantity & outgoing excise inv unit price.

SELECT Distinct T0.[DocNum], T0.[DocDate], T0.[DocDueDate], T0.[CardCode],

T0.[CardName], T0.[NumAtCard], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price],

T1.[DiscPrcnt], T1.[U_Consignee], T1.[U_Cust_Name], T2.[WhsCode], T2.[WhsName],

T3.[Location], T5.DocNum 'DelNo.', T5.DocDate 'Del Date',T7.DocNum 'INVNo.',

T7.DocDate 'Inv Date' FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry

Left Join DLN1 T4 On T1.DocEntry=T4.BaseEntry And T1.LineNum=T4.BaseLine

LEFT JOIN ODLN T5 On T4.DocEntry=T5.DocEntry LEFT JOIN INV1 T6 On T4.DocEntry=T6.BaseEntry And T4.LineNum=T6.BaseLine LEFT JOIN OINV T7 On T6.DocEntry=T7.DocEntry

INNER JOIN OWHS T2 ON T1.WhsCode = T2.WhsCode INNER JOIN OLCT T3 ON

T1.LocCode = T3.Code

Thanks & Regards,

Akshata

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 06, 2012 at 07:52 AM

    Hi Akshsta......

    SELECT Distinct T0.DocNum, T0.DocDate, T0.DocDueDate, T0.CardCode,
    T0.CardName, T0.NumAtCard, T1.ItemCode, T1.Dscription, T1.Quantity, T1.Price,
    T1.DiscPrcnt, T2.WhsCode, T2.WhsName,
    T3.Location, T5.DocNum 'DelNo.', T5.DocDate 'Del Date',T7.DocNum 'INVNo.',
    T7.DocDate 'Inv Date', T9.DocNum 'Excise No.', T9.DocDate 'Excise Date' FROM ORDR T0 
    INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    Left Join DLN1 T4 On T1.DocEntry=T4.BaseEntry And T1.LineNum=T4.BaseLine
    LEFT JOIN ODLN T5 On T4.DocEntry=T5.DocEntry LEFT JOIN INV1 T6 On T4.DocEntry=T6.BaseEntry And T4.LineNum=T6.BaseLine LEFT JOIN OINV T7 On T6.DocEntry=T7.DocEntry
    INNER JOIN OWHS T2 ON T1.WhsCode = T2.WhsCode INNER JOIN OLCT T3 ON
    T1.LocCode = T3.Code
    LEFT JOIN OEI1 T8 ON T8.BaseEntry=T4.DocEntry LEFT JOIN OOEI T9 ON T8.DocEntry=T9.DocEntry

    Regards,

    Rahul

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.