<?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: XML to ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325985#M1637639</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;Refer this link..&lt;/P&gt;&lt;P&gt;&lt;A href="http://sample-code-abap.blogspot.com/2009/05/processing-xml-with-xslt-transformation.html" target="test_blank"&gt;http://sample-code-abap.blogspot.com/2009/05/processing-xml-with-xslt-transformation.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you can view this one also..&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;link to blocked site removed by moderator&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will really be helpful to you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jhings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jhings on Nov 15, 2011 4:19 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 15, 2011 12:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2011 10:49:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-15T10:49:27Z</dc:date>
    <item>
      <title>XML to ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325984#M1637638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want convert XML file to ABAP and my XML file is mentioned below:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have used CALL TRANSFORMATION and i have created structure in se11 Znee_dataset is my structure which has fields that are listed in the XML output and my problems are:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.) how to create  CALL TRANSFORMATION ?&lt;/P&gt;&lt;P&gt;2.) can i use  CALL TRANSFORMATION ID ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_XML_CONVERSTAION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS abap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Input file contents as string.XML file path where we saved the file. *Here it is saved in desktop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Input file with path as constant&lt;/P&gt;&lt;P&gt;CONSTANTS gs_file TYPE string VALUE 'C:UsersNeeru SangwanDesktopNee FileACT_GlobalExample Gatekeeper XML filesMATCREATE_11314_20111031_19344131.XML' ."'C:Documents and&lt;/P&gt;&lt;P&gt;"SettingsAdministratorDesktop	est1.xml'.&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;*PARAMETERS : gs_file TYPE string.&lt;/P&gt;&lt;P&gt;*PARAMETER: FILE_NM TYPE RLGRAP-FILENAME OBLIGATORY.&lt;/P&gt;&lt;P&gt;*This is the structure type for the data from the XML file&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ts_zeu_matmas03,&lt;/P&gt;&lt;P&gt;       idoc TYPE Znee_dataset, "ZIDOC_TEST structure we created in SE11&lt;/P&gt;&lt;P&gt;       END OF ts_zeu_matmas03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table for storing the XML content from file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: gt_itab       TYPE STANDARD TABLE OF char2048.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table and work areas for the data from the XML file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: gt_zeu_matmas03     TYPE STANDARD TABLE OF  ts_zeu_matmas03,&lt;/P&gt;&lt;P&gt;      gs_zeu_matmas03     TYPE ts_zeu_matmas03.&lt;/P&gt;&lt;P&gt;DATA : IT_DATA_XML TYPE STANDARD TABLE OF ZNEW_DATASET WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : XML_RESULT TYPE STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Result table that contains references&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;of the internal tables to be filled&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: gt_result_xml TYPE abap_trans_resbind_tab,&lt;/P&gt;&lt;P&gt;      gs_result_xml TYPE abap_trans_resbind.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;              type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;For error handling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: gs_rif_ex     TYPE REF TO cx_root,&lt;/P&gt;&lt;P&gt;      gs_var_text   TYPE string,&lt;/P&gt;&lt;P&gt;      IT_TAB        TYPE FILETABLE,&lt;/P&gt;&lt;P&gt;      GD_SUBRC      TYPE I,&lt;/P&gt;&lt;P&gt;      l_xml_table_size TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the XML file from your client&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;    filetype                = 'DAT'&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;   filelength               = l_xml_table_size&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;CALL TRANSFORMATION ID&lt;/P&gt;&lt;P&gt;SOURCE XML gt_itab&lt;/P&gt;&lt;P&gt;RESULT SOURCE = IT_DATA_XML[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing is in IT_DATA_XML[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me &lt;EM&gt;&amp;lt;removed by moderator&amp;gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nee&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 15, 2011 12:33 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 10:45:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325984#M1637638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-15T10:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: XML to ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325985#M1637639</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;Refer this link..&lt;/P&gt;&lt;P&gt;&lt;A href="http://sample-code-abap.blogspot.com/2009/05/processing-xml-with-xslt-transformation.html" target="test_blank"&gt;http://sample-code-abap.blogspot.com/2009/05/processing-xml-with-xslt-transformation.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you can view this one also..&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;link to blocked site removed by moderator&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will really be helpful to you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jhings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jhings on Nov 15, 2011 4:19 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 15, 2011 12:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 10:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325985#M1637639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-15T10:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: XML to ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325986#M1637640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jhings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for quick reply but i already tried those links and it was not help me when i excute my code  one error message comes which says 'Incorrect element &lt;SPAN __jive_macro_name="http"&gt;&lt;/SPAN&gt;Material for XML-ABAP transformation'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already copied my code and XML file on my post just have a look and help me &lt;EM&gt;&amp;lt;removed by moderator&amp;gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nee&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: everybody is on the same priority in these forums, please avoid terms that suggest otherwise, like "it's urgent".&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 15, 2011 2:49 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 12:41:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325986#M1637640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-15T12:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: XML to ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325987#M1637641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neeru,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can check SDN wiki for a sample code for uploading an xml file to an internal table. I would suggest you to go through the code, debug it and check how exactly it is appending the values into an internal table:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/Upload" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/Upload&lt;/A&gt;&lt;EM&gt;XML&lt;/EM&gt;file&lt;EM&gt;to&lt;/EM&gt;internal+table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 14:17:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-abap/m-p/8325987#M1637641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-15T14:17:46Z</dc:date>
    </item>
  </channel>
</rss>

