<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating Simple transformation for an XML data having deep structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-simple-transformation-for-an-xml-data-having-deep-structure/m-p/7493093#M1557506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the actual XML structure..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;REQUEST&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;COUNTRY /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;ADDRESS /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;CITY /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;ASSIGNTYPE&amp;gt;IP&amp;lt;/ASSIGNTYPE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;CHARGETYPE&amp;gt;CH&amp;lt;/CHARGETYPE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;REMOTEALLOWED&amp;gt;Y&amp;lt;/REMOTEALLOWED&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;SALESRATE&amp;gt;EUR&amp;lt;/SALESRATE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;SECURITY&amp;gt;NO&amp;lt;/SECURITY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;TRAVELEXP&amp;gt;Y&amp;lt;/TRAVELEXP&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;MAXDAILYRATE /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;CREDENTIALS /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;EXPENDDATE /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;NEWENDDATE /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;NEWEXPENDDATE /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;REPLYBEFORE&amp;gt;2010-11-30&amp;lt;/REPLYBEFORE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;STARTDATE&amp;gt;2010-01-01&amp;lt;/STARTDATE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;ENDDATE&amp;gt;2010-12-31&amp;lt;/ENDDATE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;GCMTYPE&amp;gt;PM&amp;lt;/GCMTYPE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;GCMLEVELFROM&amp;gt;02&amp;lt;/GCMLEVELFROM&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;GCMLEVELTO&amp;gt;08&amp;lt;/GCMLEVELTO&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;LOCATION&amp;gt;FR43&amp;lt;/LOCATION&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;MOBILITY&amp;gt;04&amp;lt;/MOBILITY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;ZIPCODE /&amp;gt; &lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;LANGUAGES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01106034&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;005103&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/LANGUAGES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;ACTIVITIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105500&amp;lt;/SKILL&amp;gt;                             &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004507&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/ACTIVITIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;BUSINESS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105729&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004605&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/BUSINESS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;INDUSTRIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105491&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004901&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/INDUSTRIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;METHODS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105591&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004805&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/METHODS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;OFFERINGS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105840&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;005002&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/OFFERINGS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;PRODUCTS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01107304&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004703&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/PRODUCTS&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;CANDIDATES /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/REQUEST&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here..... &amp;lt;SKILL&amp;gt;&amp;lt;/SKILL&amp;gt;   &amp;lt;PROFICIENCY&amp;gt;&amp;lt;/PROFICIENCY&amp;gt;  can be more than 1 entry...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this I have created a simple transformation like below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the tcode 'XSLT_TOOL '..&lt;/P&gt;&lt;P&gt;In SE11 I have created a Table type 'ZCOMPETENCIES' which is having  a line type 'ZLANGS'.&lt;/P&gt;&lt;P&gt;ZLANGS is a structure which has another structure called 'ZCOMPETENCY' and this 'ZCOMPETENCY' is having fields&lt;/P&gt;&lt;P&gt;SKILL &amp;amp; PROFICIENCY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the wizard button which u can find  'XSLT_TOOL '.. and provided the table type ZCOMPETENCIES'  and it has automatically created the following transformation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&amp;lt;?sap.transform simple?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" xmlns:def="http://www.sap.com/abapxml/types/defined"&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:root name="ROOT" type="?"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:root name="COMPETENCIES" type="ddic:ZCOMPETENCIES"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:template&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;tt:loop ref=".COMPETENCIES"&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;ZLANGS&amp;gt;&lt;/P&gt;&lt;P&gt;          &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;            &amp;lt;SKILL tt:value-ref="COMPETENCY.SKILL"/&amp;gt;&lt;/P&gt;&lt;P&gt;            &amp;lt;PROF tt:value-ref="COMPETENCY.PROF"/&amp;gt;&lt;/P&gt;&lt;P&gt;          &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;/ZLANGS&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/tt:loop&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;/COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/tt:template&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/tt:transform&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;I have written following code to get the data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                = gs_file&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    data_tab                = gt_itab&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    file_open_error         = 1&lt;/P&gt;&lt;P&gt;    file_read_error         = 2&lt;/P&gt;&lt;P&gt;    no_batch                = 3&lt;/P&gt;&lt;P&gt;    gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;    invalid_type            = 5&lt;/P&gt;&lt;P&gt;    no_authority            = 6&lt;/P&gt;&lt;P&gt;    unknown_error           = 7&lt;/P&gt;&lt;P&gt;    bad_data_format         = 8&lt;/P&gt;&lt;P&gt;    header_not_allowed      = 9&lt;/P&gt;&lt;P&gt;    separator_not_allowed   = 10&lt;/P&gt;&lt;P&gt;    header_too_long         = 11&lt;/P&gt;&lt;P&gt;    unknown_dp_error        = 12&lt;/P&gt;&lt;P&gt;    access_denied           = 13&lt;/P&gt;&lt;P&gt;    dp_out_of_memory        = 14&lt;/P&gt;&lt;P&gt;    disk_full               = 15&lt;/P&gt;&lt;P&gt;    dp_timeout              = 16&lt;/P&gt;&lt;P&gt;    not_supported_by_gui    = 17&lt;/P&gt;&lt;P&gt;    error_no_gui            = 18&lt;/P&gt;&lt;P&gt;    OTHERS                  = 19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET REFERENCE OF gt_person INTO gs_result_xml-value.&lt;/P&gt;&lt;P&gt;gs_result_xml-name = 'COMPETENCIES'.&lt;/P&gt;&lt;P&gt;APPEND gs_result_xml TO gt_result_xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL TRANSFORMATION ZTEST_TRAN&lt;/P&gt;&lt;P&gt;    SOURCE XML gt_itab&lt;/P&gt;&lt;P&gt;    RESULT (gt_result_xml).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CATCH cx_root INTO gs_rif_ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    gs_var_text = gs_rif_ex-&amp;gt;get_text( ).&lt;/P&gt;&lt;P&gt;    MESSAGE gs_var_text TYPE 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need any further details..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Dec 2010 06:10:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-14T06:10:24Z</dc:date>
    <item>
      <title>Creating Simple transformation for an XML data having deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-simple-transformation-for-an-xml-data-having-deep-structure/m-p/7493091#M1557504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following XML structure..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;REQUESTS&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;REQUESTNAME&amp;gt;REQ123&amp;lt;/REQUESTNAME&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;REQUESTID&amp;gt;1234&amp;lt;/REQUESTID&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;CITY&amp;gt;NEWYORK&amp;lt;/CITY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;ZIPCODE&amp;gt;123456&amp;lt;/ZIPCODE&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;LANGUAGES&amp;gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;SKILL&amp;gt;SAP&amp;lt;/SKILL&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;PROFICIENCY&amp;gt;TEST&amp;lt;/PROFICIENCY&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;SKILL&amp;gt;JAVA&amp;lt;/SKILL&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;PROFICIENCY&amp;gt;TEST123&amp;lt;/PROFICIENCY&amp;gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;(here we may have any number of records for SKILL&amp;amp;PROFICIENCY...)*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &amp;lt;/COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;/LANGUAGES&amp;gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/REQUESTS&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;My requirement is to read the above data from an URL and push it into an internal table.&lt;/P&gt;&lt;P&gt;For this I'm trying to use Simple transformations but I'm facing difficulty in doing this.&lt;/P&gt;&lt;P&gt;Can you pl. guide me how to create the transformation and the corresponding code for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 02:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-simple-transformation-for-an-xml-data-having-deep-structure/m-p/7493091#M1557504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-14T02:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Simple transformation for an XML data having deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-simple-transformation-for-an-xml-data-having-deep-structure/m-p/7493092#M1557505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly you should post your attempt here so that people can help adapt it rather than starting from scratch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly the reason you are probably having trouble is because the XML is badly formed - the end tags are not in the correct order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you check the source XML and make sure it is as you have posted it because you won't be able to write a simple transformation based on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 03:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-simple-transformation-for-an-xml-data-having-deep-structure/m-p/7493092#M1557505</guid>
      <dc:creator>alex_cook</dc:creator>
      <dc:date>2010-12-14T03:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Simple transformation for an XML data having deep structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-simple-transformation-for-an-xml-data-having-deep-structure/m-p/7493093#M1557506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the actual XML structure..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;REQUEST&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;COUNTRY /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;ADDRESS /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;CITY /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;ASSIGNTYPE&amp;gt;IP&amp;lt;/ASSIGNTYPE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;CHARGETYPE&amp;gt;CH&amp;lt;/CHARGETYPE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;REMOTEALLOWED&amp;gt;Y&amp;lt;/REMOTEALLOWED&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;SALESRATE&amp;gt;EUR&amp;lt;/SALESRATE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;SECURITY&amp;gt;NO&amp;lt;/SECURITY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;TRAVELEXP&amp;gt;Y&amp;lt;/TRAVELEXP&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;MAXDAILYRATE /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;CREDENTIALS /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;EXPENDDATE /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;NEWENDDATE /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;NEWEXPENDDATE /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;REPLYBEFORE&amp;gt;2010-11-30&amp;lt;/REPLYBEFORE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;STARTDATE&amp;gt;2010-01-01&amp;lt;/STARTDATE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;ENDDATE&amp;gt;2010-12-31&amp;lt;/ENDDATE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;GCMTYPE&amp;gt;PM&amp;lt;/GCMTYPE&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;GCMLEVELFROM&amp;gt;02&amp;lt;/GCMLEVELFROM&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;GCMLEVELTO&amp;gt;08&amp;lt;/GCMLEVELTO&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;LOCATION&amp;gt;FR43&amp;lt;/LOCATION&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;MOBILITY&amp;gt;04&amp;lt;/MOBILITY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;ZIPCODE /&amp;gt; &lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;LANGUAGES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01106034&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;005103&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/LANGUAGES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;ACTIVITIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105500&amp;lt;/SKILL&amp;gt;                             &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004507&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/ACTIVITIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;BUSINESS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105729&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004605&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/BUSINESS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;INDUSTRIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105491&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004901&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/INDUSTRIES&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;METHODS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105591&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004805&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/METHODS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;OFFERINGS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01105840&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;005002&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/OFFERINGS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;PRODUCTS&amp;gt;&lt;/P&gt;&lt;P&gt;- &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;SKILL&amp;gt;01107304&amp;lt;/SKILL&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;PROFICIENCY&amp;gt;004703&amp;lt;/PROFICIENCY&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/PRODUCTS&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;CANDIDATES /&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/REQUEST&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here..... &amp;lt;SKILL&amp;gt;&amp;lt;/SKILL&amp;gt;   &amp;lt;PROFICIENCY&amp;gt;&amp;lt;/PROFICIENCY&amp;gt;  can be more than 1 entry...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this I have created a simple transformation like below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the tcode 'XSLT_TOOL '..&lt;/P&gt;&lt;P&gt;In SE11 I have created a Table type 'ZCOMPETENCIES' which is having  a line type 'ZLANGS'.&lt;/P&gt;&lt;P&gt;ZLANGS is a structure which has another structure called 'ZCOMPETENCY' and this 'ZCOMPETENCY' is having fields&lt;/P&gt;&lt;P&gt;SKILL &amp;amp; PROFICIENCY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the wizard button which u can find  'XSLT_TOOL '.. and provided the table type ZCOMPETENCIES'  and it has automatically created the following transformation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&amp;lt;?sap.transform simple?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" xmlns:def="http://www.sap.com/abapxml/types/defined"&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:root name="ROOT" type="?"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:root name="COMPETENCIES" type="ddic:ZCOMPETENCIES"/&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;tt:template&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;tt:loop ref=".COMPETENCIES"&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;ZLANGS&amp;gt;&lt;/P&gt;&lt;P&gt;          &amp;lt;COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;            &amp;lt;SKILL tt:value-ref="COMPETENCY.SKILL"/&amp;gt;&lt;/P&gt;&lt;P&gt;            &amp;lt;PROF tt:value-ref="COMPETENCY.PROF"/&amp;gt;&lt;/P&gt;&lt;P&gt;          &amp;lt;/COMPETENCY&amp;gt;&lt;/P&gt;&lt;P&gt;        &amp;lt;/ZLANGS&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/tt:loop&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;/COMPETENCIES&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/tt:template&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/tt:transform&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;I have written following code to get the data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                = gs_file&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    data_tab                = gt_itab&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    file_open_error         = 1&lt;/P&gt;&lt;P&gt;    file_read_error         = 2&lt;/P&gt;&lt;P&gt;    no_batch                = 3&lt;/P&gt;&lt;P&gt;    gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;    invalid_type            = 5&lt;/P&gt;&lt;P&gt;    no_authority            = 6&lt;/P&gt;&lt;P&gt;    unknown_error           = 7&lt;/P&gt;&lt;P&gt;    bad_data_format         = 8&lt;/P&gt;&lt;P&gt;    header_not_allowed      = 9&lt;/P&gt;&lt;P&gt;    separator_not_allowed   = 10&lt;/P&gt;&lt;P&gt;    header_too_long         = 11&lt;/P&gt;&lt;P&gt;    unknown_dp_error        = 12&lt;/P&gt;&lt;P&gt;    access_denied           = 13&lt;/P&gt;&lt;P&gt;    dp_out_of_memory        = 14&lt;/P&gt;&lt;P&gt;    disk_full               = 15&lt;/P&gt;&lt;P&gt;    dp_timeout              = 16&lt;/P&gt;&lt;P&gt;    not_supported_by_gui    = 17&lt;/P&gt;&lt;P&gt;    error_no_gui            = 18&lt;/P&gt;&lt;P&gt;    OTHERS                  = 19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET REFERENCE OF gt_person INTO gs_result_xml-value.&lt;/P&gt;&lt;P&gt;gs_result_xml-name = 'COMPETENCIES'.&lt;/P&gt;&lt;P&gt;APPEND gs_result_xml TO gt_result_xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL TRANSFORMATION ZTEST_TRAN&lt;/P&gt;&lt;P&gt;    SOURCE XML gt_itab&lt;/P&gt;&lt;P&gt;    RESULT (gt_result_xml).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CATCH cx_root INTO gs_rif_ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    gs_var_text = gs_rif_ex-&amp;gt;get_text( ).&lt;/P&gt;&lt;P&gt;    MESSAGE gs_var_text TYPE 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need any further details..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 06:10:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-simple-transformation-for-an-xml-data-having-deep-structure/m-p/7493093#M1557506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-14T06:10:24Z</dc:date>
    </item>
  </channel>
</rss>

