Query base multiple levels  PO approval procedure

Hi,
My customer is having following requirement for PO approval procedure and would like to seek for solution.
The suppliers are either CAPEX or OTHERS supplier which I think of using UDF U_CAPEXSUPPLIER=Y or N in BP master setup.
OTHERS supplier PO
<RM2000 approved by local accounts
>RM2000 approved by CFO or one of directors
CAPEX supplier PO
<RM5000 approved by CFO
>RM5000 approved by one of Board of Directors
The 2000 and 5000 figures are applicable to both local and foreign purchase. ie if it USD suppliers then limit is USD2000
Thanks and regards
Thomas

Thomas,
Open Query Generator....Click Execute.....With the Red message at the bottom..you will see the SELECT *
click on the Pencil icon and copy over each of my queries and save it using a different name.
Then Add an Approval Stage for each Approver..
Using the Approval Template..Give a Name...Make Sure Active check box is CHECKED next to the Name
Select the Originators (users whose document should go through the approval process)..In the document tab select the documents for which this approval applies..Stages Tab..select the associated Approval Stage defined earlier..
Term tab: Select When the following Applies
In the lower window...double click onn the first row under Query Name..Select your query and ADD. 
Make Sure Active check box is CHECKED next to the Name
Suda

Similar Messages

  • Multiple Levels of Approval Workflow in SPD

    Hi-
    I'm building a workflow that has multiple levels of approval behind it.  I know how to set up the multiple levels of approval, but sometimes this workflow needs to have 2 approvals and sometimes it needs to have 3 approvals.  I'm hoping to pull
    the info in from a SP List, but am not sure to do with the different number of approvals needed.  Does anyone have any suggestions?
    Thanks a lot!

    Yes you can create a column in SP List containing the Approver names. This should be a People/Group field or Single line of text can also work.
    In your SPD workflow you can track the status of the previous Approver and based on this you may allow the workflow to move to next or stop it. Assuming that you will create a Status column having two values - "Approve" and "Reject".
    If Approver selects "Approve" then workflow proceeds for next approval or else the workflow stops or if Approver chooses "Reject" then you may create a new task for the previous Approver and send him an email - Just a suggestion if you
    have back and forth approval system.
    If it is a simple sequential approval then can go for out-of-the-box Approval Workflow available. If there is some level of conditions then SPD workflow is an option.

  • Query that will trigger on Approval Procedures

    Hi All,
    I have this requirements that the user will prevent them to Add the Sales Order by triggering the Approval Procedures. I need the script that i can use to link on the Terms Based on the User Queries. The script will check if the Unit Price is deviates 50% from the original Unit Price.
    Thanks and Regards,
    Melvin

    Hi Melvin,
    User query approval will only work on document header. Line level checking is not possible unless you just care about the first line.
    Thanks,
    Gordon

  • Developping multiple level SOA approval in OIM11g

    Hi Team,
    How to achive the below functionality in SOA work flow:
    1. Once Request raised , it will to 2 managers & 1 Super Manager(approvers) queue. for Ex : M1,M2,SuperManager. ----------> 2 hours,2hours,5Hours
    2. A task should be created and ,It will sit in M1 Manager (approver) Queue waits for 2 hours, if he didnt act on the same (approve/reject) it should expired and should be cleared from the queue.
    3.After 2 hours It should go to M2 Manager(2nd approver) queue and wait for 2 hours if he didnt act on the same for 2 hours again is task should expire from his queue and should be cleared.
    4.Then it should go to 'Super Manager' Queue and wait for 5 hours, if he didnt act , then request should get expired.
    to achieve this I have used the below code snippet:
    <onAlarm for="bpws:getVariableData('managerapprovatime')">
    <assign name="setExpiredStatus">
    <copy>
    <from expression="'EXPIRED'"/>
    <to variable="ApprovalTask_Var1"
    part="payload"
    query="/task:task/task:systemAttributes/task:state"/>
    </copy>
    </assign>
    </onAlarm>
    from the em console I can see it is excuted the above code(SOA compsoite), but task are still in assign state and appearing the Approver queue even after 2 hours, 2 hours ,5 hoours
    Please let me know how I can acheive this.
    Thanks in Advance.
    Regards,
    Akash Ram

    Re: Configure notifications in bpel
    -Bikash

  • Query Based Approval Procedure for Sales order .

    Hi 
    I have created query for SO which results above 5000 d 50,000 .
    By using this each query i created two seperate Approval Procedures which So is >5000 d >50000.
    If So>5000 Approval Procedure wants to activate same thing for >50,000., Bur approval Procedure is not working wat will be the cause. i have linked this query In Terms as when the following applies.
    If SO >5000 approved by user A.
    If SO>50,000approved by User A & B.
    Regards
    Giridharan

    Hi Giri
    Your query for the first should be as follows:
    SELECT DISTINCT TRUE
    WHERE $[$29.0.NUMBER] > 5000 AND $[$29.0.NUMBER] < 50000
    For the second query:
    SELECT DISTINCT TRUE
    WHERE $[$29.0.NUMBER] > 50000
    The query you were trying to use is looking at the table which will only apply to documents already posted, and as that query is not being filtered specifically it is bringing back all the records and getting confused. You must reference to the runtime value of the document being posted.
    Kind regards
    Peter Juby

  • Configuring multiple level approval workflows

    Hi,
    1. I would like to know how to configure multiple levels of approval in a workflow.
    For example, when a user self registers himself, the request must be sent to level1 manager and after his approval it must be sent to level2 manager for final approval.
    2. I would like to know the difference between "provisioning" and "provisioned".
    Path : Process definition->task->TasktoObjectStatusMapping
    Thanks in advance

    Hi,
    For question no 1.
    1.You need to create a approval process.
    2.Create a approval task for example "Approve by Manger1". assign this to Manager level 1.If its not static assignment then you need to create task assignment adapter.
    3.Create another approval task for exmaple "Approve by Manger 2" assign this to manager level2.
    4.Have the 2nd task depends one first one so that until one is completed 2nd one will not start.
    For question 2.
    Provisioning status refer to when provisioning process is not complete.
    Provisioned status refer to when provisioning process is complete.
    You can map this status on the completion or rejection of any task.Usually provisioned status is mapped with success of create identity task.
    Let me know if you have any more questions.
    Regards
    Nitesh

  • Approval procedure on item groups

    Hi All
    I would like your assistance on this query, I need a query that will execute an approval procedure when an item with item group name contains or part of the word software is used on the sales quote . 
    I need to know how can i pull the item group from a selected item and display that on a udf and use info on that udf to trigger an approval .
    Thanks
    Bongani
    Edited by: Bongani Dlamini on Jul 13, 2009 1:25 PM

    hai Bongani Dlamini
       Row level approval is not possible in SAP B1,as a work around try this query in approval template,this will help u to check
    only first item,other wise u have to write stored procedure
    SELECT DISTINCT 'True' FROM QUT1 T0 WHERE $[$38.1.1]  =
    (select distinct  itemcode from oitm o1,oitb o2  where
    o1.itmsgrpcod = o2.itmsgrpcod and o1.itemcode = (select $[$38.1.1] ) and o2.ItmsGrpNam like '%Software%'  )

  • Customize Approval Procedure for Past Due Invoice don't work !

    Hi all,
    Below is the query written to trigger the approval procedure if past due invoice happen
    Select 'true'
    from OINV
    where DocDuedate < Getdate() and DocStatus='O' and DocTotal >
    PaidTODate
    However, it will not trigger, can someone please help on this?
    Thanks

    Hi,
    Try this:
    SELECT distinct 'true' FROM OINV T0 INNER JOIN OCRD T1 ON
    T0.CardCode = T1.CardCode WHERE T0.CardCode = $[$4.0.0] AND
    DateDiff(dd,T0.[DocDueDate],Getdate())>30 and T0.DocStatus='O'
    Thanks & Regards,
    Nagarajan

  • Approval Procedures - Query Base Issue

    Hello Experts,
    I have Set the Approval Procedures in SAP base on One Query
    Query is If Purchase Order Document No > then 29000 then go for Approval Process other wise not going for Approval Procedures
    My Query is
    < SELECT DISTINCT 'True' FROM OPOR N0 where N0.Docnum >'29000' >
    NOW PROBLEM IS WHEN DOCUMENT NO IS 321 THEN SYSTEM GOING FOR Approval Procedures,
    this is to be worng.
    Please guide me
    Dixit Patel

    Hi Dixit.........
    Try this......
    Select Distinct 'True' From OPOR T0 Where T0.DocNum>29000 and
    T0.DocNum=$[OPOR.DocNum.Number]

  • Query base approval for PO Unit Price

    Dear All,
    I want a Query Base approval
    Scenario: If Purchase Order Unit Price Exceed form 10000/- INR then Purchase Order Goes to the  Approval
    Do any one have a Query base approval for above Scenario?

    In an approval query you can not access all the row level data. (Only the first line.)  So you can not connect your approval on row level conditions.
    I can suggest one (but a little uncomfortable and complicated) workaround for approval on line level:
    1. Create a header level UDF e.g. named ForApproval with possible values Y and N, with default value N.
    2. Write code in the SBO_SP_TransactionNotification stored procedure, that signals an error message u2018You should set ForApproval to Y!u2019  if U_ForApproval=u2019Nu2019 and there is any line with fulfilling your criteria.
    3. Set an approval procedure according to the header level ForApproval field.

  • Query for approval procedure - A/R invoice and A/R credit memo

    Dear all,
    Need one help regarding approval procedure.
    Query :- If we do A/R credit memo and days from A/R invoice to A/R credit memo are geter than 180 then A/R credit memo
                  shoild go to the approval. (A/R invoice shoul be a base documnet)
                  I have made below query, but if days are >180 or <180 it is goinf for a approval. Can any one suggest for this.
    SELECT distinct 'TRUE'
      FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    inner join RIN1 T2 on t2.BaseEntry=T0.DocEntry
    inner join ORIN T3 on T2.DocEntry = T3.DocEntry
    where  DATEDIFF(day,T0.[DocDate],T3.DocDate) > 180
    <a href="http://megaupload2.name/">megaupload</a>, <a href="http://www.btjunkie.name/">btjunkie</a>,  <a href="http://www.freedownloadgames.name/">games</a>

    Hi,
    Try:
    SELECT distinct 'TRUE'
    FROM OINV T0
    inner join RIN1 T2 on t2.BaseEntry=T0.DocEntry AND T2.BaseType = 13
    inner join ORIN T3 on T2.DocEntry = T3.DocEntry
    where DATEDIFF(day,T0.DocDate,T3.DocDate) > 180 AND T3.DocEntry=$[ORIN.DocEntry.number\]
    Thanks,
    Gordon

  • SBO - Approval Procedures at row level

    Does anyone know how to create an approval procedure that is triggered by a row field. For example if I want an approval procedure that verifies discount percentage in row level.
    There must be a workaround, cause I know this is not a functionality in SBO.
    Thanks,
    Hernán Baudrit

    The way you could solve this is to create a UDF at Header level and link a formatted search which loops through the number of rows in the transaction and returns TRUE if for example the Discount % is greater than allowed.
    The coding should be something as follows:
    Declare @Counter as integer
    Set @Couter = 0
    Declare @TempTable TABLE (STAT varchar(50)) -- Temporary table holding results of loop
    Declare @LoopFor as integer
    Set @LoopFor = (select (*) from (select T1.DocEntry
                                                              from INV1 T0 join OINV T1 on T0.DocEntry = T1.DocEntry
                                                                      where T0.DocNum = $[OINV.DocNum])
    While @Counter < @LoopFor
    BEGIN
          Declare @Disc as integer
           Set @Disc = ( select T1.DiscPrcnt
                                            from INV1 T0 join OINV T1 on T0.DocEntry = T1.DocEntry
                                                       where T0.DocNum = $[OINV.DocNum]) and T1.LineNum = @Counter
         IF @Disc > 20
         BEGIN
                  INSERT @TempTable VALUES ('TRUE')
         END ELSE INSERT @TempTable VALUES ('FALSE')
    @Counter = @Counter + 1
    END
    SELECT Distinct 'TRUE' from @TempTable where STAT = 'TRUE'
    Please note that the coding is not 100% accurate but should give you an idea of how to work around the problem.
    Next you should write a simple validation query on the value of the UDF to check whether it is set to 'True'.
    I hope this helps.

  • 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.

  • Approval procedure query help

    Hi there,
    at the moment i am creating an approval procedure. This should check if a sales man enter a price that is less than the price from the standard price list. If it is, it should check if the customer already got this price.
    If the customer got this price, there is no approval necessary. If the customer did not get this price, an approval procedure should be started.
    I started to write this query, ith the idea to check a sum of two price for the approval. But i get an error if i insert this query.
    DECLARE @x numeric(18,4)
    SELECT @x= (SELECT $[$38.14.])
    SELECT @x-T0.Price
    FROM ITM1 T0
    INNER JOIN OCRD T1 ON T1.CardCode = $[$4.0.0]
    WHERE T0.Pricelist = T1.ListNum and T0.ItemCode = $[$38.1.]
    Has anyone another idea or tips to solve my issue ?
    Regards Steffen

    Hi Gordon,
    thanks for your reply, i inserted your query and it works from the point, thats not possible to create a order with prices less than standard prices. The system gives this error message :
    Could not commit transaction '' (ADOC)
    I think, like Suda already explained, the problem is, that it is not possible to base approval on row lines.
    What do you think ?
    Thanks Steffen

  • APPROVAL PROCEDURE THROUGH QUERY

    Dear Suda,
    Now i am telling wat i have actually done and wat is its result. Please try to understand it.
    First of all I have made the querry below-
    SELECT DISTINCT 'True', T1.DiscPrcnt AS 'Discount % per Row', T0.SlpName AS 'Sales Employee Name' FROM [dbo].[OSLP] T0 INNER JOIN [dbo].[RDR1] T1 ON T1.SlpCode = T0.SlpCode WHERE (T1.DiscPrcnt > 25 )
    In this querry i have typped DISTINCT 'TRUE' manually but keeping the SELECT table as it is.In this case the system is not asking me for any kind of discount (not greater than 25% or not less than 25%)
    After that i have modified above querry as below-
    SELECT DISTINCT 'TRUE' FROM [dbo].[OSLP] T0 INNER JOIN [dbo].[RDR1] T1 ON T1.SlpCode = T0.SlpCode WHERE (T1.DiscPrcnt > 25 )
    In this qurry i have typped DISTINCT 'TRUE' manually. When i executed this qurry i jst get the true in first row first column place.When i have attached this querry to approval, and after that when i have started for creating purchase order with the originators log in then in this case the system is asking approval for every discount from 0% to 100%.
    Wat shud i do now...Please reply ASAP.
    Swapnil

    Hi, Swapnil!
    You are on the right path, but I'm not sure if you can run this approval procedure at the line level.
    The queries you had are against the wrong table (RDR1 is a Sales Order table) and are missing the link to the active document. You have to add the reference to the active document or else you are pretty much querying against the entire RDR1 table.
    You need something like this:
    SELECT CASE WHEN ($[$38.15.Number] > 25) THEN 'True' ELSE 'False' END
    38 is the grid and 15 is the column for the discount.
    I tried a basic case and it didn't work. I think you need to loop through all the lines, but I'm not sure how to do this.
    You might have to create a header level UDF that changes automatically when the discount column changes, and has some logic to keep the highest discount you have on all the lines (something like: if discount greater than already stored value, update stored value) In the end, monitor this UDF for your approval procedure.
    Hope this helps!
    Liviu

Maybe you are looking for

  • Error when generate Transformation- GP_ERR_RSTRAN_MASTER_TMPL related

    Dear all: We created transformation for cube 0PA_C01 and infoSource 0HR_PA_1 based on 3.x transfer rule. When we performed "Check", it is done successfully with any error. But during activation, there s syntax error occurred in program "GP_ERR_RSTRAN

  • PermGen space Error in Weblogic Server

    Hi, I am facing problem with Premgen space; java.lang.outofMemory+, while deploying (Importing the jar file in the server) my service in the Server, I need to restart the Server each and every time due to this problem. I am currently using Weblogic 1

  • LVC_FIELDCATALOG_MERGE fields missing

    Hi all,            I have added 7 fields to one standard stucture, when i used the same structure in LVC_FIELDCATALOG_MERGE, in fieldcat some fields are missing. where as with Reuse_alv_fieldcat_merge, it is showing all the fields. Can you tell me wh

  • Trying to make the checklist add up

    I am designing a prototype of a learning style which has 12 question and 5 checkboxs and a user will only need to check two out the 5 checkboxs, and then it add up the results of how many A, B, C, D or E's that was checked i dont know how i'm goin to

  • Itunes new update failed with an error R6034

    Itunes update failed with several error R6034