sapdev logo background
sapdev logo sapdev logo
Comments

FILE_GET_NAME sap function module




The below code shows how function module FILE_GET_NAME is used to retrieve the physical file path of a logical file name. use Transaction FILE to maintain logical file names on your SAP system.

Retreive physical file path of a logical file name

data: ld_filename type string.

CALL FUNCTION 'FILE_GET_NAME'
  EXPORTING
*   CLIENT                        = SY-MANDT
    LOGICAL_FILENAME              = 'SD_OPEN_ORDERS'  "Logical file name see sap tcode 'FILE'
*   OPERATING_SYSTEM              = SY-OPSYS
*   PARAMETER_1                   = ' '
*   PARAMETER_2                   = ' '
*   PARAMETER_3                   = ' '
*   USE_PRESENTATION_SERVER       = ' '
*   WITH_FILE_EXTENSION           = ' '
*   USE_BUFFER                    = ' '
*   ELEMINATE_BLANKS              = 'X'
 IMPORTING
*   EMERGENCY_FLAG                =
*   FILE_FORMAT                   =
    FILE_NAME                     = ld_filename  "physical file
 EXCEPTIONS
   FILE_NOT_FOUND                = 1
   OTHERS                        = 2.



Check out sap documentation and pattern details for function module file_get_name on website se80.co.uk



comments powered by Disqus