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

Similar Messages

  • 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 Template by Gross profit Percentage for entire Document

    I'm trying to figure out how to create an approval template that would require an approval if the entire Sales order falls below a minimum gross profit percentage. I did find a built in function that I can require approval if any single line items drop below minimum, but I haven't been able to find a way to either select the gross profit percentage or access the needed fields to calculate the GPP.
    Thanks in advanced

    Hi Nick
    You can give an approval template of the gross profit percentage at the document level in the sales order but not at the row level, it will suit if the condition one to one relationship exists. Thought on the queries and formatted searches might help.
    HTH
    Thanks & Regards
    baskar

  • User-managed image gallery in template-based html site?

    I've created a simple, template-based html/css site for a client and they've asked for a set of sales pages for their vans and cars.  The idea is that there'll be an entry page, which has an itemised list (thumbnail pic, title and a couple of sentences), which then links to individual template-based pages on which the full information is listed.
    So far I've given the client a copy of Macromedia Contribute.  No problems there.  However, it would be great to have a relatively simple image gallery which will display up to, say, 10 pix.
    The problem is that without a complex back-end CMS, I need to find a user-friendly (ie, not technical) gallery system which I can either embed into the template, or set up so it can be easily added to a page.
    Am I being overly optimistic here, or is there an option (ideally free, of course!) which someone can recommend?  My ideal is something that could be accessed and updated through Contribute, but if there's a standalone app which can do it once the page has been created in Contribute, that would be fine.
    Thanks in advance.
    Trent

    I've created a simple, template-based html/css site for a client and they've asked for a set of sales pages for their vans and cars.  The idea is that there'll be an entry page, which has an itemised list (thumbnail pic, title and a couple of sentences), which then links to individual template-based pages on which the full information is listed.
    So far I've given the client a copy of Macromedia Contribute.  No problems there.  However, it would be great to have a relatively simple image gallery which will display up to, say, 10 pix.
    The problem is that without a complex back-end CMS, I need to find a user-friendly (ie, not technical) gallery system which I can either embed into the template, or set up so it can be easily added to a page.
    Am I being overly optimistic here, or is there an option (ideally free, of course!) which someone can recommend?  My ideal is something that could be accessed and updated through Contribute, but if there's a standalone app which can do it once the page has been created in Contribute, that would be fine.
    Thanks in advance.
    Trent

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

  • 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 template for line item price variation

    Any recommendation on how to managed price variations at a line item level with using approval templates? The approval templates currently only allow for TOTAL document differences.
    A senario as follows
    1.  Purchase order with line item price created
    2. GRNI created (and unit price changed)
    3. AP invoice created  - AP approval template kicks in advising that there is a price discrepancy at a line item level between the Base and target documents.

    Hi!
    You can achive this via Stored Procedure.
    Approval Procedure will not work for Row Level.

  • Excise Invoice for Order Based Billing Scenerion

    Dear Friends,
    We have a scenarion, wherein we are working with Sales Order Based Billing.
    We are in the process of Implementing CIN with TAXINN.
    Is it possible to create excise invoice for the scenarion of Sales Order based billing, instead of delivery based billing.
    If yes, what are the steps we need to follow to configure the same.
    Regards,
    Harsh

    hi
    If u want the create  Excise Invoice for Order Based Billing Scenerion, u must be set in billing document in General control in fields is.
    <b> SD document categ.   M      Invoice                                            
    Transaction group    7      Billing documents                                  
    Billing category                                                               
    Document type                                                                  
    Negative posting            No negative posting                                
    Branch/Head office          Customer=Payer/Branch=sold-to party                
                                 No                                                 
    Invoice list type    LR     Invoice List                                                                               
    Rebate settlement                                                              
    Standard text     </b>     
    Best copy of F2 Invice. and this billing type in outgoing invoices in Tax on goods movement in Logistics general.
    Rewards point it helps

  • Block invoices for PO with no GR-based IV flag

    Hello SAP experts,
    I need your help with finding a way to block invoices for PO with no GR-based IV flag.  At our company, we treat service POs almost the same as material POs (to avoid receipt of service entry).  The only difference from material PO is that service PO does not have the flag for GR.  We customized our EBP to have this done.
    Now, accounting wants to automatically block all invoices associate with service POs.  In this case it would be a PO with no GR.  I tried LIV configuration but it is only for price, quantity and etc.  I also tried blocking with IR before GR but it didn't work because there is no GR.
    Is there a way to achive automatic invoice block in this case?
    Appreciate your help.
    -AT-

    Hi Annie,
    if the configuration doesn't help you enough, you would have to add some custom logic after the invoice has been created.
    Technically speaking, I believe there exists a business add-in (BAdI) where you could enter a piece of code which would after the invoice creation check the GR and block it if appropriate. Another implementation option would be a mini-workflow - there you would have a step which checks the GR existence and blocks the invoice.
    Hope this helps, I suggest talking to your local abap consultant for more details,
    -Mikko

  • Some users continue to get overdue notices for an approval workflow.

    Some users continue to get overdue notices for an approval workflow that has already completed and approved. How to stop the overdue notices. And there are no tasks running in the task list.
    Thanks
    Ramanjjilu Naidu

    Rama,
    Usually these happen from restored/QA env which give us false impression.
    Check similar thread - 
    SharePoint
    Approval workflow Overdue emails after workflow completion
    Overdue
    task reminder even after task /library deleted
    Task
    overdue emails even after deleting all tasks
    Workflow
    Task overdue notifications
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Third Party Integration for Template Based Hire in PS 9.1

    Hi All,
    I am implementing template based hire on PS 9.1.
    I am receiving the applicant details from a third party vendor in a xml message.
    Requirement is to insert the applicant details into template based hire records (HR_TBH_HDR and HR_TBH_DATA).
    I am able to subscribe the field values from xml message. But facing the problem while inserting the values into base records.
    I am trying to use Component Interface on HR_TBH_JOB component. The pages on this component are dynamically build and so the records.
    If anyone has worked on the third party integration for Template Based Hire in PS 9.1, please let me know your suggestion for insertion into template based hire records.
    Thanks,
    Vijay

    Hi Michel,
    I am not getting any error message as I haven't completed the coding yet.
    I will go more on the technical stuff so that the issue will be more clear.
    I am using the Integration Broker setup to receive the xml message from third party.
    I have written the app package and added that as handler into the service operation. as of now I am able to subscribe the xml message. I am having the field values into the variables.
    For insertion of those values into template based hire (TBH) records (HR_THB_HDR and HR_TBH_DATA) I created a new CI on HR_TBH_JOB component.
    But when I analysed this component I came to know that Pages, Sections on the Pages and the fields of the sections are dynamically build based on the Template.
    On HR_TBH_DATA page PeopleSoft is using derived record (HR_TBH_SCR_WRK). Field values are assigned to this record fields bsaed on the section of the template.
    Here is issue I am facing while coding. As there is only one record (HR_TBH_SCR_WRK) to store the all the values from the template, I am not able to understand that how to assign the variables to CI variable. I am looking for the logic, so that the CI will work normally.
    If you have any sugestion to insert the data into TBH records other than using CI, will be appriciated.
    Thanks

  • Delivery & Invoice for Rules based ATP check materials

    Hi All,
    We have an query regarding rules based ATP , delivery & Invoicing . When we create a SO ( say we have only one line item 10 , with quantity 100 created at Plant P1 , item category TAN ) , ATP confirmation happens   ,based on the stock & receipts ( say we have confirmation of 60 units at Plant P1  ) . Since we are using RBATP , the remaining 40 quantity is being confirmed at Plant P2.  Now the order will have multiple line items 10 the original line item but with different item category TAPA and also two more line items  for quantity of 60 & 40  for plants P1 & Plants P2 respectively with item category TAN. This is the standard functionality.
    My question is , Will there be any issues with respect to delivery & Invoicing  as there are multiple plants and different item categories.
    Thanks & Regards
    Surendra

    Hi,
    With respect  to delivery you will have differnt delivey document because your shipping point is going to be different.
    Regarding Billing you can combine the differnet delivey document if the delivery document created using the sales order contains the same payer,payment terms, billing date,material group and Incoterms.
    Apart from the above you will not face anyproblem by having 2 diiferent item category for the above said scenario..
    Regards,
    V.Devaselvam.

  • Blocked SD documnet for customer with Overdue invoice

    Hi All Expert,
    I want to add the checking for create Sales Order using VA01,
    once the customer have overdue invoice, the system block the sales order, and need un-block the sales order using VKM1.
    I've add the in the Automatic credit Control using the OVA8 for the Checks Open items with Reaction B, and
    Number of days for considering open items 1, for testing once the overdue 1 day, the sales order will be blocked.
    However, no Error message display, have I miss something?
    Please help.
    Thanks.
    Terry

    Hi,
    Can you check all the settings one by one? You can refer this link [Step by Step Credit Management Configuration : SAP : Check List|http://sap-f2.blogspot.com/2009/08/step-by-step-credit-management.html]
    2.  [credit management|http://sap-img.com/sap-sd/credit-management.htm]
    Regards

  • 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

  • Approval Templates for the User Defined Object(UDO)

    Hi,
    I just wanted to check whether the Approval Templates for the User Defined Object(UDO)...i.e. Said to the User Defined Form..
    if possibe how it can be done.....
    Thanks in Advance,
    With Regards,
    MadhuSudhana Rao.G

    Hi MadhuSudhana Rao,
    The function you requested is not available yet.
    Thanks,
    Gordon

Maybe you are looking for