on 09-30-2008 10:35 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.