<?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: logical file name in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-file-name/m-p/3092438#M733527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Logical Files in ABAP Programs &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create a physical file name from a logical file name in your ABAP programs, use the function module FILE_GET_NAME. To insert the function module call in your program, choose Edit ® Insert statement from the ABAP Editor screen. A dialog box appears. Select Call Function and enter FILE_GET_NAME. The parameters of this function module are listed below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt; Function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLIENT&lt;/P&gt;&lt;P&gt; The maintenance tables for the logical files and paths are client-dependent. Therefore, the desired client can be imported. The current client is stored in the system field SY-MANDT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;LOGICAL_FILENAME&lt;/P&gt;&lt;P&gt; Enter the logical file name in upper case letters that you want to convert.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OPERATING_SYSTEM&lt;/P&gt;&lt;P&gt; You can import any operating system that is contained in the list in Transaction SF04 (see Assigning Operating Systems to Syntax Groups). The physical file name will be created according to the syntax group to which the operating system is linked. The default parameter is the value of the system field &lt;/P&gt;&lt;P&gt;SY-OPSYS.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PARAMETER_1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER_2&lt;/P&gt;&lt;P&gt; If you specify these import parameters, the reserved words  in the physical path names will be replaced by the imported values.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;USE_PRESENTATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_SERVER&lt;/P&gt;&lt;P&gt; With this flag you can decide whether to import the operating system of the presentation server instead of the operating system imported by the parameter OPERATING_SYSTEM.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WITH_FILE_EXTENSION&lt;/P&gt;&lt;P&gt; If you set this flag unequal to SPACE, the file format defined for the logical file name is appended to the physical file name.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export Parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt; Function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;EMERGENCY_FLAG&lt;/P&gt;&lt;P&gt; If this parameter is unequal to SPACE, no physical name is defined in the logical path. An emergency physical name was created from table FILENAME and profile parameter DIR_GLOBAL.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FILE_FORMAT&lt;/P&gt;&lt;P&gt; This parameter is the file format defined for the logical file name. You can use this parameter, for example, to decide in which mode the file should be opened.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FILE_NAME&lt;/P&gt;&lt;P&gt; This parameter is the physical file name that you can use with the ABAP statements for working with files.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception Parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt; Function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FILE_NOT_FOUND&lt;/P&gt;&lt;P&gt; This exception is raised if the logical file is not defined.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OTHERS&lt;/P&gt;&lt;P&gt; This exception is raised if other errors occur.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the logical file MYTEMP and the logical path TMP_SUB are defined as in the preceding topics and we have the following program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FLAG,&lt;/P&gt;&lt;P&gt;      FORMAT(3),&lt;/P&gt;&lt;P&gt;      FNAME(60).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE SY-OPSYS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FILE_GET_NAME'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          LOGICAL_FILENAME        = 'MYTEMP'&lt;/P&gt;&lt;P&gt;          OPERATING_SYSTEM        = SY-OPSYS&lt;/P&gt;&lt;P&gt;          PARAMETER_1             = '01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;          EMERGENCY_FLAG          = FLAG&lt;/P&gt;&lt;P&gt;          FILE_FORMAT             = FORMAT&lt;/P&gt;&lt;P&gt;          FILE_NAME               = FNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;          FILE_NOT_FOUND          = 1&lt;/P&gt;&lt;P&gt;          OTHERS                  = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  WRITE: /  'Flag      :', FLAG,&lt;/P&gt;&lt;P&gt;         / 'Format    :', FORMAT,&lt;/P&gt;&lt;P&gt;         / 'Phys. Name:', FNAME.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output appears as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP-UX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLAG :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORMAT : BIN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phys. Name: /tmp/TEST01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the R/3 System is running under the operating system HP-UX, which is member of the syntax group UNIX. The logical file name MYTEMP with the logical path TMP_SUB is converted into a physical file name /tmp/TEST01 as defined for the syntax group UNIX. The field FNAME can be used in the further flow of the program to work with file TEST01 in directory /tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose we have a logical file name EMPTY with the physical file name TEST, connected to a logical path that has no specification of a physical path. If you replace the EXPORTING parameter 'MYTEMP' with 'EMPTY' in the above example, the output appears as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP-UX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLAG : X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORMAT :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phys. Name: /usr/sap/S11/SYS/global/TEST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system created an emergency file name, whose path depends on the installation of the current R/3 System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Nov 2007 10:52:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-26T10:52:53Z</dc:date>
    <item>
      <title>logical file name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-file-name/m-p/3092437#M733526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; how can find logical file name corresponding physical file name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srinivasarao oleti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 10:51:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-file-name/m-p/3092437#M733526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-26T10:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: logical file name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-file-name/m-p/3092438#M733527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Logical Files in ABAP Programs &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create a physical file name from a logical file name in your ABAP programs, use the function module FILE_GET_NAME. To insert the function module call in your program, choose Edit ® Insert statement from the ABAP Editor screen. A dialog box appears. Select Call Function and enter FILE_GET_NAME. The parameters of this function module are listed below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt; Function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLIENT&lt;/P&gt;&lt;P&gt; The maintenance tables for the logical files and paths are client-dependent. Therefore, the desired client can be imported. The current client is stored in the system field SY-MANDT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;LOGICAL_FILENAME&lt;/P&gt;&lt;P&gt; Enter the logical file name in upper case letters that you want to convert.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OPERATING_SYSTEM&lt;/P&gt;&lt;P&gt; You can import any operating system that is contained in the list in Transaction SF04 (see Assigning Operating Systems to Syntax Groups). The physical file name will be created according to the syntax group to which the operating system is linked. The default parameter is the value of the system field &lt;/P&gt;&lt;P&gt;SY-OPSYS.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PARAMETER_1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETER_2&lt;/P&gt;&lt;P&gt; If you specify these import parameters, the reserved words  in the physical path names will be replaced by the imported values.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;USE_PRESENTATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_SERVER&lt;/P&gt;&lt;P&gt; With this flag you can decide whether to import the operating system of the presentation server instead of the operating system imported by the parameter OPERATING_SYSTEM.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WITH_FILE_EXTENSION&lt;/P&gt;&lt;P&gt; If you set this flag unequal to SPACE, the file format defined for the logical file name is appended to the physical file name.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export Parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt; Function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;EMERGENCY_FLAG&lt;/P&gt;&lt;P&gt; If this parameter is unequal to SPACE, no physical name is defined in the logical path. An emergency physical name was created from table FILENAME and profile parameter DIR_GLOBAL.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FILE_FORMAT&lt;/P&gt;&lt;P&gt; This parameter is the file format defined for the logical file name. You can use this parameter, for example, to decide in which mode the file should be opened.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FILE_NAME&lt;/P&gt;&lt;P&gt; This parameter is the physical file name that you can use with the ABAP statements for working with files.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception Parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt; Function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FILE_NOT_FOUND&lt;/P&gt;&lt;P&gt; This exception is raised if the logical file is not defined.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OTHERS&lt;/P&gt;&lt;P&gt; This exception is raised if other errors occur.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the logical file MYTEMP and the logical path TMP_SUB are defined as in the preceding topics and we have the following program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FLAG,&lt;/P&gt;&lt;P&gt;      FORMAT(3),&lt;/P&gt;&lt;P&gt;      FNAME(60).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE SY-OPSYS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FILE_GET_NAME'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          LOGICAL_FILENAME        = 'MYTEMP'&lt;/P&gt;&lt;P&gt;          OPERATING_SYSTEM        = SY-OPSYS&lt;/P&gt;&lt;P&gt;          PARAMETER_1             = '01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;          EMERGENCY_FLAG          = FLAG&lt;/P&gt;&lt;P&gt;          FILE_FORMAT             = FORMAT&lt;/P&gt;&lt;P&gt;          FILE_NAME               = FNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;          FILE_NOT_FOUND          = 1&lt;/P&gt;&lt;P&gt;          OTHERS                  = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  WRITE: /  'Flag      :', FLAG,&lt;/P&gt;&lt;P&gt;         / 'Format    :', FORMAT,&lt;/P&gt;&lt;P&gt;         / 'Phys. Name:', FNAME.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output appears as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP-UX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLAG :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORMAT : BIN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phys. Name: /tmp/TEST01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, the R/3 System is running under the operating system HP-UX, which is member of the syntax group UNIX. The logical file name MYTEMP with the logical path TMP_SUB is converted into a physical file name /tmp/TEST01 as defined for the syntax group UNIX. The field FNAME can be used in the further flow of the program to work with file TEST01 in directory /tmp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose we have a logical file name EMPTY with the physical file name TEST, connected to a logical path that has no specification of a physical path. If you replace the EXPORTING parameter 'MYTEMP' with 'EMPTY' in the above example, the output appears as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HP-UX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLAG : X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORMAT :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phys. Name: /usr/sap/S11/SYS/global/TEST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system created an emergency file name, whose path depends on the installation of the current R/3 System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 10:52:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-file-name/m-p/3092438#M733527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-26T10:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: logical file name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logical-file-name/m-p/3092439#M733528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Karthikeyan Pandurangan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks for immediate reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  By using fm file_get_name , we can get physical file path from logical file name .&lt;/P&gt;&lt;P&gt;but i need to get logical file name from physical file path.&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;Srinivasarao oleti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 11:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logical-file-name/m-p/3092439#M733528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-26T11:03:02Z</dc:date>
    </item>
  </channel>
</rss>

