To compare date with another date in string in siebel bip report

Hi,
In my rtf I am comparing a Date1 with a date in string i.e. '10-NOV-14'. If Date1 is less than '10-NOV-14' I am dispalying a certain text and if not another text.
This condition is working fine if Date1 have 2014 values but if  Date1 cointains 2015 date than the mentioned condition is falling.
Kindly suggest any solutions.
Regards,
Siddhika

This example may help:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="currentDate"/>
    <xsl:variable name="firstDate" select="concat(substring($currentDate, 1,4),substring($currentDate, 6,2),substring($currentDate, 9,2))"/>
    <xsl:template match="/">
        <xsl:apply-templates select="//item"/>
    </xsl:template>
    <xsl:template match="item">
        <xsl:variable name="secondDate" select="concat(substring(submissionDeadline, 1,4),substring(submissionDeadline, 6,2),substring(submissionDeadline, 9,2))"/>
        <xsl:choose>
        <xsl:when test="$firstDate &gt; $secondDate">
            <xsl:call-template name="late"/>
            </xsl:when>
            <xsl:when test="$firstDate &lt; $secondDate">
                <xsl:call-template name="ontime"/>
            </xsl:when>
            <xsl:when test="$firstDate = $secondDate">
                <xsl:call-template name="same"/>
            </xsl:when>
            <xsl:otherwise>Monkeys<br /></xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="ontime">
        This is on time
    </xsl:template>
    <xsl:template name="late">
        This is late
    </xsl:template>
    <xsl:template name="same">
        This is on time
    </xsl:template>
</xsl:stylesheet>

Similar Messages

  • Comparing a MaxDate with another Date field

    Hi there,
    I am trying to create a report that has  components on it, ReportDate, MaxReportDate, and JobID. I want to compare a max date with another date in my Web Intelligence report. For example, I have a field called Report Date. I have applied the Max() function to find the most recent date in the list of Report Dates. Therefore, I used this:
    Max([ReportDate]) --> MaxReportDate
    Then I want to compare the original Report Date field with the MaxReportDate and return the JobID if the ReportDate = MaxReportDate. Therefore, I used this for the JobID2 formula:
    = [JobID] where (ReportDate = MaxReportDate)
    This is not working. Am I doing somehting wrong? By the way, I am using SAP Business Objects BI Platform 4.0 Client Tools (version 14.0.2.364).
    Please help! Thanks!
    -Janice

    I did create a variable called MaxReportDate with the formula Max(ReportDate). When I test this variable, it works perfectly fine. However, when I use it to compare against ReportDate, there's where it gets tricky. 
    So it looks like the If ReportDate=MaxReportDate then JobID works. However, if I try to replace JobID with any other Measure variable, it does not return accurately. For example, say I have the following data:
    ReportDate Price
    11/30/2011  10
    13/30/2011  15
    I put it the following formula to get the price for the max report date:
    If [Report Date] = [MaxReportDate] then [Price]
    It should give me 15. Instead, it sums the numbers and I get 25.  Why is that?

  • Compare Hiredate with Current date in PCR

    As per the requirement I have, a certain type of accrual needs to occur on the employee's anniversary date, this accrual should only happen on the first anniversary. How can I compare hire date with current date ignoring the year, and then ignoring the same logic from second year on-wards.
    Can someone please help me with the possible method of implementing this requirement in a time PCR.

    In my humble opinion, I think that you should achieve that by means of an ABAP program, it should be scheduled to run every day and compare the hiring date with the current date of every employee, then create a batch input to Infotype 2013... it would be easier to track and monitor, since you would have all logs in SM35
    Best regards,
    Federico.

  • How to compare current date with past date

    Sample code for comparing current date with past date
    i dont want to Calender.set method to compare it.
    How can i do it?

    PLEASE stay with ONE thread:
    http://forum.java.sun.com/thread.jspa?threadID=5143991&tstart=0

  • Simple question: validate infocube data by comparing it with PSA data

    Hi all,
    I want to validate infocube data by comparing it with PSA data, for that i went through PSA via context menu. After that i generated export datasource. Then i am not able to find PSA Export datasource? where can i find that..
    Thanks
    raju

    Hi all,
    I´ve tryied to VALIDATE INFOCUBE DATA BY COMPARING IT WITH PSA DATA making the step by step contained in the HOW TO ...
    The problem is that I have the following error when i activate the transfer rules after aggregating the infoobjet 0TCTREQUID and don´t know how to resolve it:
    " IDoc segment /BIC/CICA7ZBW_RECEP_DI could not be assigned to IDoc ZSCA002
    Message no. RSAR240
    Diagnosis
    The transfer structure is assigned to IDoc ZSCA002 as an IDoc segment for the data transfer between source system and Business Information Warehouse.
    This assignment failed.
    System response
    IDoc segment /BIC/CICA7ZBW_RECEP_DI not known to IDoc V2&. Therefore, no data import can take place from the source system for this InfoSource."
    Any idea of what could have happend?
    Thanks in advance,
    Diego

  • Generic Extractor: enriching GL Data with Purchasing Data

    Experts,
    This is my first time with Generic Extractor.
    Requirement:
    We have a requirement to enrich GL data with Purchasing data via the Material Document Number.
    I need to provide this upto to the datawarehouse layer wherein another team will take over.
    Solution idea:
    Material Document is not part of the datasource 2LIS_02_SCL.
    a. Should I enhance this datasource to include material number  OR
    b. Develop a concept to create a generic delat enabled extractor that pulls data from EKBE, GR and IR information.
    In EKBE multiple material documents can exist per PO. The extractor returns 2 record per PO (before and after image) with the updated information.So if we have the first GR with Material document 901 and then a second GR with material doc 902 the extractor loads 3 records. New record, Before image and after image and the only one stored in BI is the after image. material doc would have value 902 if enhanced.
    For the generic extractor approach the  the ability to load deltas is crucial, since the EKBE table is very big. Maybe
    "CPUDT-Day On Which Accounting Document Was Entered" and "CPUTM-Time of Entry" can be leveraged as delta hook.
    Any ideas???
    Thanks,
    Jain

    No one answered

  • Why does my phone use data with cellular data turned off?

    I have problems with my iPhone 5 using data on its own. It usually happens at night, with all the apps closed and plugged in to charge (should be connected to my wifi). Recently, I started turning off my cellular data any time I'm at home out of desperation to save my data. Last night, my phone used 6MB of data with my data off, plugged in. I use My Data Manager to track, it matches up with AT&T's record of my data usage, so I'm pretty sure the app is not wrong. I have the 200MB plan, so I have to be very careful and it's incredibly frustrating to wake up and find 6MB gone when cellular data was turned off. Does anyone know what's going on?  I haven't bothered calling Apple or AT&T, I never get anywhere with either one.

    I'm not familiar with My Data Manager but from the name I would think it would tell you what app or apps have used the data and that might help narrow down the problem. If it doesn't have that information, you can go to Settings > Cellular > Use Cellular Data For and that shows usage by each app and if you click on System Services in that list it will also give details of that usage. The numbers are since you last reset the statistics (bottom of that screen). With a little time and detective work you may be able to identify the cause.
    Also, there have been many discussions on various internet forums of AT&T (and other) reporting of the time of data usage not matching the actual time of the use. The usage numbers over a number of days for example are accurate but usage reported at 2AM may actually be a summary of some types of use that happened the previous day.

  • Billing user exit to overwrite the service rendered date with billing date

    Hello,
    My client would like to determin the rebate conditions based on billing date. However, the system only uses the service rendered date for rebate determination.
    Therefore, I am trying to overwrite the service rendered date with billing date at the time of billing creation.
    Could you please let me know what user exit I can use?
    I can't user the user exit RV60AFZC because the billing date is not determined when this user exit is running.
    Your help would be appreicated! I will give you good points! Thanks

    Hi Londa,
    Try using one of the following includes for your requirement.
    (a.) rv60afzz
    (b.) rv60afza
    (c.) rv60afzb
    (d.) rv60afzd
    (e.) BAdi SD_CIN_LV60AU02
    or if you are working with ECC 6.0 use the Enancement Spot ES_SAPLV60A available from SE80 by giving package VF and then selecting Enhancements and then expanding Enhancement Spots
    Hope these are helpful to you. Reward accordingly.
    Thanks and Regards,
    Maddineni Bharath.

  • Hello, I recently bought a new Laptop and wanted to sync all my data from the old one. Accidentaly I merged my Sync Data with Device data, how can i recover it?

    hello, i recently merged my Sync data with New device Data , because the option MERGE THIS DEVIC's DATA WITH SYNC DATA was checked, how can i recover my stuff back ? from a previous state

    Sorry, SYNC don't have that option right now

  • Unrelated data in master detail sections of a custom BIP  report deployed in R12 EBS

    We have a custom Master Detail BIP report generated by calling XDO APIs from a custom Java concurrent program (common_report_attachment) . This Java concurrent program is called from another custom concurrent program (po_validation) that processes a batch of POs in a single concurrent request.
    PO_Validation Program (processes a batch of POs per request) -> Java Concurrent Program -> BI Publisher Report APIs
    BIP report generates data for master detail sections based on two sql queries (given below) that have 'where' clause based on a common external parameter "P_TRX_HDR_ID".
    NOTE: No explicit data link is used NOR an output column of parent query is used in the where clause of detail query as bind parameter.
    - <dataTemplate name="NAPPB2BPORPT" description="Data Template for B2B PO Report" version="1.0">
    - <properties>
      <property name="xml_tag_case" value="upper" />
      <property name="db_fetch_size" value="200" />
      <property name="scalable_mode" value="on" />
      </properties>
    - <parameters>
      <parameter name="P_TRX_HDR_ID" dataType="number" />
      </parameters>
    - <dataQuery>
    - <sqlStatement name="Q_PO_HDR">
    - <![CDATA[
    SELECT poh.po_number                                     PO_NUMBER
              , poh.quote_number                             QUOTE_NUMBER
              ---- other columns -----
             FROM nappcust.napp_o2i_po_headers poh
                ,napp_aso_quote_headers_v naqv
               WHERE 1=1
               AND naqv.quote_number=poh.quote_number
               AND poh.header_id = :P_TRX_HDR_ID
      ]]>
      </sqlStatement>
    - <sqlStatement name="Q_LINES">
    - <![CDATA[
    SELECT  pol.item                                            ITEM
          , pol.partner_part_number                             PARTNER_PART_NUMBER
          -- other columns --
       FROM napp_o2i_po_lines pol
       , napp_o2i_po_headers poh
       , aso_quote_lines_all aqla
       , mtl_system_items_b msib
    WHERE 1=1
      AND poh.header_id               = pol.header_id
      AND pol.header_id               = :P_TRX_HDR_ID
      AND aqla.quote_header_id        = poh.QUOTE_HEADER_ID
      AND msib.inventory_item_id      = aqla.inventory_item_id
      AND msib.organization_id        = aqla.organization_id
      AND (pol.quote_line_number       = aqla.quote_line_id
           OR pol.quote_line_number    = aqla.quote_line_id||1)
      ]]>
      -- Added for the defect 13954
      </sqlStatement>
      </dataQuery>
    - <dataStructure>
    - <group name="G_PO_HDR" source="Q_PO_HDR">
      <element name="PO_NUMBER" value="PO_NUMBER" />
      <element name="QUOTE_NUMBER" value="QUOTE_NUMBER" />
      --- mappings for other columns of "Q_PO_HDR"
      - <group name="G_LINES" source="Q_LINES">
      <element name="ITEM" value="ITEM" />
      <element name="PARTNER_PART_NUMBER" value="PARTNER_PART_NUMBER" />
        --- mappings for other columns of "Q_LINES"
      </group>
      </group>
      </dataStructure>
      </dataTemplate>
    Issue: Sometimes when the parent concurrent request runs for a batch with multiple POs the report generated for the last PO has inconsistent data in the master and detail sections. To elaborate, the detail section is having correct data pertaining to the PO identified by the parameter "P_TRX_HDR_ID". However, the master section is having data pertaining to the previous PO processed from the same batch.
    This issue is not occurring consistently and is not reproducible at will. I
    'm suspecting this could be because of not having data link between the queries but confirm from someone who has experienced this issue.
    Regards,
    Srinath

    is there any way from the page, can we pass the some values, which can identify the page level data?
    if so pass the parameter to BIP report query.

  • How to convert a string to date and then compare it with todays date???

    Hello.
    I want to set a format first for my dates
    DateFormate df = new SimpleDateFormate("yyyy-mm-dd");
    once this is done then I want to convert any string to date object in the above formate
    String str="2001-07-19";
    Date d = null;
    try{
    d = df.parse(s);
    }catch(ParseException pe) {
    pe.printStackTrace();
    First of all there is something wrong above,cus what I get for this is
    Fri Jan 19 00:07:00 MST 2001
    where as it should have been
    2001-07-19... to my understanding.
    once this part is done I need to get current date in the above set format and compare the
    current date and the date I set.
    I will appreciate the help.
    Thanks

    for the output part:
    a date is a point in time
    the output depends on the format you specify for output
    using for example a SimpleDateFormat.
    You only specified the format for parsing (which is independent for that of output) so java uses some default format ... see the DateFormat.format() method for details.
    for the comparison stuff, I just posted a little code snippet in this forum a few minutes ago.
    the hint is: Date.getTime() returns milliseconds after a fixed date
    hth Spieler

  • How to compare user entered date with current date

    Hi all
    my requirement is, user allowed select one date, in code i have compare this date with current day date. it should be 15days gap other wise display error message.
    I am worried about how to get current date in code. Is there any code to get current date. please reply me with code or mail me at [email protected]
    Thanx
    keerthi

    Keerthi,
    Use the method <b>getDifference()</b> of the DateHelper.java available here.<a href="http://www.koders.com/java/fid14A61FEB1B45A64E42E1DCAD7070B46AE46340BA.aspx">DateHelper</a>
    1. Create a new folder, say Util under your src folder. (com.xyz.util)
    2. Put this DateHelper.java file in that folder,(com.xyz.util) .
    3. Now, write an import statement for this java class in the required view.
    4. Use the getDifference() method of this class to the difference in days between two days.
    Or
    Simply use this code.
    // Get msec from each, and subtract.
    long diff = currDate.getTime() - selectedDate.getTime();
    int noOfDays = diff / (1000 * 60 * 60 * 24);
    where currDate is today's Date and selectedDate is the Date selected by the User.
    Bala

  • Compare finish date with target date

    Would like to keep track of late Projects by comparing the finish date with the target date but are unable to do so. The idea is just to filter and count the summary tasks which have a later Finish date than the target date and present that as a the number
    of late Projects. However it does not work, when trying to setup the filter Project tells that the target value can not be used for comparasion against the finish date.
    Does anyone have a workaround or maybe a better solution to keep track of late Projects. Please note that we are talking about Projects that risk to be late compared to a date promised to a customer. When we plan we always add some extra time at the
    end to have some extra when the Project is delayed at a certain department, however we want to keep track of how many late Projects we have and how late they are. Are not after seeing the status for each departments, only how we are doing in relation to what
    we have promised our customers.
    Kind regards //Anders

    Anders,
    Trevor and Dale have tried to steer you towards the normal tracking fields and methods already available in Project, but let me take a more direct approach to your exact question. First of all, you didn't tell us what field you are using as the "target date".
    I'll assume it is the Date1 field manually entered for each summary line.
    You could probably produce something close to the report you want with custom field formulas, filters and some manual counting but let me offer a more automated approach. The following macro will examine each summary task in your project and determine if
    the finish date is before or on the target date (Date1), or if it is after the target date. If it is after the target date, that will count as one late project/order and add it to a running count of late orders. The difference in days will also be tracked
    and added to a running total of delay. At the end, a message will appear in the exact format you describe.
    Sub LateReport()
    Dim t As Task
    Dim LateCount As Integer
    Dim LateDays As Integer
    Dim TotDelay As Integer
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            If t.Summary = True Then
                If DateValue(t.Finish) > DateValue(t.Date1) Then
                    LateCount = LateCount + 1
                    LateDays = DateValue(t.Finish) - DateValue(t.Date1)
                    TotDelay = TotDelay + LateDays
                End If
            End If
        End If
    Next t
    MsgBox "Number of late orders: " & LateCount & " (" & TotDelay & " days of total delay)"
    End Sub
    Note, in my view, and I'm sure in Trevor and Dale's also, the Finish field of the summary line does not indicate completion, it simply indicates the scheduled finish date of the last task in the subtasks under that summary. I think you should use the Actual
    Finish date as the comparison value since it indicates when the project/order is complete. If you do decide, actual finish is a better choice, then substitute t.ActualFinish for t.Finish in the above macro.
    My input.
    John

  • How to compare Sale data with Previous data

    Hi Guys,
        Any one tell me how we will compare Sales data with Last year Sale data. Is there any T.Code or any kind of Report in the SAP. If available please suggest the same.
    Thanks & regards,
    Naveen Bhatia

    Hi Naveen,
    Did yo ucheck t-code SD01
    Regards
    Rohit.

  • Compare - Current Data with Perious Data.

    Experts,
    We have created default report like below
    Date - Company - Product - SCode - Amt Spent - Net Amt - Calls
    12/12/2010 C1 P1 Code1 1000 1500 15
    13/12/2010 C2 P4 Code2 1500 1200 10
    12/12/2009 C1 P3 Code3 2000 1700 25
    11/12/2010 C3 P1 Code4 3000 1600 10
    11/11/2009 C2 P2 Code5 5000 3000 30
    Grand Total 12000 9000 90
    Here we are using Column selector for Date column to change the report from Date to Week (or) Month (or) Quarter (or) Year.
    My Questions
    1. I want to compare Default Date report with Perious Date, Last month Date and Last Year Date.
    2. If I select Month from Column Selector then I want to compare Month report with Last Month, Last year Month or Perious of Last year month.
    3. If I select Year from Column Selector then I want to compare Year report with Last year, or Perious of Last year and so on.
    Please help me, how can we achive the above task.
    Thanks in Advance.
    Balaa...

    Hello,
    First you have to define the new measures for last month, last year and so on. You can refer to this link:
    http://www.rittmanmead.com/2007/04/obi-ee-time-dimensions-and-time-series-calculations/
    After that, what you can do is instead of using a "Column Selector" you should use "View Selector". You can create different views, one for month, other for Year and include them into a "View Selector".
    After that you can add it in "Compound Layout".
    Regards,
    JorgeRS.

Maybe you are looking for

  • URGENT HELP NEEDED (Bios Settings Failed)

    Hey Guys, I am having problems with my MSI Board, and don't know what to do.  I am very much a noob to BIOS/and modding so I apologize in advance.  You guys helped me a few months ago getting everything up and running and all was great for months.  T

  • Date and Time Issue for Mult Org...

    Hello, How can I manage the date time, if my organizations have different plant and location? I.e. The database server located in Pacific Time zone and the application may access from new plant German time zone. Whenever the German business center en

  • Will this tool work to take apart an iPod Touch 2nd Gen?

    I have an iPod Touch 2nd gen that has no warranty. The bottom half of the screen stopped working. and its cracked in a couple of places. I want to get to the digitizer to see if there is something wrong with that. So please tell me if I have the righ

  • Requires a user to input a date (condition [%0])

    Hi,  I'm trying to write a query that requires a user to input a date (condition [%0]).  The data brought back would show invoices with activity but I need to get only the invoices that are 60 days past due from the date the user inputs. --SELECT T0.

  • Sample for JTable & DragnDrop ?

    Hi Folks, did someone illustrate an example (or seen) that shows the use of Drag&Drop and a JTable? # Thanks in Advance cheers