Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Query approval procedure-SO approval if there is due invoices >=90days

Hi,

My customer is running 2007A PL30. He needs approval procedure for SO to be approved if the customer has overdue invoices more than 90 days.

Any idea how to write the query?

Regards

Thomas

replied

Hi Thomas,

This is surely doable. It can only be done through user query. Try this one:

SELECT distinct 'true' from OINV T0 where T0.CardCode = 
$[$4.0.0] and DateDiff(DD, GetDate(), T0.DocDueDate) >= 90 
and T0.DocTotal > T0.PaidToDate and T0.DocStatus = 'O'

It can not be run directly. Assign to approval template directly to see.

Thanks,

Gordon

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question