REPORT ZVENKATTEST.
PARAMETERS:P_SOUR LIKE RLGRAP-FILENAME , " This is the source file name
P_TARG LIKE RLGRAP-FILENAME . " This is the target file name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SOUR .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_SOUR'
IMPORTING
FILE_NAME = P_SOUR.
START-OF-SELECTION .
CALL FUNCTION 'SCMS_FILE_COPY'
EXPORTING
SRC_FILENAME = p_sour
SRC_FRONTEND = 'X'
DST_FILENAME = p_TARG
DST_FRONTEND = 'X'
EXCEPTIONS
READ_FAILED = 1
WRITE_FAILED = 2
OTHERS = 3
.
IF SY-SUBRC eq 0.
write:/ ' the source file name was:', p_sour .
write:/ ' the copied file name was:' , p_targ .
ENDIF.
No comments:
Post a Comment