cancel
Showing results for 
Search instead for 
Did you mean: 

approval procedure not working

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member583013
Active Contributor
0 Kudos

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

Answers (0)