cancel
Showing results for 
Search instead for 
Did you mean: 

writing approval condition

Y-Yusuf
Explorer
0 Kudos
266

Hi experts,

I am trying to write an approval query to send vendor invoices without a base document for approval, but since the BaseType field is not a physical field, I cannot see the item and column numbers. How should I write the query? Writing it as $[$OPCH."BaseType"] does not work. Please help me. 

Regards,

View Entire Topic
seanarchernz
Explorer
0 Kudos

Hi,

BaseType is stored at document line level as a document may draw from multiple base documents.

When there is no base document the PCH1.BaseType will be -1.  So your query could check for a MAX(PCH1.BaseType) = -1 to determine if there are no base documents.  Or MIN(PCH1.BaseType) = -1 to determine if the are at least some lines without base documents.

Y-Yusuf
Explorer
0 Kudos
Hi, I tried PCH1, but it didn't work. Can you show me how to use it in the query, because what I have tried so far hasn't worked? Thanks, regards.