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

approval procedure not working

hi experts,

some of items in OITM, I set the property, QryGroup1='Y'. if some one like to put a purchase order including those items, the purchase order must pass approval procedure. so I created a approval procedure template and add the following qery, but it doesn't work. can you check it for me? Thanks...

Declare @totalqty numeric(16,2)

Select @totalqty=sum(T1.quantity) from OPOR T0 inner join POR1 T1 on T0.DocEntry=T1.DocEntry inner join OITM T2 on T1.Itemcode = T2.ItemCode where T2.QryGroup1='Y' and T0.docNum=$[OPOR.DocNum]

select 'TRUE' where @totalqty>0

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2009 at 10:01 AM

    Approval procedure works only on Header level values on a document. When using it for validating line items it taken the value of the first row and might not work correctly.

    So Approval procedure for your situation will not work.

    Suda

    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.