SAP FILE_VALIDATE_NAME Function Module for
FILE_VALIDATE_NAME is a standard file validate name SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for file validate name FM, simply by entering the name FILE_VALIDATE_NAME into the relevant SAP transaction such as SE37 or SE38.
Function Group: SFIL
Program Name: SAPLSFIL
Main Program: SAPLSFIL
Appliation area:
Release date: 05-Sep-1996
Mode(Normal, Remote etc): Normal Function Module
Update:
Function FILE_VALIDATE_NAME pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'FILE_VALIDATE_NAME'".
EXPORTING
* CLIENT = SY-MANDT "
LOGICAL_FILENAME = "
* OPERATING_SYSTEM = SY-OPSYS "
* PARAMETER_1 = ' ' "
* PARAMETER_2 = ' ' "
* PARAMETER_3 = ' ' "
* WITH_FILE_EXTENSION = ' ' "
* USE_BUFFER = ' ' "
* ELIMINATE_BLANKS = 'X' "
IMPORTING
VALIDATION_ACTIVE = "
TS_ALIAS = "
CHANGING
PHYSICAL_FILENAME = "
EXCEPTIONS
LOGICAL_FILENAME_NOT_FOUND = 1 VALIDATION_FAILED = 2
IMPORTING Parameters details for FILE_VALIDATE_NAME
CLIENT -
Data type: SY-MANDTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOGICAL_FILENAME -
Data type: FILENAME-FILEINTERNOptional: No
Call by Reference: No ( called with pass by value option)
OPERATING_SYSTEM -
Data type: SY-OPSYSDefault: SY-OPSYS
Optional: Yes
Call by Reference: No ( called with pass by value option)
PARAMETER_1 -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PARAMETER_2 -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PARAMETER_3 -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_FILE_EXTENSION -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
USE_BUFFER -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ELIMINATE_BLANKS -
Data type: SY-DATARDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FILE_VALIDATE_NAME
VALIDATION_ACTIVE -
Data type: BOOLE_DOptional: No
Call by Reference: Yes
TS_ALIAS -
Data type: FILE_TS_FILEINTERNOptional: No
Call by Reference: Yes
CHANGING Parameters details for FILE_VALIDATE_NAME
PHYSICAL_FILENAME -
Data type: CLIKEOptional: No
Call by Reference: Yes
EXCEPTIONS details
LOGICAL_FILENAME_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
VALIDATION_FAILED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FILE_VALIDATE_NAME Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_client | TYPE SY-MANDT, " SY-MANDT | |||
lv_physical_filename | TYPE CLIKE, " | |||
lv_validation_active | TYPE BOOLE_D, " | |||
lv_logical_filename_not_found | TYPE BOOLE_D, " | |||
lv_ts_alias | TYPE FILE_TS_FILEINTERN, " | |||
lv_logical_filename | TYPE FILENAME-FILEINTERN, " | |||
lv_validation_failed | TYPE FILENAME, " | |||
lv_operating_system | TYPE SY-OPSYS, " SY-OPSYS | |||
lv_parameter_1 | TYPE SY, " SPACE | |||
lv_parameter_2 | TYPE SY, " SPACE | |||
lv_parameter_3 | TYPE SY, " SPACE | |||
lv_with_file_extension | TYPE SY, " SPACE | |||
lv_use_buffer | TYPE SY, " SPACE | |||
lv_eliminate_blanks | TYPE SY-DATAR. " 'X' |
  CALL FUNCTION 'FILE_VALIDATE_NAME' " |
EXPORTING | ||
CLIENT | = lv_client | |
LOGICAL_FILENAME | = lv_logical_filename | |
OPERATING_SYSTEM | = lv_operating_system | |
PARAMETER_1 | = lv_parameter_1 | |
PARAMETER_2 | = lv_parameter_2 | |
PARAMETER_3 | = lv_parameter_3 | |
WITH_FILE_EXTENSION | = lv_with_file_extension | |
USE_BUFFER | = lv_use_buffer | |
ELIMINATE_BLANKS | = lv_eliminate_blanks | |
IMPORTING | ||
VALIDATION_ACTIVE | = lv_validation_active | |
TS_ALIAS | = lv_ts_alias | |
CHANGING | ||
PHYSICAL_FILENAME | = lv_physical_filename | |
EXCEPTIONS | ||
LOGICAL_FILENAME_NOT_FOUND = 1 | ||
VALIDATION_FAILED = 2 | ||
. " FILE_VALIDATE_NAME |
ABAP code using 7.40 inline data declarations to call FM FILE_VALIDATE_NAME
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single MANDT FROM SY INTO @DATA(ld_client). | ||||
DATA(ld_client) | = SY-MANDT. | |||
"SELECT single FILEINTERN FROM FILENAME INTO @DATA(ld_logical_filename). | ||||
"SELECT single OPSYS FROM SY INTO @DATA(ld_operating_system). | ||||
DATA(ld_operating_system) | = SY-OPSYS. | |||
DATA(ld_parameter_1) | = ' '. | |||
DATA(ld_parameter_2) | = ' '. | |||
DATA(ld_parameter_3) | = ' '. | |||
DATA(ld_with_file_extension) | = ' '. | |||
DATA(ld_use_buffer) | = ' '. | |||
"SELECT single DATAR FROM SY INTO @DATA(ld_eliminate_blanks). | ||||
DATA(ld_eliminate_blanks) | = 'X'. | |||
Search for further information about these or an SAP related objects