Abap , Ağdaki Dosyalara Erişim
*PARAMETERS:p_dir(50) TYPE c.
*
*DATA : file_table LIKE TABLE OF sdokpath WITH HEADER LINE .
*DATA : dir_table LIKE TABLE OF sdokpath WITH HEADER LINE .
*
*DATA : file_count TYPE i ,
* dircount TYPE i .
*
*CALL FUNCTION ‘TMP_GUI_DIRECTORY_LIST_FILES’
* EXPORTING
* directory = p_dir
* filter = ‘*.CSV’
* IMPORTING
* file_count = file_count
* dir_count = dircount
* TABLES
* file_table = file_table
* dir_table = dir_table
* EXCEPTIONS
* cntl_error = 1
* OTHERS = 2.
*WRITE:/ ‘toplam dosya sayısı : ‘, file_count .
*
*LOOP AT file_table .
** IF sy-tabix eq son_iki.
** write:/ file_table-pathname.
** ENDIF.
*
* IF sy-tabix EQ file_count – 1.
* WRITE:/ ‘Sondan İkinci Dosya ‘ , file_table-pathname.
* ENDIF.
*
*ENDLOOP.