IT/SAP

SAP CTS UPLOAD

SAP_BASIS 2018. 11. 15. 11:22

*&---------------------------------------------------------------------*
*& Report ZCTS_FILE_UPLOAD
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZCTS_FILE_UPLOAD.

PARAMETERSpre_path TYPE saepfad,

            app_path TYPE saepfad.

DATAp_pres1 TYPE localfile.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR pre_path.

  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

    EXPORTING

      program_name syst-repid

      dynpro_number syst-dynnr

      field_name   p_pres1

    CHANGING

      file_name    p_pres1

    EXCEPTIONS

      mask_too_long 1

      OTHERS       2.

  IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  ENDIF.

MOVE p_pres1 TO pre_path.

START-OF-SELECTION.

  CALL FUNCTION 'ARCHIVFILE_CLIENT_TO_SERVER'

    EXPORTING

      path      pre_path

      targetpath app_path

    EXCEPTIONS

      error_file 1

      OTHERS    2.
  IF sy-subrc EQ 0.

    WRITE:'File uploaded successfully into application server path' app_path.


  ENDIF.

'IT > SAP' 카테고리의 다른 글

CTS File Download Report  (0) 2019.09.03
Exam PRODS4PRESALES  (0) 2019.01.09
SAP 유용한 링크  (0) 2017.05.11
[SAP HANA] Repairing installations with missing signature  (0) 2017.03.15
Change SAP Web Logon images  (0) 2016.06.02