PFL CHECK DIRECTORY

Aus SAP Wiki ツ
Version vom 18. Juli 2021, 15:14 Uhr von M1ch3lde (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Deklaration == IV_DIR_TO_CHECK Importing Type BTCH0000-TEXT80 RV_DIR_EXISTS Returning Type ABAP_BOOLEAN == Codeschnipsel == CALL FUNCTION 'PFL_CHECK_D…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Deklaration

IV_DIR_TO_CHECK	Importing	Type	BTCH0000-TEXT80
RV_DIR_EXISTS	Returning	Type	ABAP_BOOLEAN

Codeschnipsel

CALL FUNCTION 'PFL_CHECK_DIRECTORY'
   EXPORTING
     directory                   = iv_dir_to_check
*     WRITE_CHECK                 = ' '
*     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
     OTHERS                      = 6.
 CASE sy-subrc.
   WHEN 2 OR 3 OR 4 OR 6.
     RAISE EXCEPTION TYPE zcx_bc_basic
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
   WHEN 1.
    RAISE EXCEPTION TYPE zcx_bc_basic
         MESSAGE e000(zbc_dir_file) WITH iv_dir_to_check.
   WHEN 0.
     rv_dir_exists = abap_true.
 ENDCASE.