Date check validation

Hi guys i need some assistance again with this query...it isn't working. I am not sure on if I run a sub-query (like another select statement) or need to re-write the query. What I want is to disregard the number 1300xxxxxx only for the dates between 07-Nov-2003' and '28-Feb-2004'.
But I still want the number 1300xxxxxx for all other dates, as well as other numbers between the dates above. ie: dont disregard the time period above but only for the 1300xxxxxx number.
Cheers George
and nums."BNumber" != '1300xxxxxx' only for nums."StartDate" not between '07-Nov-2003' and '28-Feb-2004'

where bnumber not like '1300%'
    or startdate not between to_date('11/07/2003', 'mm/dd/yyyy') and to_date('02/28/2004', 'mm/dd/yyyy')

Similar Messages

  • FM for checking valid date

    Hello, is there a function module which will allow me to check whether a date is valid or not?

    then DATE_CHECK_PLAUSIBILITY is right FM in such cases...
    DATA : p_date(8) TYPE d VALUE '20081301'.
    CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
      EXPORTING
        date                      = p_date
      EXCEPTIONS
        plausibility_check_failed = 1
        OTHERS                    = 2.
    IF sy-subrc NE 0.
      WRITE :/ 'Invalid date'.
    ENDIF.

  • How to force validator method instead of data type validation in af:table

    This post will probably once again illustrate exactly how new I am to the Java/JDeveloper world so thanks in advance for any help! I have tried searching but couldn't find anything that seemed to mirror my problem.
    I am using a modification of Frank's idea on how to individually color table cell backgrounds.
    http://thepeninsulasedge.com/frank_nimphius/2008/04/10/adf-faces-conditionally-color-table-cell-background-2/
    My intention was to use this along with custom validation to color cells with invalid values. It was a user request that it be done so as to quickly spot input errors (when updating records) if someone had missed the initial faces message and was no longer in the field that generated the error. It works fine for fields in my af:table based on VO attributes with varchar2 types but the 2 values with float and number types handle character input with a faces message "Not a number" and then do not seem to process the validator. The reason I (think I) need to use the validator in addition to Franks code is that in the validator code I use an addpartialtarget to the uicomponent that refreshes the background color if it changed in the backing bean.
    FYI the project is based on ADF BC/JSF.
    I tried gave the full use case as suggested so you understand what I am trying to accomplish and if you have a better way to accomplish this please let me know as well.
    Thanks,
    Rich
    Managed-Bean
        public String getMODELColorString() {
            MODELColorString = "width:125px;";
            Object MODEL = getRowValue("#{row.ModelType}");
            if (MODEL != null) {
                if (!isValidMODEL(MODEL.toString())) {
                    MODELColorString = "background-color:red;width:125px;";
            return MODELColorString;
        }Backing-Bean
            if (!myValidation.isValidMODEL(object.toString())) {
                System.out.println("InValid Data");
            AdfFacesContext.getCurrentInstance().addPartialTarget(uiComponent);P.S. If I made any newbie mistakes in my code please let me know, although this is obviously not production code yet by any means.
    Message was edited by:
    BengalGuy

    Frank (or anyone else who might offer some advice),
    I thought that solved my issue as I could see the validator getting triggered, however something else is now happening. It seems to pass through the validator once for each of the values on my table with the invalid input I entered on one of the numbers, "a" in this case, and then once again through the color change backing bean but at that time the invalid input reverts to the original input and the change is rendered on the af:table as well. Any thoughts ? I put a print in the validator method, in the method that gets called from the validator (checks to see if value can be converted to float) , and then the color change bean (which also calls the float validation test) and pasted the output below.
    Validator Triggered \Current Value = 0.037178375 \FloatTestOn: 0.037178375 \Result: Valid Data
    Validator Triggered \Current Value = 0.109212324 \FloatTestOn: 0.109212324 \Result: Valid Data
    Validator Triggered \Current Value = 0.18624917 \FloatTestOn: 0.18624917 \Result: Valid Data
    Validator Triggered \Current Value = 0.26863635 \FloatTestOn: 0.26863635 \Result: Valid Data
    Validator Triggered \Current Value = 0.35674548 \FloatTestOn: 0.35674548 \Result: Valid Data
    Validator Triggered \Current Value = -0.38118127 \FloatTestOn: -0.38118127 \Result: Valid Data
    Validator Triggered \Current Value = -0.3382032a \FloatTestOn: -0.3382032a NumberFormatException: For input string: "-0.3382032a"
    08/04/16 10:03:14 \Result: InValid Data
    Validator Triggered \Current Value = -0.29224017 \FloatTestOn: -0.29224017 \Result: Valid Data
    Validator Triggered \Current Value = -0.24308495 \FloatTestOn: -0.24308495 \Result: Valid Data
    Validator Triggered \Current Value = -0.1905158 \FloatTestOn: -0.1905158 \Result: Valid Data
    Validator Triggered \Current Value = -0.13429564 \FloatTestOn: -0.13429564 \Result: Valid Data
    Validator Triggered \Current Value = -0.07417088 \FloatTestOn: -0.07417088 \Result: Valid Data
    Validator Triggered \Current Value = -0.009870344 \FloatTestOn: -0.009870344 \Result: Valid Data
    \Checking for color change \FloatTestOn: 0.037178375
    \Checking for color change \FloatTestOn: 0.109212324
    \Checking for color change \FloatTestOn: 0.18624917
    \Checking for color change \FloatTestOn: 0.26863635
    \Checking for color change \FloatTestOn: 0.35674548
    \Checking for color change \FloatTestOn: -0.38118127
    \Checking for color change \FloatTestOn: -0.3382032 <- "a" is no longer there ?
    \Checking for color change \FloatTestOn: -0.29224017
    \Checking for color change \FloatTestOn: -0.24308495
    \Checking for color change \FloatTestOn: -0.1905158
    \Checking for color change \FloatTestOn: -0.13429564
    \Checking for color change \FloatTestOn: -0.07417088
    \Checking for color change \FloatTestOn: -0.009870344

  • Function module to verify if date is valid.

    Anyone know a function module to verify if date is valid?thx

    hiiii
    This function module will be useful.check.
    FM CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
    EXPORTING
    date = pre_date
    EXCEPTIONS
    plausibility_check_failed = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e002(0s) WITH pre_date.
    ENDIF.
    reward if useful
    thx
    twinkal

  • What  are the usual date field validations

    Hi all,
    can you please tell me what  are the usual date field validations in selection Screen
    Thanks and regards ,
    Madhavi pilla

    Once you declare it as TYPE SY-DATUM, usually that is enough.  Sometimes we will also check that it is not less than '18000101' or greater than '99991231'.  Or if you have a specific date range that applies to your program you could check the field contents against that. I hope this helps.
    - April King

  • Date check in MIR7 & MIRO

    Hi:
                  We faced a scenario where GR was processed on July 09, 2011 & parking its parking was done on July 15, 2011 MIR7 but the user posted invoice  on June 30, 2011 (even before the GR was processed). We want to deploy a check  that invoice posting date should not be earlier than the GR date. Validation does not work for it. What else can be done , please guide.
    Regards

    You can try the below code
    METHOD: IF_EX_INVOICE_UPDATE~CHANGE_AT_SAVE
    TYPES: BEGIN OF TY_RSEG,
                 LFBNR TYPE LFBNR,
                 LFPOS TYPE LFPOS,
                 LFGJA TYPE LFGJA,
              END OF TY_RSEG.
       DATA: WA_RSEG  TYPE TY_RSEG,
             WA_DRSEG TYPE LINE OF MRM_TAB_MRMRSEG.
       DATA: IBUDAT   TYPE BUDAT.
       LOOP AT TI_RSEG_NEW INTO WA_DRSEG.
         IF WA_DRSEG-LFBNR NE SPACE AND WA_DRSEG-LFGJA NE SPACE.
           SELECT SINGLE BUDAT FROM MKPF
             INTO IBUDAT
            WHERE MBLNR = WA_DRSEG-LFBNR
              AND MJAHR = WA_DRSEG-LFGJA.
           IF IBUDAT GT S_RBKP_NEW-BUDAT.
             MESSAGE 'PLEASE CHECK MIRO POSTING DATE. DATE IS BEFORE MIGO POSTING DATE' TYPE 'E'.
           ENDIF.
         ENDIF.
       ENDLOOP.
    Regards
    Pommuthurai

  • Date check

    I have to check if a string is a correct date. I have already checked topics about this in the forum but all of them talk about formatting string as a date.
    In other words if I have a string like dd-mm-yyyy how can I control if it is a real date or not?
    For example 99-01-2003 is not correct but if I check only the format it is OK.
    Is there a class that can do it?
    I'm sure of that but I haven't found it.
    Thanks in advance.

    You can make use of java.text.SimpleDateFormat to perform verification of the Date
    import java.text.SimpleDateFormat;
    import java.text.ParseException;
    public final class DateTest {
      // The Date Format to be used to verify the String
      private static final SimpleDateFormat DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd");
      // Set the Date Format to be non-lenient. This is what determines
      // if a date is valid or invalid
      static {
        DATEFORMAT.setLenient(false);
       * The Main Method
       * param args The Arguments from the Command Line
       * @since 1.1
      public static void main(final String[] args) {
        if (args.length != 1) {
          System.out.println("Usage : java DateTest <date>\nDate must be of the format \"YYYY-MM-DD\"");
        } else {
          try {
            DATEFORMAT.parse(args[0]);
            System.out.println("\"" + args[0] + "\" is Valid");
          } catch (ParseException e) {
            System.err.println("Date Could not be parsed Successfully. " + e.getMessage());
    }Please note that SimpleDateFormat is not thread safe. If you need one that is thread safe, you can consider FastDateFormat from the jakarta commons project at http://jakarta.apache.org/commons/ . The FastDateFormat class is from the Lang component
    Hope that helps
    Jega

  • Exit for delivery Date check in Sales order [Via EDI]

    Hi Friends ,
    We have a requirement in which if the Sales Order is created Via EDI with INVALID delivery date then I have to set a flag in some Z Table . I have tried searching for exits and debugging the code but was unable to find a place where SAP checks for delivery date validity . Please help me with possible exits/Badis?Enhancement Pts etc where I can mark this flag .
    Thanks & Regards
    Gaurav Deep

    @Vinod Thanks  for your reply , the delivery date is there in EXIT_SAPLVEDA_009 .
    But how will i check if the delivery date is valid or not , If you go to VA01 and give a invalid delivery date a warning message is issued , here if the warning message is issued then I want to set my flag , this might save my from  coding redundant delivery date check logic , can someone please help me how can i track if this warning message is issued .
    Thanks & Regards
    Gaurav Deep

  • Given String Date is valid/not?

    Hi Friends,
    I am getting date in string format e.g.
              String creationDate = "2007/02/30";
    I want to check is valid or not. see in the example I have given 30 Feb 2007 which is invalid date. Is there any way to check the date is valid or not.
    Any help will be appreciable for me.
    Thanks in advance...
    - Hiren Modi

    use the java.text.SimpleDateFormat. The strategy is to instanstiate a SimpleDateFormat with the date pattern and then parse the input string with it to produce a java.util.Date. This in turn is fed back in the same SimpleDateFormat instance for formatting resulting in a String which is then compared to the input string. If they are not equal then the input string is an invalid date. something like
    String input = "2007/02/30";
            String output = null;
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
            try {
                Date date = sdf.parse(input);
                output = sdf.format(date);
                if (!input.equals(output)) throw new IllegalArgumentException("invalid date");  // or however you want to handle it
            } catch (ParseException ex) {
                ex.printStackTrace();
            }

  • Credit Limit VS Posted Date Check

    Dear Experts
    Our client have a requirement on customer credit limit and I would like to seek for some good solutions.
    Here I provide one sample scenario: In SAP Business One a customer with a credit limit of $100,000 and account balance of $110,000. After a posted date check of $20,000 is deposited, customer account balance will be reduced to $90,000 and a Sales Order/ AR Invoice with amount less than $10,000 can be added for that customer without credit limit alert.
    However, our client thinks that it is not make sense to reduce the customer account balance given that a posted date check is deposited as the posted date check may not be cashed if the customers do not have money in their account.
    Would it be possible to separate posted date check payment amount from deducting the customer account balance? or would it be other workarounds?
    Thank you very much
    Regards
    Elton

    Dear jbrotto
    Thanks for your reply.
    Could you explain in details on how to make use of the commitment limit?
    As far as I know, commitment limit also considers the account balance of customer
    Regards
    Elton

  • Due date checking in F110

    Hi,
    My client want to use F110(Automatic outgoing Payment) to payment the vendors. But they want to avail Credit for at least 30 days .that means , those invoice process had been done before 30 days those should come to the APP PROPOSAL FOR THE PARTICULAR VENDOR,OTHER WISE NOT TO BE SEEN IN APP PROPOSAL  Is there any provision given in FBZP ?
    <removed_by_moderator>
    With Regards,
    Sudipto

    Dear Paul,
    If you want to check Due date then there is no setting in FBZP but at the time of running APP through T.code F110 , while defining payment proposal parameter there is 4th no. tab page with name 'Additiona Log' . in this tab page there is first option Due date check you tick on it and system will check due date for all vendors and customers which you have selected for Payment.
    thx.
    Ganpat

  • Batch expiration date check when goods issue

    Dear expert,
    In batch expiration date check, we have a requirement that when do goods issue with delivery note we should have a expiration date check for expired batch(the system needs to give a warning message when we want to pick a expired batch(in WM) or to issue a expired batch). But I checked OMJ5 and found that there is no check for movement type 601, 641, 643 or 647. Do we have a standard function for this requirement? Thanks.
    Leo

    Hi,
    In SD batch determination normally happens during Delivery creation for a Sales Order, Check for batch determination is maintained for a combination of sales org, order type - system determines Search Procedure at this level (here a check box also controls the batch check against selelction rules in case somebody puts a batch manually)
    later on through selection class and sort rules batch expiry is check during determination
    so all checks are applied before an actual goods issue is made so std SAP doesn't provide this check indicator at mvt type level
    Hope this helps
    Reg
    Dheeraj

  • Web Dynpro ABAP ALV On Data check

    Hi
    If i push the check button and i find an error in my on data check event and send an error message l_message_manager->REPORT_ATTRIBUTE_ERROR_MESSAGE. It will not check again when i am pushing of the check button again, i guess because no data has been changed. But if no data has been changed, the user will not have cleared the error for sure.
    Now as i write this i have an idea for an work around.
    But anyway. It seams to me that others should have faced this problem and i believe i am doing something wrong. I have tried to set the value again, but this will not trigger an change.
    So what i will try next is to save my error messages and just clear them when the data_check is done again. (I am not sure how to do this at the moment, but i will see.)
    Still does anybody know a better way, or how it's meant to be done?
    thanks.

    my solution is:
    on the data check event i save the changes to tables in my class.
    i have put an own check button in the alv, which is realy checking the data.
    the save button is then using my tables to do the actual changes to the dso.

  • UCCX 8.0 SU4 Data Check

    I've just upgraded from UCCX 7.0 to version 8.0 this weekend and when I do a Data Check I get User and Network Audio Source -- UUID cahnged from (long hex string) to (long hex) string.  This is also shows the same thing in the VoiceMailProfile section.  Any clue what's going on?          
    Thanks in advance

    Hi Lennie
    SU4 was originally scheduled for August, then October and according to the last Cisco post I saw on the partner forum its now mid December.
    All versions of 8.0(2) work with Windows 7 64 bit.
    Graham

  • POS DM master data check

    Hi all,
    is it possible to perform articles master data check (eg. ean code or article code existence) on sap retail master data instead of bw 0material?
    Thanks a lot
    Ado

    Hi Anthony,
    here some answers to your questions:
    1.) How does it check the existence of related master data? If you look at the details of a delta infopackage, you will not find an option to check for master data as compared to a normal delta infopackage.
    ==> you cannot check the refrential integrity via the InfoPackage, hence you have to this via transormations (if needed)
    2.)  Will it load the transaction data even if no master data exist for the transaction data?
    ==> Yes
    3.) Also in this process, will it create the master data SID table entries while it loads the transaction data into the DSO? There may be some master data referenced by the transaction data which may not exist in the source system yet and therefore not loaded into the master data infoobjects yet.
    ==> Yes, but this behaviour is the same as for periodic (non-RDA) transactional data loads.
    4.) The concern I have is when running a process chain to load master data such as 0ACCOUNT, 0COMP_CODE and followed by an Attribute Chain Run at the end of this process chain, will the locks established by this Attribute Chain Run crash the RDA daemon when it tries to load those transaction data that have new master data in them ?
    ==> You do not have to worry about conflicts / concurrent locks with the Attribute Change Run. The only process that could be critical, is the loading via RDA and periodic master data via DTP, which could result in a error in the DTP (you can resolve this very unlikely event by restarting the DTP or by triggering the re-load of  the master data from the source system). In general, we would assume that these 2 events are highly unlikely to conflict.
      Cheers
        SAP NetWeaver BI Organisation

Maybe you are looking for

  • My ipod touch no longer responds to touch.

    Is there any hope for it working again?

  • Creation of Vendor using a BAPI

    I need to create a vendor in SAP system from a non-SAP system. I thought to use a BAPI. But the BAPI available, BAPI_VENDOR_CREATE is not suitable as it is dialog oriented. Could anyone suggest me a better method of achieving this. Raja

  • Wrongly thinks connected to TV

    When I connect my iPhone via USB to my car radio (as an iPod) but really only to load the battery, Safari and Apps wrongly think it is connected to an Apple TV and don't display video.

  • Problems with creating photo albums etc.

    When I opened Organizer in Photoshop Elements, version 10, 64 bit, and shall make suchan album, freezes the program and get an error message that the program needs to close. Itdoes not go and create albums or anything else without the program freezes

  • Blinking message problem on E72??

    Pleas help me, on my E72 there is a blinking message sign in the bottom of the screen I don't know what it is and i can't make it disappear.