(Kontrolle mit AL11). Dafür und andere File-Kommandos ist die Klasse
CL_ISH_AT_EDI_FILETRANSFER nützlich.
Beispielcode:
   DATA: lo_edi     TYPE REF TO cl_ish_at_edi_filetransfer,
         ls_exppath TYPE rnwat_edi_filcom.
   ls_exppath-exppathtype = 'S'.
   ls_exppath-exppath = '/usr/sap/GLD/DVEBMGS00/work/'.
   CREATE OBJECT lo_edi
     EXPORTING
       is_exppath = ls_exppath.
   CALL METHOD lo_edi->rename_file
     EXPORTING
       i_filename_src      = 'altes_file.xml'
       i_filename_dest     = 'neues_file.doc'
     EXCEPTIONS
       error_renaming_file = 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.
   ELSE.
     WRITE: / 'File successfully renamed'.
   ENDIF.
 
No comments:
Post a Comment