Query approval procedure-SO approval if there is due invoices =90days

Hi,
My customer is running 2007A PL30. He needs approval procedure for SO to be approved if the customer has overdue invoices more than 90 days.
Any idea how to write the query?
Regards
Thomas

Hi Thomas,
This is surely doable.  It can only be done through user query.  Try this one:
SELECT distinct 'true' from OINV T0 where T0.CardCode =
$[$4.0.0] and DateDiff(DD, GetDate(), T0.DocDueDate) >= 90
and T0.DocTotal > T0.PaidToDate and T0.DocStatus = 'O'
It can not be run directly.  Assign to approval template directly to see.
Thanks,
Gordon

Similar Messages

  • APPROVAL PROCEDURES - NOT APPROVED DECISION

    We have set an approval stage for purchase order with 2 authorizer but requiring only 1 authorisation. When one authoriser approves, the document proceeds to the next stage as expected. However if one authoriser rejects or rather does not approve, the document does not go back to the originator unless the second approver also rejects it. Is this the SAP design? What should we do to ensure that the documents do not wait for second authoriser to rejet for them to go back?
    I have tested this on both SBO8.81 PL 8 & 9 with similar results.
    Your assistance is appreciated
    Regards
    George

    Hi George,
    Yes. This is by design. Although it is not ideal, the initial design is at such.
    There are some DRQ posted already to require the feature you like. You can post again on /community [original link is broken]
    Thanks,
    Gordon

  • Approval Procedure on Incoming Payment

    Hi all,
    I need to put approval procedure on Incoming payment but as far as i know it is not possible through standard approval procedure. So is there any work around for that. Can we assign any query and which document shall we select to trigger incoming payment. Waiting for your reply.

    Shanker,
    Creating an approval procedure for this would not be possible.  Approval procedures need a Document to be selected when setting up the Approval template..and there is no template for Incoming Payments.
    Therefore you would have limited options and one of them would be to use the SBO_SP_TransactionNotification stored procedure.
    Please search the forum for SBO_SP_TransactionNotification and you should see some examples and link to notes.
    Suda

  • Approval Procedure not working randomly on sales orders

    Hi Experts,
    We place approval procedure for 2 users in SAP B1 2007B pl15.
    Some SO does not pass approval procedure  and we cannot trace why. The are 2 set up for approval procedure 1 for within on below credit limit. The other one beyond credit limit.
    Does anyone have the same problem with Approval procedure?
    What do I need to check  to isolate the problem?
    Regards,
    Amy

    Hi Gordon,
    We tried to disable the SO query beyond credit limit in a test database to check if the approval procedure will run if there are no other queries checking the credit limit. Now we only have one query running- the SO within credit limit.
    We eliminated another possibility for the error. The error occurs for a newly created BP.  The approval procedure will not work in SO  is the first SO ever created in the system. All subsequent SO will go thru the approval procedure even if the SO, DN and Account balance is zero
    1)We also tried this query and diabled the SO Beyond Credit Limit
    SELECT DISTINCT 'TRUE' from DBO.ORDR T0 INNER JOIN DBO.OCRD T1 ON T0.CardCode=T1.CardCode Where T0.CardCode=$[$4.0.string] and T1.CreditLine >=(
    (case when T1.Balance = 0.00 then 0.00 else T1.Balance end) +
    (case when T1.OrdersBal = 0.00 then 0.00 else T1.OrdersBal end) +
    (case when T1.DNotesBal = 0.00 then 0.00 else T1.DNotesBal end) +
    +$[$29.0.number])
    2) We also tried the Deviation from credlit limit is less than .01. Still error.
    Is this a system error or error in the query?.
    Regards,
    Amy

  • Is it possible to use the Copy Express to copy across Approval Procedures?

    Hi,
    We're running SBO 8.8 for a new customer and need to copy the Approval Procedures from one database to another - there are absolutely loads and it'll too painful to create them manually.
    We can't see the option in the Copy Express tree - can anyone help?
    Is it possible to use the Copy Express to copy the Approval Procedures object? Is there another way (perhaps via insert statement in SQL)?
    Please assist!
    Thanks,
    Mohsen

    Hi Mohsen,
    Due to the complicity of the approval procedures, I think it is too hard to build a copy tool for this under current system structure.
    As for insert statement in SQL, it is absolutely a no go. Unless you want the risk to lose SAP support, never try that. You have to re-create them.
    Thanks,
    Gordon

  • Error: Lock profile for approval procedure not maintained in Customizing

    Hi,
    We are working on the CHARM approval process. I have noticed that without selecting an approval procedure, I select the status (Awaiting business approval) on which the approval workflow is triggered, the system gives below error:
    Select an approval procedure first
    Lock profile for approval procedure not maintained in Customizing
    Approval procedure and approval steps are locked automatically
    This locks the approval procedure and the RFC can no longer be processed further. Why is that happening ? Anyone can select the status by mistake and lose the RFC, is there a way to stop this or at least reset it ? the lock procedure is already maintained in approval procedure customizing.
    Best Regards.

    Hi Karthik,
    Thanks for the quick reply, however the settings mentioned on page 38 are already in place i.e. the approval procedure gets determined correctly based on change category (rule policy) and also is locked after putting it to 'Awaiting Approval' 
    But the problem exists - setting the status 'Awaiting App.' without selecting app.proc, will result in a total lock of the RFC.

  • Approval Procedure Originator can't approve AR Credit Note

    Hi All
    Could someone please help me with an Approval Procedure where the Approver may also be an Originator.
    Within the Finance team each member defined in the Approval Procedure can approve another Originator's Credit Notes but not their own. Within the team, they may all be document Originators AND Approvers (as long as they are not approving their own document).
    Thankyou for your assistance
    Peter

    I don't think there is any easy logic to support you request.  Your option would be creating more Stages and Templates to fit each combination of the users.  In a simple word: Originator and Approver should not be the same in a Stage-Template pair.
    Thanks,
    Gordon

  • Approval procedures

    Hi,
    I need to add approval procedures to Purchase Orders.  Is there a SAP note / paper about this.
    Iu2019m not sure about the difference between Approval Stages and Approval Templates and how it is applied to the PO document.

    HI,
    check this ELearning on Approval Procedures
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/eae7e505-0801-0010-499b-88af57450dd5
    You need to be a memeber of this community.
    Also check the following link and go to the session for 01.01.2005 Approval Procedures.
    [Approval Procedure|https://psd.sap-ag.de/PEC/calendar/html/listview.php]
    Regards
    Vikas
    SAP Business One Forums Team
    Edited by: Vikas Rastogi on Mar 24, 2009 10:32 PM
    Edited by: Vikas Rastogi on Mar 24, 2009 10:34 PM

  • Enhanced Approval Procedure Functions- authorization issue

    Dear Expert,
    I have activated the enhances approval procedure function as per below screen shot:
    Granted authorization as mention in New ChaRM Feature with SP 10: Enhanced Approval Procedure Functions by Michael. With SM_APP_AP with 02, 22 and 75.
    But the Request for change procedure selection and approval steps was disabled
    The requestor able to change the approval procedure and approval steps only  if i granted the user with 70 (administer).
    Please help as i want the requestor to be able to select the approval procedure and approval steps but not approving the CR. Im following the chart below but seem like is not working.
    Role
    SAP standard roles
    Activity for
    Change Manager
    SAP_CM_SMAN_CHANGE_MANAGER
    37 (approve) approval step, 75 (delete approval step), 22 (add approval step), 02 (change approval procedure assignment)
    Potential Approvers
    SAP_CM_SMAN_DEVELOPER
    SAP_CM_SMAN_OPERATOR
    SAP_CM_SMAN_TESTER
    37 (delivered inactive)
    Power User, Administrator
    SAP_CM_SMAN_ADMINISTRATOR
    70 (administer), 37 (approve) approval step, 75 (delete approval step), 22 (add approval step), 02 (change approval procedure assignment)
    Thanks
    Regards,
    Junnie

    Hi Jansi,
    I have added activity 22 (add approval step)  and 02 (change approval procedure assignment) but the approval procesure and approval step are disabled and not allow the requestor to select /add/ male changes.
    So im not sure which part is going wrong.
    Thanks
    Regards,
    Junnie

  • Query for Credit Limit Approval Procedure

    Hi experts,
    Need your help with an approval procedure query. There is already the option to launch when the BP's balance exceeds the credit limit by a set dollar amount. What we would like is for the procedure to launch when the balance exceeds an additional 10% of their credit limit.
    Ex: Customer's credit limit = $1,000. We want the approval procedure to kick in when the sales document causes their balance to be >= $1,100. Thanks.

    Adding this to the WHERE clause will include the DocTotal
    T0.Balance + $[$29.0.Number]
    SELECT distinct 'true' FROM OCRD T0 WHERE T0.CardCode = $[OINV.CardCode] AND
    (T0.Balance + $[$29.0.Number]) >= T0.[CreditLine] * 1.1

  • Approval Procedure based on query

    Dear All,
    I'd like to make approval procedure based on query.  The condition is when the AP Invoice document created based on GRPO and there's a different Amount (AP Amount <> GR Amount) then it should trigger the approval procedure.
    Do you have any idea about the query structure?
    Thanks

    shobah,
    try this below query like this
    Select TRUE From OPCH Where DocTotal > 25000
    Jeyakanthan

  • Aging query for an approval procedure

    I need to include the customer accounts receivable aging in a approval procedure. Is there any  way that I could have the query that is used in the report that SBO has.?

    Hi,
    The aging is not store in the certain table. I am not sure you could do that. The aging is vary and it is also difficult to include it. Although it seems that you could use terms based on user queries but it will take a lot of work. So, I suggest just use account balance of the customer.
    Rgds,

  • Approval Procedure - User Query .....!!

    Hi Experts,
    In our organisation we have a approval procedure applicable on sales order. There are two authorizer authorises specfic users request. Now the problem is for a specific customer order can we use a separate query to change the authorizer ??
    Example : -
    Approval Stage 1 : Authorizer A : User 1, User 2
    Approval Stage 2 : Authorizer B : User 3, User 4
    Now, User 2 requires approval of specific customer order which will authorise by Authoriser B.
    Is there any way to write a query on Approval Template for that
    or User 2 has to be added on both the Approval Stage
    or anything else ?? Please guide.
    Regards,
    SK

    Hi,
    There is no way to write a query on Approval Template for that. User 2 has to be added on both the Approval Stage.
    Thanks,
    Gordon

  • 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

  • Query that will run on the items matrix and trigger Approval procedure

    Hello,
    We are trying to design an approval procedure whenever an item code appears in a certain UDT.
    For example, we have many items in OITM.
    We have 50 of those items also in @BIN.
    The approval procedure should be triggered only when the document lists one of the items that appear in @BIN.
    I am using the following query:
    SELECT 'TRUE'   where $ [$38.1.0]  IN (Select code from [@BIN] )
    The problem is that the query would only search on the first row and wouldnu2019t continue to the next rows.
    Do you have any idea how to bypass this limitation?
    Thanks in advance
    Revital
    SELECT 'TRUE'   where $[$38.1.0]  IN (Select code from [@BIN] )

    Hi Revital,
    One way to implement this functionality would be to use a UI API that verifies the values while filling the items in the Matrix. For this you would need a little programming knowledge but no extra license.
    There is a lot of information including Code Samples in the SDK Package delievered with every patch of Business One.
    Kind Regards,
    Friederike Mundt

Maybe you are looking for

  • 10.4.5: why are my highlight colors wrong?

    no matter what highlight color i choose in the Appearance prefs pane, i get a different color - or, more accurately, a very different shade of the same color - in some places. when i select text in a text-editing app (or right here in Safari), for ex

  • Lock and Commit work in INBOUND IDOC

    Hi Experts, Problem is about lock and commit work i need to receive idoc for Good receipt for purchase order. For one Purchase Order i can receive many good receipt Idoc at the same time and when first came in Lock the Purchase Order and further idoc

  • Apps i-net connection

    Hi! I want to be enlightened what to do so my apps would connect to the internet again, excluding the option of formatting and hard resetting.  The Social app, Nokia Blogs app, other media apps (made with App Wizard) can't connect to internet. Messag

  • If I live in Canada for part of the year and the US for the other part, how can I redeem different itunes cards?

    I Live in Canada for part of the year and the US for the other part....how can I redeem giftcards fro one into the other?  can I create a new apple ID for in the States to redeem my giftcards?

  • Trial download error

                 im useing XP i just down loaded adobe XI pre free trail and when i try to convert wps to pdf i get unable to find adobe pdf printer and distiller printer  also have gotten this error  cannot copy file PSCRIPT.NTF can any body help me out