To check the date value-Urgent

H iAll,
Please help me in this code.
I have to validate the user entry date with some dates.
User entry date must lie between 4 weeks back and 20 weeks back and it chouls be monday only.
Please check this code and suggest.
Thanks in Advance!
DATA : ZCURDATE typeD,
MONDATE Type D,
CURR_MON TYPE D,
monday type d.
ZCURDATE = sy-datum.
mondate = LOC_VAR_RANGE-LOW.
break-point.
CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
        EXPORTING
          DATE_IN  = ZCURDATE
          IMPORTING
          DATE_OUT = curr_mon.
break-point.
do 16 times. " since 4th to 20th so 20 - 4 = 16 times and count should strt from 28
count = count + 7.
monday = curr_mon - count.
*clear : monday.
IF mondate NE monday.
   CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
    EXPORTING
     I_CLASS                    = 'RSBBS'
     I_TYPE                     = 'I'
      I_NUMBER                  = '000'
      I_MSGV1                   = ' Monday Values between four weeks and 20 weeks back allowed '.
RAISE no_replacement.
ELSE.
continue.
endif.
enddo.
Endloop.

Dear try this.
REPORT  ZTESTU1                                 .
data : l_date type sy-datum.
data : g_date type sy-datum.
data : p_date1 type sy-datum.
parameter : p_date like sy-datum.
CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
EXPORTING
DATE_IN = p_date
IMPORTING
DATE_OUT = p_date1.
if p_date1 ne p_date.
message ID '0' type 'E' number '0' with  'Date could only be' p_date1 'as day is Monday on' p_date1.
endif.
l_date = sy-datum - 28 .
g_date = sy-datum - 112.
if p_date lt l_date and p_date gt g_date.
message ID '0' type 'E' number '0' with 'please Enter Valid Date, Date lies outside'  l_date 'and'  g_date  .
endif.
reward if useful.
regards
Amit Singla

Similar Messages

  • Trans Code to check the Date of Termination in Setup Tables-Very Urgent!!

    Hello BW Gurus,
          I need to check the date of termination I have given while filling up the setup tables to verify when my delta loads would stop running. NPRT transaction code just gives me the time it took to fillup the tables but the date of termination is given as zero's, so please can someone let me know how to see that.
    Thanks in advance,
    Anjali
    Message was edited by: Anjali

    Hi,
    If I understood it right, you wanted to predict when the actual date of termination would occur or you wanted to know what parameter you did input on the job that is now running?
    <b>Case 1:</b>
    As far as I know, that Info cannot exactly be determined since it will depend on various factors e.g. CPU speed, I.O. Speed, Amount of data to be process etc. etc. which I dont think SAP could predict as exact as possible (<i>if ever an option was provided</i>).
    During the early stages of our project, we did that but we base the run time from history. Meaning, we always log (on top of existing <i>SAP Job Logs</i>) the run times in Excel and we somehow use that data to predict the actual Date of Termination.
    <b>Case 2:</b>
    In case you wanted to see the parameter while its running, I have no suggestion but for you to debug the currently running program.
    In <b>SM51</b>, click the Active job and choose menu Program/Mode->Debugging. On the fields on the lower left portion, type <b>RMCSNEUA-DATUM</b> (got this value when you execute the Table Setup, say OLI9BW; Press F1 on the date of termination field) this would give you the actual date you have provided. 
    If I have helped, please grant points...
    --Jkyle

  • How to check the date is initial in the calculated keyfigure

    Hi,
    While calculating the difference between the two dates , i need to check the date is having the values or not in the calucluated key figures .how to achieve this .
    number of days = delviered date -  creation date
    All the dates are key figures
    Regards,
    Raj

    Hi there,
    It depends on what you want to retrieve.
    If you have this:
    day 1 - day 2
    If day 1 is initial, you'll have day 2 as the result of the difference which is correct. If in the other hand day1 is initial you'll have - day 2 as the result. So you just need the ABS() formula to give the absolute value of the difference.
    What exaclty do you want to achieve? only do the formula when both day 1 and day 2 have values? Retrieve always a positive value of the formula no matter if day 1 is initial or day 2 or both?
    Can you give a complete example with values of what's happening and what do you pretend to achieve?
    Diogo.

  • Could not convert the data value due to reasons other than sign mismatch or overflow. ADSI Provider

    I'm trying to run the following query against Active Directory using the ADSI Provider using SSMS 2012 SP1:
    SELECT
    TOP901
    *FROMOpenQuery
      ADSI
    'SELECT description
      FROM  ''LDAP://OU=MMICorporate,DC=mmis,DC=mi,DC=com''
      WHERE objectClass =  ''User''
    and objectcategory = ''Person''
    and ''userAccountControl:1.2.840.113556.1.4.803:''<>2
    )AStblADSI
    Msg 7346, Level 16, State 2, Line 2
    Cannot get the data of the row from the OLE DB provider "ADsDSOObject" for linked server "ADSI". Could not convert the data value due to reasons other than sign mismatch or overflow.
    I only have this issue querying the Description Field. 
    I also found a hotfix KB: 887474 for this but it is for Windows 2003.  SQL Server OS I have is Server 2008 R2.  Is there a fix for 2008 R2?
    Thanks

    Thanks for the quick response.
    I checked out the link and I can only convert to Ul8 and when I try I get the same error:
    SELECT
    TOP901
    *FROMOpenQuery
      ADSI
    'SELECT name, convert(UI8, description)
      FROM  ''LDAP://OU=MMICorporate,DC=mmis,DC=mi,DC=com''
      WHERE objectClass =  ''User''
    and objectcategory = ''Person''
    and ''userAccountControl:1.2.840.113556.1.4.803:''<>2
    )AStblADSI
    Am I missing something?
    Thanks

  • Message AU390 when I check the aset values

    Hi Gurus,
    I get the message AU390 when I check the aset values via the asset explorer.
    To sum up the situation, we have created a fixed asset Capitalized on 31.10.2002.
    Then in asset explorer in depreciation area 10 i have the following values:
    Status-- Per.--Old dep.
    Legacy data transfer-2-----2,77
    Posted--3--
    0,72-
    Posted--4--
    0,68
    Posted--5--
    0,68
    Posted--6--
    0,68
    Posted--11----0,68
    Posted--12--
    260,63 (This value is wrong!!!!!)
    I don't understand and don't find where the problem can comes from!
    Could you please advice a solution if you already had this problem.
    Thank you SO much.

    Hi,
    I think in that period (i.e.12) the Depreciation Key has been change (hopefully with a higher depreciation rate) . So SAP will recalculate and do a catch up Depreciation and post in that period.
    Hope this helps
    Thanks & Regards
    Om

  • How can I show a 0% range in the data value label on a bar chart thanks?

    How can I show a 0% range in the data value label on a bar chart thanks?

    I'm not sure what the question is. 
    I know that if you have a bar chart and one of the categories (X-axis) has bar (Y value) equal to 0%, no bar is plotted for that category. Even the addition of a stroke (line) around the bars doesn't make one appear for 0%.  The only automatic way I know of to make it look like there is data in that category is to add the value labels to the bars. Inspector/Chart/Series, select one of the bars on the chart, click on "value labels". Another method that is a workaround is to fudge the number a little in your table so that instead of 0% it is a very small %.  This will get you a thin line on the chart.
    But if your question is about the value labels (the numbers that display on or in the bars) and you are not getting one for a bar that is supposed to be 0%, it probably means your table doesn't actually have a 0% in the corresponding cell. A blank cell in the table will not get a value label.

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

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

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

  • How to Check the total value of a field

    Hi,
    I want to check the total value of a field (this total is obtain by using property of that field thru personalization).
    that means , in a table 3 columns are there (col 1, col2 & col3). I personalized the total property as true for col3.
    now i'm getting the total for that field.
    I want to check that total whether it crossed 100 or not.
    How to do this?
    Thanks in advance,
    SAN

    Hi San,
    You can achieve by using OATotalRowBean, search for OATotalRowBean in this forum you should be able to get some sample code.
    public class OATotalRowBean
    extends TotalRowBean
    implements OAWebBean, OAWebBeanConstants
    A special row rendered at the bottom of a table which lets users see totals for columns which are designated for summing.
    Note The total is calculated and displayed only for visible rows.
    When you indicate that you want to total one or more columns, the OA Framework creates an OATotalRowBean and designates it as the columnFooter named child of the OATableBean. If the OATableBean is also configured to insert rows (so it has an "Add Another Row" button), then the total bean becomes an indexed child of the add table row bean (see OAAddTableRowBean), which the OA Framework in turn designates as the table's columnFooter object.
    If you need to access the table's column footer object for any reason, call the OATableBean's getColumnFooter() method. If row insertions are enabled, this method returns an OAAddTableRowBean; otherwise it returns an OATableRowBean.
    For detailed information about creating and working with tables, see OA Framework Developer Guide: Tables.
    With regards,
    Kali.
    OSSi.

  • HT4623 I have an IPhone4 and is updated with version 6.1.3 and I am not able to connect with face time calls. I have checked the date ant time. I used to be able to use face time with no problem. since the late os upgrace I have not been able to connect w

    I have an IPhone4 and is updated with version 6.1.3 and I am not able to connect with face time calls. I have checked the date ant time. I used to be able to use face time with no problem. Since the late os upgrace I have not been able to connect with face time.

    Read http://support.apple.com/kb/ts3367

  • How to get the date value

    Hi everyone!
    I want to change the status of button(OK -> Run) after choosen the date .(ex :the textbox default value is 2009/10/14,I choose the date 2009/10/10 from the B1 calendar form)
    But after the status changed from OK -> Run,but the choosen date value doesnt change.
    Anyone can tell me how change the date value. Thanks a lot
    Code :
    If pVal.BeforeAction Then
    Else
                    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                        Select Case pVal.ItemUID
                            Case "201"        ' date item                                                                               
    Button = form.Items.Item("3").Specific
                                    Button.Caption = "Run"
                         End Select
                    End If
    End If

    SELECT *
    FROM your_table
    WHERE date_column = to_date('25-Jan-07', 'dd-Mon-yy')Why oh why oh why are you using dates with two-digits representing the year? In my opinion, this is bad and wrong. Be explicit; use 4 digits. is your "07" representing 1907? 2007? 2107?

  • On migration of Mac Office Excel the date values are changed to mm/dd/yy

    I recently upgraded to new iMac and migrated my MacOffice 2008 and now find that all my date data is forced into the American date format (mm/dd/yy). I have phoned Apple support  - no help! Microsoft no online help. Not only is the entry data changed but I have to use the awkward data entry format of mm/dd/yy very unnatural to a non American.
    I have searched in Excel preferences and confirmed my OS X 10.10 settings (languages and date formats) all using dd/mm/yy as input and display.
    If I enter a date into the spreadsheet say 1/8/14 (meaning 1st August) it comes back with 8th January. Is there a fix or do I have to wear that nonsense?
    Any ideas out there? This problem did not exist in Mavericks.
    thanks, Sigi

    kumar73 wrote:
    v_date := TO_DATE(TO_CHAR(ZKAW__DATE_DT_MM)||'/'||TO_CHAR(ZKAW__DATE_DT_DD)||'/'||TO_CHAR(ZKAW__MAT_DT_CCYY),'MM/DD/YYYY') ;
    to get the date value . provided if all the above fields are having values not zeros .
    My requirement is if any of the above stated fileds are having spaces or zeros then I had to assign spaces or zeros to the variable .So many misconceptions.
    You start with numbers not dates. You convert those numbers to dates when you can and every time you need to use them, which is why it would be better to store dates in the first place.
    You cannot assign either 0 or spaces to a date variable because neither 0 or space is a valid date. You should probably assign it to null.

Maybe you are looking for

  • Aperture 3.4.1 and iPhoto 11 (9.4) in Lion 10.7.5?

    I have created quite a mess here, and am not sure what to do about it.  I was looking for some photos that were in my iPhoto library and I saw a vault with the same name in Aperture, but none of the photos appeared.  The previous versions of Aperture

  • Problem in submit statement ?

    hi friends.. i have one report program (for eg zpgm1) from that i call another program (for eg zpgm2) by using submit statement. in zpgm1  i have only one radio button in zpgn2 i have one parameter with obligatory. the issue is while executing from z

  • Query  String Modification

              Any ideas on how to modify the query string on the fly.           Thanx,           Tajdar           

  • Using special characters in photoshop

    I would like to use the copyright character, which I can access through >edit ,then  >special characters. The problem is how do I use it in photoshop? I have dragged it on the desktop, but photoshop does not read the file it is saved in. The characte

  • Adding jabber buddies

    Adding jabber buddies just does not work all the time. I can even chat with others and they see me on line but I am unable to add them to my list. I tried adding during the chat as well as putting them in my address book and then trying to add with t