Skip to Content

query for service calls

Dear Experts,

We want to list out closed service calls whose invoice has not made.

For this, I used OSCL and SCL2 tables by linking on CALLID and using QTYTOINV = 0 as a flag. But, wrong result.

Please help me.

I also observed SCL4 table in which all the transactions against a particular service call are recorded. I tred to list the calls against which there is no object (13).

Help needed.

thanking You

Malhaar

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 Dec 02, 2011 at 05:55 PM

    Dear Malhaar,

    Have you tried:

    SELECT Distinct T1.createDate, T1.callID, T1.custmrName,

    T1.technician, T0.ItemCode,T0.ItemName,

    T0.TransToTec, T0.QtyToInv, T1.status, t3.price,

    T2.LastPurPrc,T2.LastPurPrc * T0.TransToTec AS 'Value'

    FROM

    SCL2 T0 INNER JOIN OSCL T1 ON T0.SrcvCallID = T1.callID

    INNER JOIN OITM T2 ON T0.itemCode = T2.ItemCode

    INNER JOIN SCL4 T4 ON T0.SrcvCallID = T1.callID AND T4.Object != '13'

    LEFT JOIN INV1 t3 ON t3.itemcode = t2.itemcode AND T3.DocEntry = T4.DocAbs

    WHERE T0.QtyToInv = 0 and T0.TransToTec > 0 and

    T1.status = 1

    ORDER BY T1.technician, T1.createDate

    What is the result?

    Thanks,

    Gordon

    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.