SAP PFL_CHECK_DIRECTORY Function Module for









PFL_CHECK_DIRECTORY is a standard pfl check directory 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 pfl check directory FM, simply by entering the name PFL_CHECK_DIRECTORY into the relevant SAP transaction such as SE37 or SE38.

Function Group: SPFC
Program Name: SAPLSPFC
Main Program: SAPLSPFC
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function PFL_CHECK_DIRECTORY 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 'PFL_CHECK_DIRECTORY'"
EXPORTING
* DIRECTORY = "Name of directory
* WRITE_CHECK = ' ' "Write authorization for directory
* FILNAME = ' ' "
* DIRECTORY_LONG = "

EXCEPTIONS
PFL_DIR_NOT_EXIST = 1 PFL_PERMISSION_DENIED = 2 PFL_CANT_BUILD_DATASET_NAME = 3 PFL_FILE_NOT_EXIST = 4 PFL_AUTHORIZATION_MISSING = 5
.



IMPORTING Parameters details for PFL_CHECK_DIRECTORY

DIRECTORY - Name of directory

Data type: BTCH0000-TEXT80
Optional: Yes
Call by Reference: No ( called with pass by value option)

WRITE_CHECK - Write authorization for directory

Data type: BTCH0000-CHAR1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FILNAME -

Data type: BTCH0000-TEXT80
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DIRECTORY_LONG -

Data type: CHAR128
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

PFL_DIR_NOT_EXIST - Directory does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PFL_PERMISSION_DENIED - No write authorization for directory

Data type:
Optional: No
Call by Reference: Yes

PFL_CANT_BUILD_DATASET_NAME - Temporary file cannot be generated

Data type:
Optional: No
Call by Reference: Yes

PFL_FILE_NOT_EXIST -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PFL_AUTHORIZATION_MISSING -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for PFL_CHECK_DIRECTORY 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_directory  TYPE BTCH0000-TEXT80, "   
lv_pfl_dir_not_exist  TYPE BTCH0000, "   
lv_write_check  TYPE BTCH0000-CHAR1, "   SPACE
lv_pfl_permission_denied  TYPE BTCH0000, "   
lv_filname  TYPE BTCH0000-TEXT80, "   SPACE
lv_pfl_cant_build_dataset_name  TYPE BTCH0000, "   
lv_directory_long  TYPE CHAR128, "   
lv_pfl_file_not_exist  TYPE CHAR128, "   
lv_pfl_authorization_missing  TYPE CHAR128. "   

  CALL FUNCTION 'PFL_CHECK_DIRECTORY'  "
    EXPORTING
         DIRECTORY = lv_directory
         WRITE_CHECK = lv_write_check
         FILNAME = lv_filname
         DIRECTORY_LONG = lv_directory_long
    EXCEPTIONS
        PFL_DIR_NOT_EXIST = 1
        PFL_PERMISSION_DENIED = 2
        PFL_CANT_BUILD_DATASET_NAME = 3
        PFL_FILE_NOT_EXIST = 4
        PFL_AUTHORIZATION_MISSING = 5
. " PFL_CHECK_DIRECTORY




ABAP code using 7.40 inline data declarations to call FM PFL_CHECK_DIRECTORY

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 TEXT80 FROM BTCH0000 INTO @DATA(ld_directory).
 
 
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_write_check).
DATA(ld_write_check) = ' '.
 
 
"SELECT single TEXT80 FROM BTCH0000 INTO @DATA(ld_filname).
DATA(ld_filname) = ' '.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!