<?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: ABAP code for flat file path in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435383#M1648002</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 suggest you to use Logical File Path &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM: FILE_GET_NAME_USING_PATH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chaminda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Dec 2011 01:48:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-12-21T01:48:19Z</dc:date>
    <item>
      <title>ABAP code for flat file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435376#M1647995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My hierarchy is loaded through flat file. This file is present in the application server.&lt;/P&gt;&lt;P&gt;We have hard coded the filename path in our program in the production system as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:p_fname LIKE rlgrap-filename value '&lt;BR /&gt;A0001SAP\PACE_PRD\interface\BI\BO\PYD_PDL.CSV'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, our pre production system is refreshed and hence after the refresh, the same path got copied in the pre production system and our process chain got failed as the path name is wrong. Same is the case in the development system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note: The file path is same in all the systems except the name of the system i.e.&lt;/P&gt;&lt;P&gt;For development system, the name is PACE_DEV&lt;/P&gt;&lt;P&gt;for preprodcution system, the name is PACE_PREPRD,&lt;/P&gt;&lt;P&gt;for production system, it is PACE_PRD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone let us know, what global logic should be developed so that the process chain runs smoothly in all the systems?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin Chopade.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 13:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435376#M1647995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-20T13:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code for flat file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435377#M1647996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use logical filenames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go look it up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 13:45:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435377#M1647996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-20T13:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code for flat file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435378#M1647997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the below code for the file path of your local matchine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER: file_nm TYPE localfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR file_nm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PROGRAM_NAME = SYST-REPID&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DYNPRO_NUMBER = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FIELD_NAME = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;static = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MASK = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;file_name = file_nm&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;mask_too_long = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 13:49:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435378#M1647997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-20T13:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code for flat file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435379#M1647998</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;+1 for Maen suggestion: Logical file path is the best way to "standardize" file accesses! Have a look to doc &amp;amp; transaction FILE...&lt;/P&gt;&lt;P&gt;The only FM you will then need is FILE_GET_NAME_USING_PATH...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;Manu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 14:33:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435379#M1647998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-20T14:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code for flat file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435380#M1647999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nitin Chopade,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put the path /file name on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_output(120).  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use that selection-screen field in place of the hard coded value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then change the path / file name at will.&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;Change the file '&lt;BR /&gt;A0001SAP\PACE_PRD\interface\BI\BO\PYD_PDL.CSV'&lt;/P&gt;&lt;P&gt;to                      '&lt;BR /&gt;A0001SAP\PACE_&amp;amp;SYSID&amp;amp;\interface\BI\BO\PYD_.CSV'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign the hard coded value to a variable, w_variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before you use the file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace '&amp;amp;SYSID&amp;amp;' in w_variable with sy-sysid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bruce Tjosvold on Dec 20, 2011 4:09 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 21:06:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435380#M1647999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-20T21:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code for flat file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435381#M1648000</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;Depending on the setup, you may use radiobuttons to let the user choose between the 3 hardcoded paths. If the program is automated and you know how to determine what system is being used, you may use custom tables to maintain the hardcoded path that will be used by the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 00:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435381#M1648000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T00:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code for flat file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435382#M1648001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd suggest to use logical filename, which is platform independent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 01:26:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435382#M1648001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T01:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP code for flat file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435383#M1648002</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 suggest you to use Logical File Path &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM: FILE_GET_NAME_USING_PATH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chaminda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 01:48:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-flat-file-path/m-p/8435383#M1648002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-21T01:48:19Z</dc:date>
    </item>
  </channel>
</rss>

