Skip to Content

Query Based Approval Probelm

Hello Expert,

I was working on Query based Approval for Delivery Document

I want Approval When value in one UDF at Document Level Deviates at Delivery Level with respect to base SO then it should go for Approval

I have made Query like this but none of my Document is going for Approval

Select Distinct 'True'
from ODLN T0 Inner Join DLN1 T1 On T0.DocEntry = T1.DocEntry 
Inner Join ORDR T2 On T1.BaseEntry = T2.DocEntry
Where T0.U_UDF1 <> T2.U_UDF1 AND T0.DocNum = $[ODLN.DocNum]

Please help me out.

Regards,

Bhavank

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Posted on Feb 18, 2011 at 01:46 PM

    Hi Bhavank......

    Try this.......

    Select Distinct 'True'
    from ODLN T0 Inner Join DLN1 T1 On T0.DocEntry = T1.DocEntry 
    Inner Join ORDR T2 On T1.BaseEntry = T2.DocEntry
    Where T0.U_UDF1 != T2.U_UDF1 AND T0.DocNum = $[$8.0.0]

    Or

    Select Distinct 'True'
    from ODLN T0 Inner Join DLN1 T1 On T0.DocEntry = T1.DocEntry 
    Inner Join ORDR T2 On T1.BaseEntry = T2.DocEntry
    Where T0.U_UDF1 != T2.U_UDF1 AND T0.DocNum = $[ODLN.DocNum.0]

    Regards,

    Rahul

    Add comment
    10|10000 characters needed characters exceeded