on 09-26-2008 11:51 AM
2007B
want to trigger an approval for purchase orders higher than 25000 rupees.
I need the query for this approval
selamat pagi,
you don't ne a query. take a look under "approval procedures" -> "approval templates". In the tab "Terms" is displayed "Total Document". This means the DocTotal. There you can create your approval procedure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Approval works on document level and query based query can even go to the first row in the document. Since this approval is based on document series, only query based approval can be fit in.
I have posted an example on your previous thread, please let me know if you have tried that query or not.
Thanks,
Gordon
HI,
B1 standard approval based on all document series. So, for your issue, just use query approval (in the approval procedure template, there is a query matrix where you put it there). Try to use Gordon's query but if not succeed, you could post here the error message.
you could also try this query approval:
for spares:
select distinct 'true' from OPOR t0 where
$[OPOR.series] = '..'
and $[OPOR.doctotal] > '25000' --
fill in the blanks the series code for spares
for raw material:
select distinct 'true' from OPOR t0 where
$[OPOR.series] = '...'
and $[OPOR.doctotal] > '25000' --
fill in the blanks the series code for raw material
You have to create to approval templates and optional for the stage. I mean for the approval stage, you could create 1 stage or 2 stage depends on how many authorizers to approve.
Rgds,
Vijay,
Ok, if you are talking about Document Series based approval..are you saying that the Document series for Raw Material will only contain Items which are Raw Materials. Hopefully this is the case ?
Let me know the Series Number for each of them..this is needed for the Query.
You should be able to select the Series on the PO and when you mouse over them..you should see the number on the Status Bar. (Enable View System Information from View Menu)
Your approval query would be like this..please replace the {Series Number for Raw Materials} and {Series Number for Spares} with the actual series number
SELECT 'TRUE' WHERE $\[$88.0.0] = {Series Number for Raw Materials}
SELECT 'TRUE' WHERE $\[$88.0.0] = {Series Number for Spares}
Suda
followed the steps mentioned below:
1. copied the query "SELECT 'TRUE' WHERE $[$88.0.0] = " in the query generator and saved it to user queries. "RawMate" is the name of the document series.
2. when exuted the query, it gives the following message: " [Microsoft] [Sql Native Client]Syntax error, Permission Violation,or other nonspecific error.
3. created approval stage
4. created approval template using the above query.
5. result: Its not allowing to create PO and not able to disable the approval template.
vijay
Edited by: SU Vijay on Oct 6, 2008 9:25 AM
Vijay,
You cannot use your Series Name in the WHERE clause, you need to use the Series Number. When you mouse over the Series you will see the number in the Status Bar (enable System information)
It should be some thing like
SELECT 'TRUE' WHERE $[$88.0.0] = 12
You could also Run this Query to find the Series Number
SELECT T0.Series AS 'Series', T0.SeriesName AS 'Series Name' FROM [dbo].[NNM1] T0
WHERE T0.ObjectCode = 22
Use the corresponding number of your Series
You could click on the Document Total check box in the Terms tab and enter your Total numbers.
When you have these range scenario's you will need 3 seperate Approval templates
The amount can also be embedded into your Query..like this
For using the Amount shown on Total Before Discount you will use
SELECT 'TRUE' WHERE $[$88.0.0] = 12 AND $[$22.0.Number] <= 25000
For checking the DocTotal
SELECT 'TRUE' WHERE $[$88.0.0] = 12 AND $[$29.0.Number] <= 25000
You will need 3 queries for each of the Amount ranges which will be linked to 3 seperate Approval Templates
Suda,
cheers! it works! thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The approval of PO is w.r.t to 'document series' and 'amount'
eg:
1. Approval of PO,
Document Series: RawMate
Amount: upto 25,000
2. Approval of PO,
Document Series: RawMate
Amount: above 25,000 to 1,00,000
vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.