Skip to Content
author's profile photo Former Member
Former Member

Program to move files from a directory to another

Hi gentlemen,

Following the instructions below:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8c5ceb90-0201-0010-66b1-aae00269b533?quicklink=index&overridelayout=true

I am writing a program so as to move file from a directory to another (and add sy-datum to his name).

But when declaring this:

*Internal table for File names

DATA BEGIN OF t_xy_filetab OCCURS

INCLUDE STRUCTURE emg_

DATA END OF t_xy_filetab.

I have an error message that I don't understand:

Field "EMG_FILEINFO" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement. "DATA" statement.

I work on a BI7 system.

Great thanks.

Jacques Lagrif

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 07, 2010 at 06:49 AM
    CALL FUNCTION 'SPAD_COPY_FILES_LOCAL'
      EXPORTING
        iv_source_file                 = P_FILE1
       IV_SOURCE_DIRECTORY            = P_SDIR
       IV_TARGET_FILE                 = P_FILE1
       IV_TARGET_DIRECTORY            = P_TDIR
       IV_OVERWRITE_MODE              = ' '
    * IMPORTING
    *   EV_FILE_SIZE                   =
     EXCEPTIONS
       OPEN_INPUT_FILE_FAILED         = 1
       OPEN_OUTPUT_FILE_FAILED        = 2
       WRITE_BLOCK_FAILED             = 3
       READ_BLOCK_FAILED              = 4
       CLOSE_OUTPUT_FILE_FAILED       = 5
       OTHERS                         = 6
              .
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    
    IF sy-subrc = 0.
    
    Message 'Successfuly Moved your File' Type 'I'.
    
    ENDIF.
    
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2010 at 10:23 AM

    Another error:

    the function module ISU_M_GET_FILES_OF_DIR does not exist on my BI system ????

    Any help ?

    Thank you very much in advance.

    Jacques Lagrif

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.