Home > Default > To filter records using XSLT mapping

To filter records using XSLT mapping

October 11Hits:0
Advertisement
Hi all,
I am using XSLT mapping in my scenario.
I have below structure.
<Node>
    <emp_id>123<emp_id>
    <begin_date>dd/mm/yyyy<begin_date/>
    <end_date>dd/mm/yyyy<end_date/>
    <check_date>dd/mm/yyyy<check_date/>
<Node/>
I want to filter out the records based on check_date. If checkdate is less than enddate, i want to filter out that particular records.
If anyone knows, Please suggest me in this issue.

Answers

hi,
               <xsl:variable name="checkdate">
     <xsl:for-each select="Node/check_date">
     <xsl:value-of select="substring(concat(substring(Node/checkdate,1,2),substring
                        (Node/checkdate,4,2),substring(Node/checkdate,7,4)),1,8)"/>
     </xsl:for-each>
                </xsl:variable>
     Like wise create a variable for end date....
   <xsl:for-each select="Node">
          <xsl:if test="$checkdate > ''$enddate">
                   <emp_id>
                          <xsl:value-of select="Node/emp_id"/>
                   </emp_id>
            like wise create map for other filed...
              </xsl:if>
    </xsl:for-each>
  I think this will solve your requirement......
Regards,
Prakasu

Read other 8 answers

Tags:

Related Articles

  • To filter records using XSLT mappingOctober 11

    Hi all, I am using XSLT mapping in my scenario. I have below structure. <Node>     <emp_id>123<emp_id>     <begin_date>dd/mm/yyyy<begin_date/>     <end_date>dd/mm/yyyy<end_date/>     <check_date>dd/mm/yyyy&l

  • Filter Idoc segment based on date in XSLT mapOctober 11

    Hi, In a Idoc to flat file XSLT mapping, I have a requirment to filter segment out of multiple segment occurance in HRMD_A idoc. Idoc has two date fields(actually string data, containing date in YYYYMMDD format) in the segment(end date and start date

  • Record splitting using XSLT mappingOctober 11

    Hi, In my scenario i need to split n number of records into groups of 5.I learnt that this can be done through XSLT mapping also.So can  anyone please help me in getting this through XSLT. thanks in advance, VikramHi, You can simply use udf's for thi

  • Read Portal User ID in BW report to filter recordsOctober 11

    Hi, I need to filter my records in BW report based on the business partner who logs into Portal. (BW report is getting called thur IView in Portal) Is there any way i can fetch the Portal User id during the execution of BW report? so then i can filte

  • Issue in tranforming Idoc structure using XSLT mappingOctober 11

    Hi, I am working on the XSLT Mapping to transform the IDoc xml to the desired format. Source structure single Idoc: EDI_DC40 record E1EDKxx records E1EDPxx records E1EDSxx records suppose I have 4 E1EDP01 records, of which 2 are Original and next two

  • XSLT Mapping : XML to Fixed Length FileOctober 11

    Hi, I have to code a XSLT mapping which converts the XML into a Fixed Length File Format. I am getting the output but it has some garbage values (Some extra spaces in front of first record and also extra blank lines before the first record) I am past

  • XSLT mapping sometimes throw ArrayOutOfBoundsExceptionOctober 11

    Hi I have a simple XSLT mapping that is supposed to group elements based on an identificator (number). My issue is that when testing message through PI, it sometimes throw ArrayOutOfBoundsException and sometimes not, with the same records involved..!

  • Reg usage of XSLT MappingOctober 11

    Hi All, We need to build an interface from PI to some database using JDBC adapter to send out emails to business users of the exception records created in the table.please help in using the xslt mapping for this interface. Thanks in Advance,Hi, You c

  • Convsersion in XSLT mapping...October 11

    Hi All, I am having a requirement where i have to fill the attribute value of a element depending upon the values coming from source and do the date conversions using  XSLT mapping. The source and target structures are like that: Target Structure is:

  • XSLT mapping queryOctober 11

    Hi All I have done a XSLT mapping to map a flat file structure to a hierarchical structure. But my 3rd level node is getting repeated for 2nd level node. Please find the details below Source Structure - flat file Header - 1 Record - 1....unbound Fore

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.503 s.