How to Copy File on Windows by ABAP/4

If you want to copy file on PC windows, you can use function "WS_FILE_COPY".

Example


*&---------------------------------------------------------------------*
*&     Form COPY_FILE
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
*     -->PAR_SOURCE      text
*     -->PAR_DESTINATION text
*----------------------------------------------------------------------*
FORM copy_file USING   par_source
                       par_destination.
DATA: lv_return LIKE sy-subrc.
CALL FUNCTION ’WS_FILE_COPY’
      EXPORTING
           destination = par_destination
           source     = par_source
      IMPORTING
           return     = lv_return.
ENDFORM.                   " COPY_FILE

Post new comment