DATE diffrence with negative result

Hi Experts,
When I use
number_of_days = date1 - date2  I always has a positive
result even if date1 is greater than date2.  I need to
include the sign.  any one knows how?. I am storing
the result in a numc field.
Thanks.
Rose

hi,
  then check
<b>copy this program it is working fine.</b>
DATA : date1 TYPE dats,
       date2 type dats,
       days  type i.
date1 = sy-datum.
date2 = date1 - 2.
days = date1 - date2.
write :/ days.
days = date2 - date1.
write :/ days.
<b>result of the program.</b>
        2         
        2-        
<b>or</b>
if date1 > date2
  answers negative
endif.
Message was edited by: Manoj Gupta

Similar Messages

  • I've purchased numerous books through itunes and now I'm unable to open ibooks; I get a "book format error, delete and redownload" which I've done numerous times with negative results.

    I've purchased numerous books through the itunes store in which I was able to read.  Now I'm unable to open some of the ibooks that I've purchased, I get an error message...book formate error, delete and redownload, which I've done numerous times with negative results.  What are my options?

    within the receipt that Apple sent to you via email is a Report a Problem link. use that link to report your issue.
    also you could try a basic reset and see if that resolves your issue. hold down the Lock button & Home button at the same time for ~15 seconds, the iPad should then perform a reset.

  • Decimal data type with negative sign

    Hi Gurus,
    I wanted to created a z table with a filed of type decimal with sign.  What I did is I created a field in predifined type with dec type, but -ve sign is not taking at the time of entering the data in SM30. Its saying only +ve values are allowed. Please let me know how can I achieve this. My data will be like -4.1242.
    Thanks,
    David.

    Hi..
    Try using another field as an indicator for negative fields so that you can consider those signs in your program.
    Regards,
    Karthik

  • Trouble with negative refinement filters and data source on OID 2.3

    Hi
    I'm having trouble using the negative refinement filters on a data source with Information Discovery 2.3
    Here's the data source configuration
    "baseFunctions": [
    "attributeKey": "COMPANY",
    "attributeValue": "PROMO",
    "class": "com.endeca.portal.data.functions.NegativeRefinementFilter"
    "class": "com.endeca.portal.data.functions.RecordFilter",
    "recordFilter": "OR(OID_RECORD_TYPE:RES,OID_RECORD_TYPE:DEF)"
    "datastoreName": "datastorename",
    "name": "ABC",
    "port": "7770",
    "server": "XYZ"
    When I reach a Dashboard page where all the portlets are using this datasource, the record filter is applied as expected. However, for the negative refinement filter, while it does appear in the breadcrumb portlet, it has no effect on the data set. The guided navigation still shows the value as a possible dimension and I can see in my results table that the data was not removed by the negative refinement filter. I tried to restart Tomcat, with no effect.
    If I go in the guided navigation and define negatively this value, on the COMPANY dimension, the data gets filtered out and I get 2 negative refinements to show up in the breadcrumb for the same value (!)
    Is there something I'm missing to configure the negative refinement filter?
    Thank you

    Your configuration looks correct.
    I can think of two possible issues but we're really just shooting in the dark:
    1) "Rogue" whitespace.
    - If your value is not actually "PROMO" but is "PROMO ", then your filter would not exclude anything. It would also explain why you could then add a negative refinement for the "true value". To validate this, use a browser with some debugging capabilities (i.e. Chrome), have your negative refinement applied by default and then "manually apply" it in Studio.
    Then, open up your browser's debug view (in Chrome, right-click on the value you just added and click "Inspect Element".). Hopefully, the HTML will show slightly differently and you can see the whitespace in the manually added refinement.
    2) Would this happen to be a managed attribute? I believe managed attribute values can have display names and real names and the real name should be used for filtering purposes. I doubt this is the problem but it's the only other thing I could think of...
    Regards,
    Patrick Rafferty
    Branchbird

  • Is it possible to recover my data from iCloud backup without working wifi? I have as many other upgraded my iPhone 4S to iOS 7.0.2 with the result that the Wi-Fi or Bluetooth no longer works. However, i can connect to iTunes via cable but there is wrong v

    Is it possible to recover my data from iCloud backup without working wifi? I have as many other upgraded my iPhone 4S to iOS 7.0.2 with the result that the Wi-Fi or Bluetooth no longer works. However, i can connect to iTunes via cable but there is wrong version of backup.

    Answer is no.
    If you want the iCloud backup you have to have n internet connection, thus WiFi.
    The not working WiFi has happened with quite a number of users.
    It is not exactly clear what is the cause but there are suggestions to clear it up:
    Some people have had success by removing an apostrophe from the iPhone name. If your iPhone is called something like “John’s iPhone” then this might work. Go to Settings > General > About > Name and change it to something with no apostrophe.
    Some people have reported success by putting the iPhone into Airplane mode and then going to Settings > General > Reset > Reset Network Settings, but the problem may return.
    You could also try going to Settings > Control Center and disable Access on Lock Screen then turn your iPhone off and on again.
    Make sure that your router firmware is up to date.
    Try backing up your iPhone and then restoring it. Check how to factory reset an iPhone for details.
    If nothing is working for you, try contacting Apple or take your iPhone into an Apple Store.
    Succes, Lex

  • Issue with Negative Value for Total valuated stock 0VALSTCKQTY.

    Hi Experts,
    we loaded the Cube with datasources 2LIS_03_BX, 2LIS_03_BF and 2LIS_03_UM.
    We mapped the quanity field from 2LIS_03_BF in transformation either into Key figures "Quantity issued from valuated stock" (0ISSVALSTCK) or "Quantity received into valuated stock" (0RECVALSTCK ) of the cube.
    For obtaining the Total Valuated stock, we used the Key figure 0VALSTCKQTY. This key figure is having the Inflow and Out flow values as 0RECVALSTCK and 0ISSVALSTCK. When i tried to check the content of 0VALSTCKQTY, the key figure  0VALSTCKQTY is not present in the infoCube content. I understood that the value for this key figure would be calculated at the time of query execution with the formula
    { Last obtained Valuated stock + (Received Valuated Stock u2013 Issued Valuated Stock ) }.
    The issue is the first records in the query is obtained with negative value for the total valuated stock 0VALSTCKQTY even though the values of Received Valuated Stock  and  Issued Valuated Stock are with Zero.  Could any one please help me on how the first record in the query is with a negative value eventhough the inflow and out flow fields of it are with Zero.
    Many Thanks in advance.
    Jeswanth

    Hi Srini,
    I observed an interresting reason for the stock being with negative in the first record.
    Issue : While executing the BEx report, we have the first record with a negative value.
    Let me explain with an example
    Material  : XYZ
    Plant      : A
    Date of Stock Initialization for data source 2LIS_03_BX -
    >  12th April 2009.
    So on 12 Th April 2009 consider that we have a stock in store with a value of 2640.
    Then we have loaded wih Data source 2LIS_03_BF for all Historic Movement types.
    At the time of query execution we will have the first record with a negative of available stock present on the day of initialization .
    So, as we have initilized the data source 2LIS_03_BX on 12 th April 2009, we have at that time a stock of 2640 in availability.
    Exactly with the same value of 2640, we are having a negative value i.e. -2640.
    and also one more point to be noted is ...as we have initialized the data source 2LIS_03_BX on 12 th APril 2009...it has created a
    opening balance of 2640 on the day of initiailization i.e on 12 th April 2009 in infocube....(which is an extra record...)...so if the previous record of 12,04,2009 is having some value in it..then it will get added to 2640 EA..which will give incorrect stock
    So in the query the records will appear in the below following manner
    Calendar Day     Total stock                                                                Received stock                                          Issued Stock         
    28.12.2005 --->  - 2640 EA
    29.12.2005 --->    2000 EA                                                                       640 EA                                                        0
    10.04.2009 --->      0                                                                                0                                                               2000 EA      
    11.04.2009 -
    >    0                                                                                0                                                                0          
                                 (For making
                                  the earlier record of  initilization to 0  a negative value -2640 EA is created in the first record )
    12.04.2009 (Initializtion day) --->  2640 EA                                                 0                                                                0
    13.04.2009 
    the day before initialization the total stock will be 0 due to the negative effect introduced by the first record and from the day of initialization the records will be the accurate values...  On 12 th april 2009 we can see that a stock of 2640 is brought into the total stock. In fact if there is no negative value i.e. -2640 in the first record then ...the value on 11.04.2009 will be 2640 Ea and this will get summed up with the Opening balance of 2640 EA created by 2LIS_03_BX on the day of intitialization. So on 12 .04. 2009 the total stock will be shown as 5280 EA...so in order to prevent the double value only we observed that the first record is created with the negative of available stock present on the initialization ...to make the record before the day of initialization i.e. 11.04.2009...to be 0...so that from 12 th April 2009 ..will start to see the actual total stock in the query result...
    This is happening only if we use  both the data sources 2LIS_03_BX and 2LIS_03_BF  for loading into BW.....
    If we load alone by 2LIS_03_BF ...then as 2LIS_03_BX is ruled out in the loading...then no negative of available stock will be created ...because there will be bno opening balance created on the day of initialization.....and the opeing balance available will be flowing into consecutive records due to the movement types and 12 th April 2009 will be shown with avaialable total stock of 2640 EA.
    Kindly let us know your opinions on this...
    Thanks.
    regards,
    Jeswanth

  • Is there a way to name the .indd files created by a data merge with values in the CSV file

    I have a data merge document that is set to single Record per Document page and 1 page per document.  In my CSV file I have a field for Part Number.  If I run a data merge with 10 records I end up with 10 .indd files.  I need a way so that the resulting .indd files are named the same value that is in the Part Number field.

    Loic has provided a link for my original piece, and I've written up some follow-up pieces for indesignsecrets.com:
    http://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php
    http://indesignsecrets.com/data-merging-individual-records-separate-pdfs-part-2-scripting. php
    So there are several ways to get unique name PDFs from an indesign Data Merge. However, none of these 3 articles will truly answer your question of how to get unique indesign filenames using the database. I can see a practical purpose for this as merging business cards directly to PDFs is great, but I can be guaranteed that while on proof, there will be alts to the business cards that need to be done outside the merge, meaning specific records need to be exported to indesign files for further manipulation.

  • To date calculations with roling calendar

    Hello,I am relatively new to Essbase and we are in the middle of building an inventory analysis database. We have 5 dimensions:Accounts,Time,Version,Customer,ProductThe time dimension spans from Year-Season-Quarter-Month-Week. Includes annual totals for 4 years. I have a rolling calendar and I do not use a scenario member to designate the year. I also have an alternate roll-up representing a fiscal year.My time dim looks somthing like this:TIME..Y2001...Fall....Quarter1.....Jan01......WK 2003-10-13..Y2002...etc, etcI am trying to come up with a YTD, STD, and MTD number for base sales_unit data. I should be able to get that number no matter what period selected in a report. For example if I am looking at Week 10-13-2003, I need to see what my MTD, QTD, and YTD numbers are for that date-member, same goes for upper level members in time. I can't use DTS because it only (seems to) work for the generation it's assigned too. Furthermore with DTS, I need the date results for my average inventory calc too.So the only way I could get this to works was with a VERY long series of if statements for each time member.Here are a few examples: For Month: IF (@ISMBR(Month01-2001)) @SUMRANGE(Sales,WK2001-02-10:WK2001-03-03); ENDIFFor Quarter: IF (@ISMBR(Quarter1-2001)) @SUMRANGE(Sales,WK2001-02-10:WK2001-05-05); ENDIFFor Season: IF (@ISMBR(Fall-2001)) @SUMRANGE(Sales,WK2001-02-10:WK2001-08-04); ENDIFThis works but data retrieval times are too slow (16 minutes) for dynamic calcs and the calc script runs for more than 6 hours.It's obvious to me that this will give me the correct results but it will not work because of performance. Any suggestion on how to deal with a to date number with reasonable calc times using a rolling calendar would be graetly appreciated!Russell Krauss, VF Inc

    I've run into similar problems and one thing I have given into is that there is no one solution. What I have been using is multiple alternate roll-ups using shared members. My Time dimension will have three or four sub-roll-ups (i.e. "By Month", "By Week", etc.) I do this by sharing the base level members (daily data). I'm not sure if it would be possible to do what you are looking to do in one roll-up because weeks will inevitably over lap months. I will check back however to see if anyone else has suggestions. One more thing to consider, if your time dimension is sparse (which is probably not a good idea in this case) but if it is, you could use attribute dimension to group some of your dates, particularly the seasons. Good luck!

  • Not able to save date column with custom date format. in OBIEE 11g

    Hi,
    I have migrated one report from OBIEE 10g to 11g. There is a date column with customized date format(i.e. Default format is 'dd-MMM-yyyy' and I have used 'MMM-yyyy').
    But when I use this custom format and try to save the report in 11g its giving this below error.
    ''Catalog object privilege validation failed for user to path /shared/ALM BI/Finacial Results/History Income Statement Detail.
    You do not currently have sufficient privileges to save a report or dashboard page that contains HTML markup.
    This HTML might be present in column headings, table headings, text views, narrative views, the print header,
    or the print footer and must be removed before saving.''
    Please let me know what changes I need to do for this.
    Regards,
    Ambika Nanda.

    Hi ,
    privilage issues...check the security settings once..
    Thanks,
    Ananth

  • Remote Desktop cannot verify the identity of the computer because there is a time or date diffrence between your computer and remote computer

    Hello.....
    I'm not able to log into Windows Server 2008 r2 server thorugh Remote Desktop connection, receiving below error message.
    This issue is with only three servers in the environment
    "Remote Desktop cannot verify the identity of the computer because there is a time or date diffrence between your computer and remote computer......"
    The date/time is correct on the server when i checked in the console session of the server
    Can see below messages in event logs
    Event ID 1014:
    "Name resolution for the name XYZdomain.com timed out after none of the configured DNS servers responded."
    Event ID 1053:
    The processing of Group Policy failed. Windows could not resolve the user name. This could be caused by one of more of the following:
    a) Name Resolution failure on the current domain controller.
    b) Active Directory Replication Latency (an account created on another domain controller has not replicated to the current domain controller).
    Any thoughts ....

    Hi,
    Have you tried to connect these three servers with IP address instead of computer name or DNS name?
    Check Remote Desktop Connection settings: Option-->Advanced-->Connect from anywhere-->Settings-->Connection Settings-->Select “Do not user an RD Gateway server”
    For more information please refer to following MS articles:
    Remote Desktop cannot verify the identity of the remote computer because there is a time or date difference between your computer and the remote computer
    http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/c1f64836-5606-49b0-82eb-56be7f696520
    Cannot connect via Remote Desktop
    http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/5087e897-8313-468c-ad37-ef18b87d4dd6
    Lawrence
    TechNet Community Support

  • Images with negative pixels value

    Consider a simple black (0) and white (255) image composed by 3 vertical bands : the first is white, the second is black and the third is white. Image size is W columns by H lines. Band width is W1, W2, W3 for bands 1, 2 and 3 respectively (W1+W2+W3=W).
    Consider now a first order edge detecting operation, for example Sobel for vertical edges :
    1 0 -1
    2 0 -2
    1 0 -1
    The corresponding edge image is composed of H identical lines (because the image is only varing horizontally). Each line is 0 everywhere, except on transitions : on column W1, there is a positive value of 4*255 and on collumn W1+W2 there is a negative value of -4*255.
    Using the following java source code, we obtain an image which have only the positive (>=0) part of each line :
      Image img = (new ImageIcon("bands.png")).getImage();
      BufferedImage bimg = toBufferedImage(img); // not part of JDK1.4
      ConvolveOp sobel = new ConvolveOp(new Kernel(3,3,new float[]{ 1, 0,-1,2,0,-2,1,0,-1})); // vertical Sobel filter
      BufferedImage bimg_cont = sobel.filter(bimg, null);To have an edge image that contains the negative part of edges, we do need a specific image format with specific ColorModel and SampleModel. Ideally, we will need a grayscale image (1 sample/pixel) where all elements can represent values from -4*255 to 4*255. So we need a signed type like DataBuffer.TYPE_SHORT, DataBuffer.TYPE_FLOAT or DataBuffer.TYPE_DOUBLE.
    Note : it is possible to apply the filter twice, with a mirrored filter, but time to compute will be also twice the normal computational time (very inefficient).
    Now, this is the question : do anyone have a solution to compute a sobel filter (or any other filter type which produces negative values) with a resulting image containing positive and negative values ?

    The problem is the size of the number you have to work with. You can store values ranging from 0 to 255 (the max index for a byte-sized variable) so the total numbers you can store is 256. However, if you want to go from -255 to 255, thats about 512 values, which is twice the size of your max. You would need one more bit on that variable to do that. You could make the far left variable be the positive or negative sign (know as a signed variable) which is how computers do it anyway. The only drawback is it will only range from -127 to 127, which is half as much detail.

  • In iWork 09, Numbers, how do I replace a formula with calculated results for a whole column?

    I have a rather large Numbers spreadsheet.  I have used a formula to create a new column of information.  I now want to replace the formula with the actual results calculated by that formula for each cell in that column, so that I can delete some of the other columns.  How do I do that?

    Copy the cells with the results, then select the destination cell, and use the menu item "Edit > Paste Values".
    You may want to paste to a different location in case you need the source data or formulas in the future.
    Regards,
    Wayne

  • Data Set with multiple ref cursors

    Hi ,
    I need to design an integrated report , i created my data set with a oracle procedure which returns "multiple ref cursors" . In this case birt is displaying all output columns together and it is difficult to identify which column belongs to which ref cursor and if there are any columns with same name in both output cursors , it displays only one. Is there any way to handle this ? or how we handle a data set which contains multiple ref cursors in output ??

    Having to ref cursors return mutiple recordsets in an Oracle package is like haveng two resultsets return from a MS SQL Server sparc.
    The link may point you in the right direction.
    http://www.codeproject.com/Articles/675933/Returning-Multiple-Result-Sets-from-an-Entity-Fram

  • Windows Desktop Search 4.0 How do I Format the Date Column in the Results?

    Is there a way to modify the date column in the Results pane of Windows Desktop Search 4.0?
    It's running on a Windows 2003 Enterprise server.
    I have users that need to modify files that arrived today and yesterday after 5:00 PM.  The date column only displays the time on files with today's date.  Is there some registry setting I can tweak to get this column to always show Date and Time?
    Cordially,
    RN

    Hi,
    For the Windows Desktop Search, i think you may ask in:
    http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=windowsdesktopsearchhelp
    Regards.
    Vivian Wang

  • Filling a tree with the result of calls to a document/wrapped soap1.1 webservice

    Hi,
    I'm having trouble with filling a tree with the result to
    calls to a document/wrapped soap 1.1 webservice.
    I first declared the webservice in the mxml file as it was in
    the examples and tried to call it with no luck. The fault was it
    wasn't finding the document type for the call's unique parameter. I
    figured out the solution to this, I added a method in the
    webservice declaration having a single element named the same as
    the required parameter, and inside it, the "actual" parameters,
    bound to variables defined elsewhere.
    The reason for wanting the tree to be filled programatically,
    is the potential whole contents of the tree can be about 1.000.000
    nodes. Huge.
    quote:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" applicationComplete="initM()">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.controls.treeClasses.TreeListData;
    [Bindable] public var aParentId:String = null;
    [Bindable] public var aLevel:Number = 0;
    ]]>
    </mx:Script>
    <mx:WebService id="lws" wsdl="
    http://myServer/myContext/myPortURI?WSDL"
    useProxy="false" makeObjectsBindable="true">
    <mx:operation name="getNodes" resultFormat="object">
    <mx:request>
    <getNodesElement>
    <parentId>{aParentId}</parentId>
    <level>{aLevel}</level>
    </getNodesElement>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:Tree x="0" y="0" width="326" height="100%"
    id="layoutTree" enabled="true" labelField="nodeName">
    <mx:dataProvider>{lws.getNodes.lastResult}</mx:dataProvider>
    </mx:Tree>
    <mx:Script>
    <![CDATA[
    public function initM():void {
    lws.getNodes.send();
    return;
    ]]>
    </mx:Script>
    </mx:Application>
    So, here's the problem:
    1.- In both Java2 and .NET, I've been able to produce sets of
    proxy classes from the webservice wsdl, these include a proxy class
    for the service port and a set of classes for both the call
    parameter types and the call result types. I have not found yet a
    way to do the same with flex2, so I wonder, can I produce the
    required classes for dealing with such a webservice in an automatic
    way with flex2?
    2.- The second problem, is I haven't found a way to make a
    webservice call in sychronous mode, and I can't seem to find a way
    to set the parameters for the subsequent calls to the webservice.
    Is there a way to make a call to such webservice programatically? I
    mean, I've been able to make the first call I need programatically,
    but what if I end up making 2 or more simultaneous calls? I can't
    rely on setting the `variables defined elsewhere` before each call,
    because of possible concurrency issues (calls will be long after
    the 2nd level of the tree), so I wonder if there's a way to make a
    call to such webservice (document/wrapped, soap1.1) passing it the
    parameters programatically. If so, can I just put the parameters or
    do I have to produce the complete enclosure? If I have to produce
    also the enclosure, any hint on how to do so? I will need to pass
    different parentId, level pairs probably triggered by tree events.
    3.- the other problem, finally, is Tree looks quite different
    to me than the Java2 one. In java2, I can easily produce a changing
    model for the tree wich will even handle the calls to the
    webservice as needed (triggered by the tree itself), making it a
    `live model`. If there is a way to produce the same behaviour in
    flex2, I haven't found it yet. Sure, I've only downloaded the trial
    version yesterday, so I may have overlooked some docs or blogs.
    Any hints would be appreciated, specially on programatically
    modifying the tree, and making calls to the webservice changing the
    parameters every time.

    I would re-post to the Flex Data Services forum.

Maybe you are looking for

  • MacBook no longer detects my video card?

    I have (had?) a Intel GMAx3100 on my MacBook, but after starting up today and having the standard background and noticing slight coloration differences, I checked the Graphics/Display tab in the system profiler, and it now says "Type: Display" instea

  • Can I install Windows XP with another CD than the recovery CD?

    A friend of a friend ;) has a Satellite 5200. He cached a very bad virus on his Notebook, witch I couldn't remove after 2 hours of work, so I'd like to install Windows in order to "clean" the system. The problem is: he is just for visit here, and his

  • Service entry sheet reversal document (Status: Error in process) List repor

    Hi, I have a requirement, to have or develop report which gives service entry sheet reversal documents (Status: Error in process), while investigation i found below options (not exactly meeting my requirement) 1) Display and Process Confirmations Cen

  • Run Time Engine Web Service

    Hello Gents, Anybody knows why I can't access to VI (*.exe) on remote PC. On remote PC has been installed only standard 8.6 Run Time Engine. Do I need to install additional parts like NI LabVIEW Run-Time Engine Web Server or/and LV Web Server? And is

  • Most packages not compiling properly

    Hello Arch users! For some time now, I have been experiencing a weird issue. When trying to compile packages (mostly AUR packages),  I receive contradictory messages from the make command. Let me show you: checking if gcc accepts -dumpversion option.