cancel
Showing results for 
Search instead for 
Did you mean: 

Customised Approval Procedures

Former Member
0 Kudos

Hi,

I am trying to create an approval procedure such that on entry of an SO by Logistics or Sales, the approval should go to the respective manager to whom the customer account belongs to.

The query is:

SELECT 'TRUE' FROM OCRD T0 where T0.OCRD.U_AT_PC = 'Central'

on trying to create an approval Template using the above query, the error i get is "No ratio defined"

Please comment on why this error is generated.

Also Will the above query work?

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vishal

Go to the Approval Templates Setup and select the Terms TAB. Make sure that none of the tick boxes are ticked under "When the following applies" and only your query is added on line 1 under "Terms based on user queries".

Kind regards

Peter Juby

Former Member
0 Kudos

Thanks Peter,

This solved the issue.

Regards.

Answers (3)

Answers (3)

former_member186095
Active Contributor
0 Kudos

Hi,

try to use this query:


select 'true' from OCRd t0 where 
$[OCRD.U_AT_PC] = 'Central'

put the query in the query editor --> save it --> in the approval template, use the query on the last tab

Rgds,

Former Member
0 Kudos

Hi Vishal,

The correct query should be:


SELECT 'TRUE' FROM OCRD T0 where T0.CardCode = 
$[$4.0.0] and T0.U_AT_PC = 'Central'

Please have a try.

Thanks,

Gordon

Former Member
0 Kudos

Thanks Gordon,

For the query...

Regards.

Former Member
0 Kudos

Hi Vishal

If I understand you correctly, you have an approval template & stage for each customer account manager. The problem seems to be your query. You cannot refer to the Table using T0.U_..... You have to use the $ square bracket format to refer to the runtime value. Your query is looking for a value from the table which will not contain the SO you are currently processing as the Approval checks before the ADD is committed to the DB.

Try the following query rather:

SELECT 'TRUE' WHERE ${OCRD.U_AT_PC} = 'Central' .

Please Note : Square brackets are replaced by an underline in this forum, so I have used the squiggle brackets instead of the square brackets.

Kind regards

Peter Juby

Former Member
0 Kudos

Hi Peter,

Thanks for your prompt reply!

It still doesn't work....I get the same error again on trying to add the template.

"No Ratio has been defined "

Regards.