AR Invoice date should not be less than delivery date

How can i make an alert for user when they will prepare AR Invoice?
Example:
If Delivery date is 01-10-2010 and Invoice date should be later or same but not less than delivery date(01-10-2010).
if Invoice date is less than delivery date then This data should not be added into the database.
So there is any way to stop this error.
Thanks
Mizan

Dear Bala,
Here is the SP:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER proc [dbo].[SBO_SP_PostTransactionNotice]
@object_type nvarchar(20),                     -- SBO Object Type
@transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error  int                    -- Result (0 for no error)
declare @error_message nvarchar (200)           -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
--     ADD     YOUR     CODE     HERE
If @object_type='13' and @transaction_type='A'
BEGIN
If Exists (Select distinct 'error' from [dbo].[OINV] T0 Inner Join INV1 T1
On T0.DocEntry=T1.DocEntry Inner Join DLN1 T2 On T1.BaseEntry=T2.DocEntry
Where T0.DocDate<T2.DocDate
And T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
Select @error = -1,
@error_message = 'DocDate for Invoice Should not be Less than Del. Date. So You can not Add this Doc'
End
End
-- Select the return values
select  @error,@error_message
end
Regards,
Mizan

Similar Messages

  • Date should not be  less than current date.

    Hello, I have a form.It has an item called end_date. I want to have validation of end_date in such a way that "end_date should not less than current date". Any tips would be helpful.
    Thanks in advance.

    jwellsnh wrote:
    Pravish,
    A dynamic action executing JavaScript can do this:
    Create a Dynamic Action:
    Event Before Page Submit
    Condition JavaScript Expression
    Value $v('P1_END_DATE')<$v('P1_BEGIN_DATE')In this scenario; P1_BEGIN_DATE would need to default to sysdate and could be a hidden item on the page.
    Jeff
    Edited by: jwellsnh on Jul 19, 2012 9:50 AMMaybe I'm missing something but isn't this just a use case for a common-or-garden validation? Would be interested to know why you thought of javascript rather than normal built-in functionality (not meant as a criticism incidentally!) - is javascript your first port of call when it comes to APEX?
    I'd also watch out for comparisons to SYSDATE - remember that SYSDATE includes the current time, so you'd need to take that into account (maybe you could make use of the TRUNC function to remove the time element?). Indeed, would javascript evaluate that expression as comparing two dates (I know Javascript evaluates variables byDuck Typing but does this work in practice)?

  • Commercail invoice qty should not be greater than PO qty.

    Hi,
    We have a requirement where, system should check for the commercial qty with PO qty and if commercial invoice qty exceeds than PO qty, system should give an error. This is required to avoid duplicate payment of customs duties.
    This functionality should work for parking and posting of commercial invoice both.
    Please suggest relevant solution.
    Thanks & Regards,
    Bhargavi.

    Hello,
      You can use the function exit EXIT_SAPMM06E_012 to carry out this validation.
    Thanks,
    Venu

  • Required delivery date in sales order shoud not be less than the inhouse pd

    Customer Requested Dates (CRD) entered in orders are often shorter than Product form wise lead time. 
    Logic to be configured in SAP : SAP should capture the CRD as per the lead time of Products or Date entered by sales persons (whichever is later).
    Required delivery date in sales order shoud not be less than the inhouse production lead time.
    Please help.
    Regards

    IMG - Sales and Distribution - Basic Functions - Availability Check and Transfer of Requirements - Availability Check - Availability Check with ATP Logic or Against Planning - Carry Out Control For Availability Check
    Here select the combination of your Availability Check & Checking Rule.
    Under Replenishment Lead TIme, you need to put a Tick Mark in the Check Box of "Check without RLT"
    This will make sure that system considers either the Requested Delivery Date or actual Material Availability Date, which ever is earlier.
    Hope this helps.
    Thanks,
    Jignesh Mehta
    Edited by: Jignesh Mehta on Nov 9, 2011 12:18 PM
    Edited by: Jignesh Mehta on Nov 9, 2011 12:23 PM

  • Purchase Order Quantity should not be more than PR quantity

    Dear all,
    We want to control Purchase Order quantity against Purchase Requisition.
    We have configured message setting 00 076 as  ERROR. when we create Material PR for lets say 100 quantity. When we create single or multiple Material PO against this PR for more than 100 quantity system is giving us error. This is exactly what we needed.
    But due to this message setting when we create Service PR and give service quantity lets say 100. and when we create Service PO and give Service quantity 60. First time system is allowing to save the Service PO.
    When we create another Service PO with reference to same Service PR system is showing error as we have configured. Even though quantity 40 is still available.
    What we want is to have control on quantity of Purchase Order for Material as well as service. Quantity should not be more than PR quantity.
    Is there any other way to have such control? please provide other available options to configure.
    Regards
    Kant

    Hi,
    06 076 is only for applicable only in case of material.
    For Service and material both, use 06 400 as error "Materials/services for requisition & & already ordered with & &"
    NOtes 786736
    This may help u !
    Regards,
    Pardeep malik

  • Downpayment should not be more than PO Value

    Dear All
    Down payment against purchase order
    Downpayment should not be more than PO Value
    here i want control material wise taht mean some of the material shouble be allow the exces payment and some of the material should not be allow the exces amount. againt purchase order
    Regards
    Navap

    Hi,
    For your you need to write Validation in OB28 and take help of your ABAPEr, the logic will be:
    1. Create Set through GS01Table MARAField MATNR
    2. Pre-Requisite
        BKPF-BLART = 'Down payment Document"
       Check
        Give Exit Name such as UF101 and in this exit you can ask your ABAper to write code that
    if Material on PO is in Set (created in Step 1) and Advance Amount > PO Amount then post DP
    Message
    Give your own message number
    Hope this helps!
    Br,Vivek

  • Base Amount should not be more than PO net price

    hi
    Base Amount should not be more than PO net price , in MIGO  if the Material is excisable excise tab will be populate i can able to change the base amount . i need the restriction Base Amount should not be more than PO net price , this requirement for purticarly for the dealar relegated tax codes . i am not maintain any conditions relegated BED ,ECESSand SECESS in the taxcode . i will eater the excise tab in MIGO or J1IEX Directly . please advise me how to restrict
    @sakhi

    if that is the case why are you proividing the Authorization for MIGO_GR transcation...........Restrict the MIGO transaction and try to give MB01 transaction .So that there will no discrepancy in PO to GR....

  • How to write validation in java sript item should not allow more than 20 ch

    HI,
    I need to write validation in java script for a item it should not allow more than 20 characters.
    Thanks
    Nr

    If this answers your question, please mark your question as answered (so everyone knows it is answered) and assign points where you see fit..
    Thank you,
    Tony Miller
    Webster, TX

  • Should not allow more than one attendance or absence code on any given day

    Hi Hr Experts ,
    I need to use customer enhancement in my program.
    CATS should not allow more than one attendance or absence code on any given day. requirement is
    that each day will be either a full attendance or full absence and there will not be any mixture.
    Function/Program: u2022
         EXIT_SAPLCATS_006: CATS: Validate Entire Time Sheet
    transaction code CAT2.
    how to code the same?

    hai,
    check the Time constraint class for absence/attendance types.
    Regards,
    Chiran Reddy.

  • MIGO should not create after PO Delivery Date

    Hi,
    We have a PO with multiple line items and diff. Delivery Dates...
    We want that during MIGO Process, Posting Date should not exceed to PO Delivery Date.
    Means, if PO Delivery Date is 05.07.2014, then MIGO should not created after this date...
    Please suggest.

    If you want to achieve the scenario with standard settings, then you can use the field "Latest GR date".
    Just put the same date as delivery date in this field. Then  system will not allow to do GR if the Posting date is exceed with compare this date in MIGO.
    You can find the latest GR date in Delivery tab in PO. Also you can maintain the field as mandatory in PO to avoid the field value blank as per your requirement.
    Also if you want to change Latest GR date along with delivery date, just take the steps which is explained in this document Mass changes from one field to another field.
    **Edited by: Dëv Päträ

  • Picking qty less than Delivery qty alert - Urg

    Hi Guys,
    We have done a configuration for order to cash scenario on ECC6.0 now we have one requirement that if picking quantity less than delivery quantity it should send an alert to customer representative.
    I have few questions below before start up configuration for that process.
    1. How do i configure to the system to send an alert when there is short pick in delivery document? 
    2. When customer representative receives the notification he or she make the necessary changes manually change in delivery document of delivery qty to picking qty.
    3. How do i say the logic to ABAPer to do a coding, I think there is no standard configuration to do that or if it is please write back to me.
    I posted few questions but none of the questions answered to me.
    Please go through and reply me back... Urgent.
    regards
    rc gopi

    Dear Senni.B,
    > I want to enter less picking qty than delivery qty during delivery process.
    As per the standard functionality picking quantity should be equal to the delivery quantity.
    And not advaisable less picking qty than delivery qty during delivery process.
    Can you plse give more details In which scenario you require this functionality and what is the use of that.
    I hope this will help you,
    Regards,
    Murali.

  • ERROR: PGI in delivery with picked quantity less than delivery quantity

    Hi Friends!
    I need your help, i have the following situation:
    Outbound Delivery with batch position:
    90001  Mat DD3450 Picked Delivery Quantity=98 and Picked quantity=84
    Overall Pick Status = "B"
    Overall WM Status = "C"
    The outbound delivery was posted completely and the following documents was generated:
    WMS transfer order:  With 84 UN in quantity
    Material document:  With 98 UN in quantity
    Invoice: With 98 UN billed
    The question is how was posible to generated the PGI for the outbound delivery when the picked quantity was less than delivery quantity? is a SAP program error?
    Thanks
    Best regards
    Enrique

    benito,
    Check your Picking Confirmation config. as you are using WM/Lean WM, then your Shipping Point should have a mandatory requirement to confirm all TO's. The confirmation should update the Picking Status and the Overall GI Status to 'C' (with any relevant changes to the picked qty). Give that a go.
    Cheers,
    Paul...

  • Residual payment should not allow more than Vendor Invoice

    Hi,
    Eg: Vendor has booked invoice 5000 INR, when user make payment through F-53 or F-58 through "Residual" payment user can pay more than invoice 5002 INR and below accounting entry is posting.
    Bank Cr 5002 INR
            To  Vendor Dr 5000 INR (Invoice amount)
            To  Vendor Dr 02    INR  Excess than invoice 
    Business requirement is system should not allow pay more than invoice amount. How to control suggestion would be appreciated.
    I have done below settings for your understanding here system configuration.
    1. OBA3: Under "Permitted Payment difference" zero for Gain , Loss , Amount, Percent & Adjust Discount By  However "Permitted Payment Differences for Automatic write-Off(Function code AD)" zero.
    2. OBA4: Cash discount per line item: Zero and Under "Permitted Payment difference" Revenues, Expense, Percent & Cash discount  put Zero.
    Regards,
    Babu.

    Hi Prashant,
    I have restricted many fields to use through screen variant now user can not pay more than Invoice amount except through Residual payment process.
    Client side management strongly says that they want to use Partial and Residual payment process options but user should not allow pay more than invoice amount.
    If any solution please guide me.
    Regards,
    Babu.

  • Web Application name does not accept less than 3 characters

    Hi,
              I recently migrated from WLS6.0 to WLS6.1 in NT 4.0 and found that, if the Web Application name is less than 3 characters, server does not report any errors, but could not access the web application. This was not a problem in WLS 6.0.
              If anyone faced this problem or it is documented in WL6.1 please let me know.
              Thanks,
              Cabir
              

    It's been reported and I believe that support can provide you with a patch.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              Clustering Weblogic? You're either using Coherence, or you should be!
              Download a Tangosol Coherence eval today at http://www.tangosol.com/
              "Cabir" <[email protected]> wrote in message
              news:3c802f4f$[email protected]..
              > Hi,
              >
              > I recently migrated from WLS6.0 to WLS6.1 in NT 4.0 and found that, if the
              Web Application name is less than 3 characters, server does not report any
              errors, but could not access the web application. This was not a problem in
              WLS 6.0.
              >
              > If anyone faced this problem or it is documented in WL6.1 please let me
              know.
              >
              > Thanks,
              > Cabir
              

  • PO Qty should not be more than PR Qty

    Hi All,
    I am creating a PO from PR.
    I want that the PO qty should never be more than PR qty, and if so it should give an error.
    Can anyone tell me the BADI or exit for this? I have already seen exits for PO and PR, but I am not able to figure out which exit to use.
    Thanks in advance.
    Vinod.

    Hello,
      You can use the function exit EXIT_SAPMM06E_012 to carry out this validation.
    Thanks,
    Venu

Maybe you are looking for