*&---------------------------------------------------------------------*
*& Report  ZRUNUPLOAD                                                       *
*&                                                                                            *
*&---------------------------------------------------------------------*
*&    Written by Sheila Titchener abap at iconet-ltd.co.uk       *
*&                                                                                            *
*&---------------------------------------------------------------------*

REPORT  ZRUNUPLOAD                              .

data: code like rssource-line occurs 1 with header line,
      filename(50).

PARAMETERS: p_dir(80)
       DEFAULT 'C:\Documents and Settings\My Documents',
       p_file(20).

read report 'ZUPLOAD' into code.

LOOP AT code.
  IF code CS 'ztest'.
    REPLACE 'ztest' WITH p_file INTO code.
    MODIFY code INDEX sy-tabix.
  ENDIF.
ENDLOOP.

insert report 'ZUPLOAD1' from code.

commit work.

CONCATENATE p_dir p_file '.xls' INTO filename.

submit ZUPLOAD1 with p_file = p_file.