<?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: How I can get a flat file using a Function Module. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-i-can-get-a-flat-file-using-a-function-module/m-p/7285283#M1532073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try with CALL FUNCTION 'GUI_UPLOAD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the field separator as 'I' pipe symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if you really need a function module for this task. You can directly write internal table data in application server.&lt;/P&gt;&lt;P&gt;Please check below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;upload from application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : ZDEPARTMENT_TMP.&lt;/P&gt;&lt;P&gt;data : itab like ZDEPARTMENT_TMP occurs 0 with header line.&lt;/P&gt;&lt;P&gt;constants File(30) type C value '/usr/tmp/sri1111.txt'.&lt;/P&gt;&lt;P&gt;open dataset File for input in text mode.&lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;read dataset File into itab.&lt;/P&gt;&lt;P&gt;if sy-subrc 0.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'No more records'.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;close dataset File.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; itab-EMPID,itab-EMP_DEPT,itab-EMP_PROJ,itab-EMP_CUBE,&lt;/P&gt;&lt;P&gt;itab-EMP_PH_NO.&lt;/P&gt;&lt;P&gt;ZDEPARTMENT_TMP-EMPID = itab-EMPID.&lt;/P&gt;&lt;P&gt;ZDEPARTMENT_TMP-EMP_DEPT = itab-EMP_DEPT.&lt;/P&gt;&lt;P&gt;ZDEPARTMENT_TMP-EMP_PROJ = itab-EMP_PROJ.&lt;/P&gt;&lt;P&gt;ZDEPARTMENT_TMP-EMP_CUBE = itab-EMP_CUBE.&lt;/P&gt;&lt;P&gt;insert ZDEPARTMENT_TMP.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE  YOUR PROBLEM IS BEEN SOLVED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ANKIT&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: do not sell other peoples replies as your own!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="621139"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Oct 6, 2010 1:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Oct 2010 10:50:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-04T10:50:14Z</dc:date>
    <item>
      <title>How I can get a flat file using a Function Module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-i-can-get-a-flat-file-using-a-function-module/m-p/7285282#M1532072</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;How I can get a  flat file using a FM   &lt;STRONG&gt;HCM_GET_ORGSTRUCTURE_AS_XML_IN&lt;/STRONG&gt;  , As I am getting  an xml file . and it is giving a dump as the data is too large . &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks In ADVANCE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Oct 2010 07:54:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-i-can-get-a-flat-file-using-a-function-module/m-p/7285282#M1532072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-04T07:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: How I can get a flat file using a Function Module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-i-can-get-a-flat-file-using-a-function-module/m-p/7285283#M1532073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try with CALL FUNCTION 'GUI_UPLOAD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the field separator as 'I' pipe symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if you really need a function module for this task. You can directly write internal table data in application server.&lt;/P&gt;&lt;P&gt;Please check below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;upload from application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : ZDEPARTMENT_TMP.&lt;/P&gt;&lt;P&gt;data : itab like ZDEPARTMENT_TMP occurs 0 with header line.&lt;/P&gt;&lt;P&gt;constants File(30) type C value '/usr/tmp/sri1111.txt'.&lt;/P&gt;&lt;P&gt;open dataset File for input in text mode.&lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;read dataset File into itab.&lt;/P&gt;&lt;P&gt;if sy-subrc 0.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'No more records'.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;close dataset File.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; itab-EMPID,itab-EMP_DEPT,itab-EMP_PROJ,itab-EMP_CUBE,&lt;/P&gt;&lt;P&gt;itab-EMP_PH_NO.&lt;/P&gt;&lt;P&gt;ZDEPARTMENT_TMP-EMPID = itab-EMPID.&lt;/P&gt;&lt;P&gt;ZDEPARTMENT_TMP-EMP_DEPT = itab-EMP_DEPT.&lt;/P&gt;&lt;P&gt;ZDEPARTMENT_TMP-EMP_PROJ = itab-EMP_PROJ.&lt;/P&gt;&lt;P&gt;ZDEPARTMENT_TMP-EMP_CUBE = itab-EMP_CUBE.&lt;/P&gt;&lt;P&gt;insert ZDEPARTMENT_TMP.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE  YOUR PROBLEM IS BEEN SOLVED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ANKIT&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: do not sell other peoples replies as your own!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="621139"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Oct 6, 2010 1:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Oct 2010 10:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-i-can-get-a-flat-file-using-a-function-module/m-p/7285283#M1532073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-04T10:50:14Z</dc:date>
    </item>
  </channel>
</rss>

