<?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: File format determination in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176860#M756037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Get file using :&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      program_name  = sy-cprog&lt;/P&gt;&lt;P&gt;      dynpro_number = sy-dynnr&lt;/P&gt;&lt;P&gt;      field_name    = space&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name     = p_local.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;where P_local is parameter (     p_local  TYPE rlgrap-filename MODIF ID m2.)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Check file as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lv_file   TYPE string,        "File path with name&lt;/P&gt;&lt;P&gt;        lv_ext(3) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Get file extension&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  SPLIT p_local AT c_dot INTO lv_file lv_ext.&lt;/P&gt;&lt;P&gt;                                    &lt;/P&gt;&lt;P&gt;  TRANSLATE lv_ext TO UPPER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;IF file is excel get data from excel sheet&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  IF lv_ext = 'XLS'.&lt;/P&gt;&lt;P&gt;    PERFORM get_xls_file USING lv_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Else get file from gui download&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    PERFORM get_txt_file USING lv_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.    "lv_ext&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2007 09:13:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-21T09:13:56Z</dc:date>
    <item>
      <title>File format determination</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176857#M756034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;         Is there a way to determine the format of the flat file ( eg: Excel, notepad etc ) based on the file path where the file is located.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 08:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176857#M756034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T08:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: File format determination</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176858#M756035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i can suggest onse solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the file path. Get the string after last '.'(dot).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Compare this string with known file extensions.&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;STRONG&gt;Award Points if useful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bhupal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 08:56:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176858#M756035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T08:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: File format determination</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176859#M756036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ram,&lt;/P&gt;&lt;P&gt;   U can mention the files as&lt;/P&gt;&lt;P&gt;c_doa0001 sy-datum sy-uzeit '-' t_vsart-vsart '.txt' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this file is text file..which is gonna  store in application server..under the repectively path..&lt;/P&gt;&lt;P&gt;Like that u can give the .XXX respective  extension..to XL or watever u nee...&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;Ari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 09:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176859#M756036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T09:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: File format determination</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176860#M756037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Get file using :&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      program_name  = sy-cprog&lt;/P&gt;&lt;P&gt;      dynpro_number = sy-dynnr&lt;/P&gt;&lt;P&gt;      field_name    = space&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name     = p_local.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;where P_local is parameter (     p_local  TYPE rlgrap-filename MODIF ID m2.)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Check file as following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lv_file   TYPE string,        "File path with name&lt;/P&gt;&lt;P&gt;        lv_ext(3) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Get file extension&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  SPLIT p_local AT c_dot INTO lv_file lv_ext.&lt;/P&gt;&lt;P&gt;                                    &lt;/P&gt;&lt;P&gt;  TRANSLATE lv_ext TO UPPER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;IF file is excel get data from excel sheet&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  IF lv_ext = 'XLS'.&lt;/P&gt;&lt;P&gt;    PERFORM get_xls_file USING lv_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Else get file from gui download&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    PERFORM get_txt_file USING lv_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.    "lv_ext&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 09:13:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176860#M756037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T09:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: File format determination</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176861#M756038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks allot guys,&lt;/P&gt;&lt;P&gt;                You have solved my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 09:40:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-format-determination/m-p/3176861#M756038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T09:40:23Z</dc:date>
    </item>
  </channel>
</rss>

