To put validatition check on date

hi
there is data being loaded from a flat file i want to input check on date format as yyyymmdd format only please suggest how to put this check
regards
arora

If you want to understand - run the program in debug and watch what happens to the values.  Or add some more write statements like this.
PARAMETERS: p_dat TYPE c LENGTH 8.
DATA: test_date TYPE d,
      input_date TYPE d.
input_date = p_dat.
WRITE:/ 'Value of p_dat', p_dat DD/MM/YYYY.
WRITE:/ 'Value of input_date', input_date DD/MM/YYYY.
test_date = input_date - 1.
WRITE:/ 'Subtracted one from input_date to give', test_date DD/MM/YYYY.
ADD 1 TO test_date.
WRITE:/ 'Added one to test_date to give', test_date DD/MM/YYYY.
IF test_date = input_date.
  WRITE: / 'Test_date same as input_date, so the original date was valid'.
ELSE.
  WRITE: / 'Test_date NOT the same as input_date, so the original date was invalid'.
ENDIF.
If p_dat contains an invalid date, then when you subtract one from input_date it gives you '00000000' - i.e. INITIAL for a type D.
So you could rewrite the code:
PARAMETERS: p_dat TYPE c LENGTH 8.
DATA: input_date TYPE d.
input_date = p_dat.
SUBTRACT 1 FROM input_date.
IF input_date IS NOT INITIAL.
  WRITE: / 'Subtraction from input date is not blank so the original date was valid'.
ELSE.
  WRITE: / 'Subtraction from input date is blank so the original date was invalid'.
ENDIF.
matt

Similar Messages

  • How to put a check with the date

    Hi,
    I have created a ztable with 3 fields .
    clientcode(3),
    date,--date geneated
    version--- fileversion
    i need to update this table everytime i execute the data. Every time version shd get incremented when i execute the program.  When i excute the program next day version shd be updated by '1'.
    i wrote the code for version updated i'm not getting the logic how to put a check with the date.
      SELECT *
       FROM zfi_enetflver
       INTO TABLE gt_flver.
      SORT gt_flver DESCENDING.
      CLEAR: gv_dt, v_file.
      CONCATENATE sy-datum6(2) sy-datum4(2) INTO gv_dt.
      READ TABLE gt_flver WITH KEY client_code = gv_clcd.
      IF sy-subrc = 0.
        idx = sy-tabix.
        IF gt_flver-zdate = ' '.
          gt_flver-zdate = sy-datum.
        ENDIF.
        IF gt_flver-version = ' '.
          gt_flver-version = '001'.
          gv_filever = gt_flver-version.
          MODIFY gt_flver INDEX idx TRANSPORTING zdate version.
          MODIFY zfi_enetflver FROM TABLE gt_flver. "TRANSPORTING version.
          CONCATENATE 'E:\' 'ENET\' gv_clcd gv_dt '.' gt_flver-version INTO v_file.
        ELSE.
          gt_flver-version = gt_flver-version + 1.
          gv_filever = gt_flver-version.
          MODIFY gt_flver INDEX idx TRANSPORTING version.
          MODIFY zfi_enetflver FROM TABLE gt_flver .
          CONCATENATE 'E:\' 'ENET\' gv_clcd gv_dt '.' gt_flver-version INTO v_file.
        ENDIF.
      ENDIF.
    clientcode is the key field in ztable do i need to make date field key ??
    please help me with the logic

    You need to implement below logic:
    1. check if field_date = sy-datum. in this case do nothing.
    2. else . move sy-datum to field_date .
    3. modify your internal table with field_date .
    4. populate final table to database table .
    hope you get it.

  • How can I check the date of purchase for my MacBook Pro?

    I need to fill out a claim in order to get OS X Mountain Lion and I need the date of purchase. I have tried putting in the serial code under check your service and support coverage but it just gave me a vague statement thatit was purchased mid 2012. Could someone please tell me how I can check the date of purchase?

    Well, correction, just checked mine...
    Tells you exipry date of warranty, simply take 1 year off of this or 3 if you have AppleCare.
    There is your purchase date.

  • Check on Date

    Dear
    we are creating credit memo request ( order type ZCR) with reference to the Invoice , we need a check that system will allow to create credit memo request (ZCR) only for those invoices that generate in past . System stops for creating credit memo request of invoices that will generate in coming month June and so on. In my understanding we have a check on invocie creation date while creating credit memo request because credit request is generate with reference to the invoice.. how to do this please guide...

    Dear Yasir
    AS far as my understanding you want to create a check while creating credit memo that when you create credit memo with VA01 by copying reference data from invoice the system should check the invoice's creation date. If this is so then you can control this in copy control routine. Ask your ABAPER to put this check in business data copying routine from billing to credit memo.

  • Check cube data

    I have web query that i want to run. It's asking for certain variables eg : date.
    How can i check cube data to see what valid dates have been posted in the cube?
    so then I can put this in for the variable date ?
    thanks

    Hello MaGic,
    How r u ?
    Manage the Cube and check 0CALDAY (date) and then give the parameters.
    Best Regards....
    Sankar Kumar
    +91 98403 47141

  • TS1368 My account keeps asking for Region but the drop down menu lists Cities in China. I can,'t cange the region in my account because it asks me to check the date and time but these are correct. Any answers please?

    My account keeps asking for Region but the drop down menu lists Cities in China. I can,'t cange the region in my account because it asks me to check the date and time but these are correct. Any answers please?

    Look, I understand I still need a card attached to the account. The problem is, it won't accept my card because I only have 87 cents in my bank account right now.
    If I had known there would be so much trouble with the iTunes card, I would have just put the cash in my bank account in the morning instead of buying an iTunes card (I didn't expect the banks to be open on Thanksgiving of course).
    Apple will only accept cards that have a balance. The balance is so small in my account that it won't accept it as a valid card.
    I'm going to have to contact Apple anyway to reset the security questions. That's obvious. Your answers were not exactly helpful. You didn't tell me anything I don't already know, but thanks for trying to be helpful.

  • TS3297 My 2nd generation ipod touch is giving me the following error when I try accessing Itunes or the app store. "Cannot connect to the Store. A secure connection could not be established. Please check your date & time settings"  I am on a secure networ

    My 2nd generation ipod touch is giving me the following error when I try accessing Itunes or the app store. "Cannot connect to the Store. A secure connection could not be established. Please check your date & time settings"  I am on a secure networkl.

    Can't connect to the iTunes Store
    Make sure that time zone is correct in addition to date and time

  • How to check the date and time when a material is blocked

    Hello,
       Please tell me how can i check the date and time when a material is blocked or unblocked.
    Regards,
    Priyanka

    Hi Pryianka,
    Are you speaking about blocked status of material master ('X-plant matl status' > MM03 > Basioc view 1; 'Plant-sp. matl status' > MM03 > MRP 1) or your problem is to find out the date when your material was booked into blocked state (stock category).
    If your problem is about mmr you can use the above mentioned MM04 (or MM03 > menu > Environment > Display changes).
    If your problem is to find out when your goods were posted to blocked stock you have to use MB51 + relevant movement types (e.g. 103, 344) + batch + etc. ()
    BR
    Csaba

  • SharePoint PPS 2013 Dashboard Designer error "Please check the data source for any unsaved changes and click on Test Data Source button"

    Hi,
    I am getting below error in SharePoint PPS 2013 Dashboard Designer. While create the Analysis Service by using "PROVIDER="MSOLAP";DATA SOURCE="http://testpivot2013:9090/Source%20Documents/TestSSource.xlsx"
    "An error occurred connecting to this data source. Please check the data source for any unsaved changes and click on Test Data Source button to confirm connection to the data source. "
    I have checked all the Sites and done all the steps also. But still getting the error.Its frustrating like anything. Everything is configured correctly but still getting this error.
    Thanks in advance.
    Poomani Sankaran

    Hi Poomani,
    Thanks for posting your issue,
    you must have to Install SQL Server 2012 ADOMD.Net  on your machine and find the browse the below mentioned URL to create SharePoint Dashboard with Analysis service step by step.
    http://www.c-sharpcorner.com/UploadFile/a9d961/create-an-analysis-service-data-source-connection-using-shar/
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • HT4859 How can I verify that my App data is actually stored in iCloud. With Dropbox, I can actually see my stored files. With iCloud, itseems I'm supposed 2 just trust that Appl has the data. Short of doing a restore is there no way to check the data?

    How can I verify that my App data is actually stored in the iCloud. I can see and access my notebook, contacts etc. on the iCloud website, and I can see my photos in a folder on my Windows-based desktop compter (iCloud/Photostream). But no app data.
    With Dropbox, I can actually see all of my stored files. With iCloud, it seems, I'm supposed to just trust that Apple has my back. Short of deliberately trashing my app data and then attempting a restore, is there no way to check the data?

    You can't access them on Windows (unless you have iCloud enabled Windows programs) and I don't think any are, yet.
    iCloud data is accessed via Apps/Programs, the Windows programs vendors will have to step up (just to make it worse Microsoft have not yet enabled their Mac programs, such as Office yet) I doubt that iCloud access is much of a priority for them, complain to MS, when enough Windows users complain maybe they'll do something.

  • My iMessage for my Macbook Air is not working. It says no delivered with a red ! next to it. I have tried serval different options on trying to get it to work to include logging out of iCloud and checking my date and time. I have done about everythin

    My iMessage for my Macbook Air is not working. I have updated everything. My system is running on OS X Yosemite Version 10.10. When I go to send a message, it says no delivered with a next to it. I have tried serval different options on trying to get it to work to include logging out of iCloud and checking my date and time and updating FlashPlayer. I have done about everything I can think of. Any help would be greatly appreciate!

    Why start a new and very similar thread to your other one which you have not responded to (have you read the replies?)
    I suggest that no response is made to this duplicate thread. 

  • Connection failure - Itunes tells me to check my date/time. Help?

    Evening, everyone.
    I'm having some trouble connecting to Itunes. I get the following error message when i try -
    "Itunes could not connect to the music store. A secure network connection could not be established.
    Check that your computer's date and time are correct and try again."
    I duly checked the date/time and found that they were wrong, so updated them and tried again and still received the same message.
    I also tried turning off my Norton and trying to connect with it disabled, with no luck. The other things currently running are DVD43, Sonic Cineplayer and MSN messenger. I can't see why any of them would be interfering, but i'm happy to be corrected.
    I've had no luck finding answers on the Itunes support page. I'm not sure what other information i can give to help elucidate, so feel free to ask.
    Any ideas?
    Hallmark Xblade   Windows XP  

    Has anyone figured this out yet - this is the same message I get. I have the newest version of iTunes and just started using it with music I already had. First time trying to buy music, and that's what I got!!
    Please someone!!!!!!!!
    Dell XPS 400   Windows XP  

  • Code  of ME_process_cust_Po BADI for checking item data?

    Hi all,
    While users are creating new PO in ME21N, I have to check the condition records for the Materials they entered.
    If the condition record is not maintained for the respective material The creation of PO while saving it , should not be  allowed  and a message should be displayed.
    Please mention  the respective method and code to do this?
    Thanks
    Vamshi.

    Hi ,
    this is the sample code for Item check, by using mm_messages_mac(include u can raise error msg based on the INFNR(info record) field.
      DATA: ls_mepoitem TYPE mepoitem,
            ls_customer TYPE mepo_badi_exampl,
            ls_tbsg     TYPE tbsg.
      INCLUDE mm_messages_mac. "useful macros for message handling
    here we check customers data*
      ls_mepoitem = im_item->get_data( ).
      IF ls_mepoitem-loekz EQ 'D'.
    a physical deletion of the item was carried out. therrefor we have to*
    delete customer data on the level of the item*
        ls_customer-ebeln = ls_mepoitem-ebeln.
        ls_customer-ebelp = ls_mepoitem-ebelp.
        CALL FUNCTION 'MEPOBADIEX_SET_DATA'
          EXPORTING
            im_data                    = ls_customer
            im_physical_delete_request = 'X'.
      ELSE.
    update/insert operation*
        CALL FUNCTION 'MEPOBADIEX_GET_DATA'
          EXPORTING
            im_ebeln = ls_mepoitem-ebeln
            im_ebelp = ls_mepoitem-ebelp
          IMPORTING
            ex_data  = ls_customer.
    check customers data*
    check field badi_bsgru. This should be carried out only for new items. Once the PO is posted the*
    field should no longer be changeable. This is done in Method FIELDSELECTION_ITEM.*
        IF im_item->is_persistent( ) EQ mmpur_no.
          IF ls_customer-badi_bsgru IS INITIAL.
    Place the cursor onto field badi_bsgru. The metafield was defined in BAdI ME_GUI_PO_CUST,*
    Method MAP_DYNPRO_FIELDS.*
            mmpur_metafield mmmfd_cust_01.
            mmpur_message_forced 'W' 'ME' '083' text-002 '' '' ''.
          ELSE.
    check whether the field is valid*
            *SELECT SINGLE * FROM tbsg INTO ls_tbsg WHERE bsgru EQ ls_customer-badi_bsgru.*
            IF NOT sy-subrc IS INITIAL.
              mmpur_metafield mmmfd_cust_01.
              mmpur_message_forced 'E' 'ME' '083' text-004 '' '' ''.
    invalidate the object*
              CALL METHOD im_item->invalidate( ).
            ENDIF.
          ENDIF.
        ENDIF.
    check field badi_afnam*
        IF ls_customer-badi_afnam IS INITIAL.
          mmpur_metafield mmmfd_cust_02.
          mmpur_message_forced 'W' 'ME' '083' text-003 '' '' ''.
        ENDIF.
      ENDIF.
    regards
    Prabhu

  • Dynamic Calc processor cannot lock more than [100] ESM blocks during the calculation, please increase CalcLockBlock setting and then retry(a small data cache setting could also cause this problem, please check the data cache size setting).

    Hi,
    Our Environment is Essbase 11.1.2.2 and working on Essbase EAS and Shared Services components.One of our user tried to run the Cal Script of one Application and faced this error.
    Dynamic Calc processor cannot lock more than [100] ESM blocks during the calculation, please increase CalcLockBlock setting and then retry(a small data cache setting could also cause this problem, please check the data cache size setting).
    I have done some Google and found that we need to add something in Essbase.cfg file like below.
    1012704 Dynamic Calc processor cannot lock more than number ESM blocks during the calculation, please increase CalcLockBlock setting and then retry (a small data cache setting could also cause this problem, please check the data cache size setting).
    Possible Problems
    Analytic Services could not lock enough blocks to perform the calculation.
    Possible Solutions
    Increase the number of blocks that Analytic Services can allocate for a calculation:
    Set the maximum number of blocks that Analytic Services can allocate to at least 500. 
    If you do not have an $ARBORPATH/bin/essbase.cfg file on the server computer, create one using a text editor.
    In the essbase.cfg file on the server computer, set CALCLOCKBLOCKHIGH to 500.
    Stop and restart Analytic Server.
    Add the SET LOCKBLOCK HIGH command to the beginning of the calculation script.
    Set the data cache large enough to hold all the blocks specified in the CALCLOCKBLOCKHIGH setting. 
    Determine the block size.
    Set the data catche size.
    Actually in our Server Config file(essbase.cfg) we dont have below data  added.
    CalcLockBlockHigh 2000
    CalcLockBlockDefault 200
    CalcLockBlocklow 50
    So my doubt is if we edit the Essbase.cfg file and add the above settings and restart the services will it work?  and if so why should we change the Server config file if the problem is with one application Cal Script. Please guide me how to proceed.
    Regards,
    Naveen

    Your calculation needs to hold more blocks in memory than your current set up allows.
    From the docs (quoting so I don't have to write it, not to be a smarta***:
    CALCLOCKBLOCK specifies the number of blocks that can be fixed at each level of the SET LOCKBLOCK HIGH | DEFAULT | LOW calculation script command.
    When a block is calculated, Essbase fixes (gets addressability to) the block along with the blocks containing its children. Essbase calculates the block and then releases it along with the blocks containing its children. By default, Essbase allows up to 100 blocks to be fixed concurrently when calculating a block. This is sufficient for most database calculations. However, you may want to set a number higher than 100 if you are consolidating very large numbers of children in a formula calculation. This ensures that Essbase can fix all the required blocks when calculating a data block and that performance will not be impaired.
    Example
    If the essbase.cfg file contains the following settings:
    CALCLOCKBLOCKHIGH 500  CALCLOCKBLOCKDEFAULT 200  CALCLOCKBLOCKLOW 50 
    then you can use the following SET LOCKBLOCK setting commands in a calculation script:
    SET LOCKBLOCK HIGH; 
    means that Essbase can fix up to 500 data blocks when calculating one block.
    Support doc is saying to change your config file so those settings can be made available for any calc script to use.
    On a side note, if this was working previously and now isn't then it is worth investigating if this is simply due to standard growth or a recent change that has made an unexpected significant impact.

  • I formatted my ext hard drive and changed it to mac os x extended(journaled). then i put in all my data back. after a while, i insert the hard drive but my macbook cannot read it. plz help

    i formatted my ext hard drive and changed it to mac os x extended(journaled). then i put in all my data back. after a while, i insert the hard drive but my macbook cannot read it. plz help

    SanandaDutta 
    tried on a different mac. The same problem exists.
    If that is the case, its extremely unlikely you have a bad USB cable on the seagate, rather as I mentioned earlier a bad SATA bridge card.
    If the Seagate 1TB USB external wont open on either Mac and youve verified same (try a diff. USB cable if you have one however this is nearly never the case),....then to get the data off that HD (unless it is dead which is also extremely unlikely),......then you would need to extract the HD from its case and insert same into either a HD dock or USB HD enclosure.
    8 out of 10  seemingly dead inopperable 1-3+ year old external HD are perfectly fine, rather the cheap 50 cent SATA bridge card fries and dies (alas)
    reply back if you need help in extracting same. 

Maybe you are looking for

  • Frustrated with lack of help!

    I up graded my phone to an iphone 5c.  I received it yesterday and call the 800# to activate my phone.  During the phone call I was transferred to customer service because my phone was unable to activated.  I was on hold for 30 mins and the customer

  • Font Issue in Acrobat 9 pro and X pro

    Fonts are not displaying properly after selecting the text with Touc-up tool in Acrobat 9 pro and X pro how to solve this issue?

  • Computer Crashes Using Firefox After Adobe Flash Update

    The Problem: After the latest update, when Firefox fires up the Adobe Flash Player, as in Youtube, etc. as soon as the buffering process begins, the computer freezes for several seconds and then the screen goes black. Then it's total lockamus. The bl

  • What is meant by DB look ups in XI ?

    what is meant by DB look ups in XI ?

  • Output is quiet on Right Chan

    Hi Just got the Zen Micro photo and tried some songs and the right earphone is much quieter than the left. Tried another pair of headphones and same problem. Whats wrong? or is this a manufacture fault? Anyway I can fix it. Thanks