Approval Template Query

Hi, Is it possible to setup a approval template where an approval is required for all AP invoices that include a GL account that has a budget set for it?
Thanks,
Jane

Hi,
Yes possible to set approval template by means of query which is to be assigned under "Terms tab". But following condition should be meet,
1. Under general settings--->BP tab, you have to select "Warning" check box.
Thanks & Regards,
Nagarajan

Similar Messages

  • Query for terms in approval template of approval procedure

    dears
    i need to write  a user query for approval template terms that chek for any price zero in invoice items .
    i tried the true query
    select 'true' from inv1 where $[inv1.price]=0
    however the invoice executed without asking for approval procedurs.
    any help will be appreciated!!
    talal

    Hi,
    Its not possible on row level Price.
    Try to Document total procedure, it will work.
    SELECT Distinct 'True'  FROM OINV T0 WHERE $[OINV.DocTotal]='0.00'
    Thanks,
    Madhan.

  • Adding a query to the approval template

    Hello
    I'm trying to setup an approval template for AR Invoices based on a UDF.
    Basically I want to add a query to the approval template that will trigger an approval request based on the following query
    but i don't know how to set it properly.
    trigger an approval when:
    select * from OINV where u_ordertype = 'sub'
    any help would be appreciated it!
    Mike

    Hi Mike,
    Try this:
    select 'true' from OINV T0 where T0.u_ordertype = 'sub' and T0.DocNum = $[$8.0.0\]
    Thanks,
    Gordon

  • Approval Template based on Query

    Hi All,
    I want to wirte a query for defining approval templates.If any document (both on sales and Purchase side) is raised by a non-superuser,it should be sent for approval ,to the superusers ,before it is posted.
    we have set approval templates for this.
    But now,if the document contains the items with group code '101' ,then it should be sent for approvel to the superuser 'A' alone.(it is sure that in a single document items with different group codes will not be present).Others should be sent for approvel to superuser 'B'.
    I know that this can be done only by using "Terms based on Queries" in approval templates.
    I have never used this before.Can anyone help me with the query for this template?
    Thanks& Regards,
    V.M.Nivasini

    Hi
    The query is like this
    SELECT T2.[ItmsGrpCod],T1.[ItemCode] , T1.[Dscription] FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T2.[ItmsGrpCod] = 101
    Create different queries for different Groups in where clause, Assign the query to respective Approver.
    Hope this helps.
    Regards
    Reno

  • Approval Templates On Query Base Not working..

    hi.
    Plz have a look on uploaded image.
    here i had highlighted that no of approvals are required at approval stages form
    what is the meaning of 2 ,
    ->i think the  2 people approval we need compulsorily.  Am i currect.
    ->In approval Stages i added two persons but i given no of approval need 1
    what will happen . If any body one person will approve , will it approve the document am i currect.
    And one more thing In Approval template under terms i am using query based on this one
    the document should be approve if i give Doctotal total Greater than amount  working fine
    but i need query base approve..
    what i need while adding the sales quotation if project code is not empty
    it will take the approval
    select  t0.docentry from oqut t0 inner join qut1 t1 on t0.docentry=t1.docentry where t1.Project <>''
    the above scenarios i will check it..
    but i need your valuable suggestions...

    Thank u working fine..
    last Question plz reply to me.
    1)Is Approval Stages are unique means
    in approval template if i use one approval stage in another approval template can i use same approval stage  will it work...
    2) in approval stage
    Total authorization persons are 2
    The below scenarios i am able to add the document i can able to update it.
    no of approval 1
    no of reject 1
    what is the meaning
    if out of 2 persons if any body approve the document document will add
    if out of 2 if any one person reject then  the document will reject
    no of approval 2
    no of reject 2
    Two users should approve the document otherwise document should not be add
    Two users should reject the    document otherwise document should not be reject
    no of approval 2
    no of reject 1
    two users should approve the document otherwise document should not be add
    out of 2, one user should reject the document no need second users reject
    no of approval 1
    no of reject 2
    one user is enough
    two users need to approve the document
    Plz clarify my doubt.
    I am waiting for your reply..

  • Approval Templates: Inventory Transfer - based on Query (help)

    This is a newbie question but I don't have time to read or dig thru forum sorry.
    We have an Approval Template setup to alert/approve Inventory Transfers but it is set to Always on the Terms tab.
    We would like to modify it for only transfers into a certain set of warehouses).  How do i create a query that will determine the Warehouse Code (if warehouse code is:'WHL','ITL','RTL','WEB','CTO-WHL','CTO-ITL') on transfer and send the alert/approval notification.
    I know this has been done 1000 times over but please enlighten me.
    SELECT whsecode FROM wtr1 in ('WHL','ITL','RTL','WEB','CTO-WHL','CTO-ITL')

    Hi David......
    There are few Threads discussed on Forum that Approval Procedure for Row level is not possible. Ther may be some work around in doing this.
    You may search this post in forum as it is readily available........
    Approval procedure
    Regards,
    Rahul

  • Adding New Originator in Approval Template

    Hi,
    1. I initially created 5 users where when they create Sales Orders, they will have to go through the approval stage. The condition which was set is based on query. When I add additional users in the approval template to go thru this process, there's a message says 'No ratio has been defined'.
    What could caused this?
    2. After i add new users, do i have to reselect the query in able for them to go thru this approval process?
    Appreciate your help.
    Rgds,
    Harith

    Hi,
    When you Select the "When the Following  Applies" options you can view two windows below that option.
    In first Window, You can view the "Choose", "Term", "Ratio", "Value" Columns. In "Choose" Column you will find Check Box. In "Terms" Column you find Condition terms (ie,. like Deviates from budget, Discount% etc). In "Ratio" column  you find conditions like Greater Tha, Less than etc., In "Value" column you should give the  value based on which the condition works.
    When you Select the Checkbox then the corresponding Condition will be taken for Approval Procedure.
    In Second Window, "Terms Based on User Queries" You will select the query you have generated for approval process.
    If you are using Second Window you do not select any options in First window. You can view one of the option was selected after you have linked the query in second window.
    Raja.S

  • Related to approval   template

    hi
      i am using the sap 2005b with 36 patch
      i want to set the approval for particular condition and in that   approval there is one option  that is "terms based on user query"
    so i want save the query to that option. so what is procedure for that  please help me
    regards
    sandip

    Hi Sandip,
    1) Write a Query in Query Generator and save it.
    2) Then go to Approval Templates - Setup and in Terms Tab Click on when the Following Applies
    3) Under "Terms Based on User Queries" Double Click on 1st Row of the Matrix. It will open the Query Manager.
    4) Select the Saved Query and Double Click on it. It will automatically placed in that matrix
    if it helps you, give reward points.
    Thanks
    Sravan Kumar Pothu

  • Approval Template Not Working

    Hi Experts.
    I have activated approvals and have a simple approval template working (as a test) whereby AR Invoices exceeding a certain value require approval.
    I have also created an approval template whereby Purchase Orders require approval if they are over the users approval limit but under their manager's approval limit as defined in UDFs against the employee record.  This approval is not working.
    The approval is based on a query:
    select distinct 'true'
    from opor a, por1 b, oact c, ohem d, ohem e
    where a.docentry = b.docentry
    and a.canceled = 'n'
    and a.docstatus = 'o'
    and a.docentry = b.docentry
    and b.acctcode = c.acctcode
    and a.docnum = $[OPOR.DocNum]
    and a.ownercode = d.empid
    and d.manager = e.empid
    and (
         (b.u_budgeted = 'budget'and c.groupmask = 6
              and (a.doctotal-a.vatsum > d.u_budgetexpense or d.u_budgetexpense is null))
    or  (b.u_budgeted = 'budget'and c.groupmask = 1
              and (a.doctotal-a.vatsum > d.u_budgetcapital or d.u_budgetcapital is null))
    or  (b.u_budgeted = 'non-budget' and c.groupmask = 6
              and (a.doctotal-a.vatsum > d.u_nonbudgetexpense or d.u_nonbudgetexpense is null))
    or  (b.u_budgeted = 'non-budget' and c.groupmask = 1
              and (a.doctotal-a.vatsum > d.u_nonbudgetcapital or d.u_nonbudgetcapital is null)) )
    and (
         (b.u_budgeted = 'budget' and c.groupmask = 6
              and a.doctotal-a.vatsum <= e.u_budgetexpense
              and e.u_budgetexpense is not null)
    or  (b.u_budgeted = 'budget' and c.groupmask = 1
              and a.doctotal-a.vatsum <= e.u_budgetcapital
              and e.u_budgetcapital is not null)
    or  (b.u_budgeted = 'non-budget' and c.groupmask = 6
              and a.doctotal-a.vatsum <= e.u_nonbudgetexpense
              and e.u_nonbudgetexpense is not null)
    or  (b.u_budgeted = 'non-budget' and c.groupmask = 1
              and a.doctotal-a.vatsum <= e.u_nonbudgetcapital
              and e.u_nonbudgetcapital is not null) )
    The query will return the value 'true' if executed when the PO document is displayed on the screen, so I am happy with the query.
    I think maybe the problem might be on the Terms tab of the Approval Template because Total Selected Terms = 2.  I think this should be 1.
    There is a tick against Undefined Type under Term and I can remove this so that Total Selected Terms = 1, then I click on Update and OK - but when I go back in again the tick is back and Total Selected Terms = 2 again.
    Any suggestions would be very much appreciated.
    Regards.  Julie

    Hi.
    Thank you for your replies.
    The solution I worked out was to select the Term 'Total Document' as 'Greater than $1.00'.
    This enabled me to successfully de-select the last Term 'Undefined Type'.
    The Alert then fired successfully.
    Regards.
    Julie

  • RE:Approval Templates Terms Based on queries (Requires Urgently plzzz ..)

    Hi You All,
    As per requirement we developed the small Addon which is attached to sales quotation & for that AddOn I need a approval which is on based userdefind query.I done this much of portation BUT as per standard. in Approval Template-Setup we have to select Document from Document Tab.but I dont have these std Document I need appproval on that developed AddOn
    Rgs,
    -Dinesh

    Hi Dinesh,
    U cannot find ur user forms in the standard approval list.
    Regards,
    Vasu Natari.

  • Approval Procedure Query

    Hi, all
    I create U_Dept at document header and I want have an approval base on this U_Dept input. For eg, U_Dept input = A or B. I save 2 queries as below:
    Query A
    SELECT distinct 'true' from OQUT T0
    WHERE T0.U_Dept = 'A'
    Query B
    SELECT distinct 'true' from OQUT T0
    WHERE T0.U_Dept = 'B'
    2 Approval Stage created = manager A and manager B
    2 Approval Template created =
    Template 1 put in Query A, approve by manager A
    Template 2 put in Query B, approve by manager B
    Both template with same originator
    When I simulate the transaction, prompt 2 approval templates either I choose Dept A or Dept B. The result that I wish to reach is if I choose Dept A, template 1 prompt else if I choose Dept B, template 2 prompt. Can this be done?
    Regards
    Cheh Lu

    Hi,
    Try this query if other's query failed:
    For query B:
    if $[oqut.U_Dept] = 'B'
    select 'true'
    for query A:
    if $[oqut.U_Dept] = 'A'
    select 'true'
    Create 2 templates i.e. for A and B. before create 2 templates, you create 2 stages for A and B. Both stages are used different approver.
    The stage A and B are applied to template A and B. it will works fine.
    JimM

  • Terms In Approval Templates

    Hi All,
    what if I give, multiple terms based on user queries in approval template ?
    If a template contains 4 terms based on 4 user queries.
    How would I know which query fired during approval ?
    thanking you
    Malhaar

    Hi gordon,
    The approvals were firing properly in 8.8.
    After upgrade to 8.81 pl 07, we added one warehouse and created one series for that.
    In one of our approval we were capturing series of the invoice.
    In that approval we added newly created series with or condition.
    after that series related approval stopped firing.
    Please help.
    Thanking you
    Malhaar

  • Approval templates don't fire when updating document

    I'm running trials in my test database and it appears that approval templates only work on new added documents?  SAP Business One version 8.82  I am testing a query that calculates certain criteria against the business partner's credit limit.  If there is a deviation I want the approval process to start.
    Everything works fine when I add a new sales order with a doctotal that deviates from my credit limit logic.  Approvals fire off and the user has to wait for the manager to approve.  However if I add a sales order with zero value and then go back in and update the pricing later the approval never triggers.  So users are just able to go around approvals by adding blank documents first and then updating them however they see fit.
    Am I doing something wrong or is this just how SAP B1 approvals function?  Do approval templates have any impact on updated documents?

    Do TN's throw the red bar erros at the bottom of the client's GUI?  The ones that look like this...
    I'm looking through the following documentation...
    http://scn.sap.com/docs/DOC-7034
    and I can't seem to confirm what returning @error = 1 will actually cause.

  • Approval Templates

    Im trying to Create an Approval template so that all AR invoice created with a negative item row would need Approval
    Using the query below, all invoices now require approval
    SELECT distinct 'TRUE' FROM INV1 T0 WHERE T0.[Quantity] < '0'
    Example
    Row 1 10 of Item A
    Row 2 -1 of Item B
    This would require an approval

    Hi,
    Welcome you post on the forum.
    Try:
    SELECT distinct 'TRUE' FROM INV1 T0 WHERE $[$38.11.number\] < 0
    However, this can only check the first line. Line level approval is not supported by B1.
    Thanks,
    Gordon

  • Approval Template based on overdue invoices for a Region

    Hi,
    We have set an approval template for all overdue invoices which should go to the repsective sales managers for approval.
    We have setup two approval templates one for Central region and one for NES region.
    The template involves running of the following query and going to the respective manager for approval, however this does not work.
    When we create a seperate location wise approval template it works:
    Please check and let me know the error if any:
    SELECT DISTINCT 'TRUE'  FROM OINV T0 and OCRD T1 WHERE T1.CardCode =
    $[$4.0.0] and T1.U_AT_PC = 'NES' and T0.DocDueDate <= Getdate()  AND  T0.DocStatus !='C' AND $[ORDR.CARDCODE] = T0.CARDCODE
    Regards,

    Hi Gordon,
    Thanks for your reply!
    Actually, we had created the following query as per our requirement for all overdue invoices:
    SELECT DISTINCT 'TRUE'  FROM OINV T0 WHERE T0.DocDueDate <= Getdate()  AND  T0.DocStatus !='C' AND $[ORDR.CARDCODE] = T0.CARDCODE
    ( here the customer name in the order should be equal to the Invoice Table Customer code )
    and the location wise query:
    SELECT 'TRUE' FROM OCRD T0 where T0.CardCode =
    $[$4.0.0] and T0.U_AT_PC = 'NES'
    When i tried using this query with the Overdue invoice query the same order had to be approved by the manager twice, which is not acceptable.
    The problem in using the location wise approval template with the query, was that the "Confirm Credit Line Deviation" prompts up every time we try to enter a Sales Order.
    Whereas we wanted an alert to be prompted to the sales manager once any sales order is entered however if the SO is above the credit limit the sales manager should know about it, which can be achieved if we use the overdue invoice query correctly.
    I tried clubbing both the above queries together,but it doesn't work.
    Is there a way where you could use one query with an IF clause saying that if the UDF field is U_AT_PC= "NES" then go to NES sales manager if U_AT_PC="Central" then go to Central sales manager.
    Please revert
    Regards

Maybe you are looking for

  • BPEL Console Error after applying 10.1.3.4.0 MLR#3 patch

    After the installing the mlr#3 patch for 10.1.3.4.0 the BPEL console no longer starts. ESB Control is working The following error is displayed: Oracle BPEL Process Manager Full Cycle An unexpected error has occurred while executing your request. This

  • Unrecognized option : jrockit

    Hi All, After the upgrade of jdk 1.6.20 to 1.6.35 version, getting unrecognized option jrockit error while starting the admin server. Please help me on this. Thanks, Varaprasad

  • Receipt form hangs in r12

    ENV Details: EBS version: 12.1.2 DB version : 11.1.0.7.0 OS: RHEL 4.4 java version "1.6.0_10" Java(TM) SE Runtime Environment (build 1.6.0_10-b33) Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode) Hi, Navigation: Purchasing super user---->recei

  • My Mac Won't Read Windows XP Pro Disk T_T  I Need Help...

    My Mac will not read my XP Pro disc. It is not an original but it is an exact copy that runs perfectly on a PC. I have been told by a number of people that there is no reason that it won't work. I simply tell Boot Camp Assistant to start the installe

  • Problemas con ALV

    Hola a todos, quisiera saber si utilizando la siguiente función 'REUSE_ALV_GRID_DISPLAY' es posible de alguna manera cambiar la altura de las lineas , me interesa sobre todo a efectos de impresión. gracias.