The client thought is to have a background job setup, which will list the files in the directory, then the program will open one file at a time and process it, and in the last step, move the file to another fixed folder on the Win Server?

How would it be possible to run an external command, and if this is the case, how to write it (using SM69)?

This should give some ideas:

Coding:

call 'C_DIR_READ_START' id 'DIR'    field f1
                        id 'FILE'   field f2
                        id 'ERRNO'  field f3
                        id 'ERRMSG' field f4.

................

do.

    call 'C_DIR_READ_NEXT'

       id 'TYPE'   field f5
       id 'NAME'   field f6
       id 'LEN'    field f7
       id 'OWNER'  field f8
       id 'MTIME'  field f9
       id 'MODE'   field f10
       id 'ERRNO'  field f3
       id 'ERRMSG' field f4.

    case sy-subrc.

      when 0.

*     process filename

.....

enddo.

Coding:

call 'C_DIR_READ_FINISH'

  id 'ERRNO'  field f3
  id 'ERRMSG' field f4.

This gets you the file list.

Then execute an operating system command to move the files.

Coding:

call 'SYSTEM' id 'COMMAND'

  field lf_command...................

*-- End of Program


Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant
Contact : serkurumsal@yandex.com