Show TOC

Component documentationGUI_UPLOAD Locate this document in the navigation structure

 

Uploads a file from the client computer to the server.

Arguments

[IMPORTING] filename TYPE STRING

Name of file to be uploaded. This path can be either absolute or relative. Environment variables are not allowed in the path (see note 922128).

[IMPORTING] filetype TYPE CHAR10

Format in which the data should be transferred.

Possible values:

  • ASC

    data should be transferred as ASCII text. Data is converted as necessary

  • BIN

    data should be transferred unconverted in binary format

  • DAT

    data should be transported unconverted as ASCII text where the different columns are separated by tabulators

[IMPORTING] has_field_separator TYPE CHAR01

Flag indicating whether the different fields in the file are separated by tabulators.

Possible values:

  • ' '

    the fields are not separated by tabs

  • 'X'

    fields are separated by tabulators

[IMPORTING] header_length TYPE I

Length of header in BIN transfer format.

[IMPORTING] read_by_line TYPE CHAR01

Indicates whether one line in the data table should correspond to one line in the file. The data table may only have one column. Carriage return and line feed characters at the end of a line are not removed if this option is activated.

Possible values:

  • ' '

    this option should not be active

  • 'X'

    one line in the data table should correspond to one line in the file

[IMPORTING] dat_mode TYPE CHAR01

If this flag is set, columns are separated by tabulators as they are in the transfer type DAT. Conversion exits are not executed.

Possible values:

  • ' '

    if columns should not be sent tab separated in transfer types different from DAT.

  • 'X'

    if columns should be sent tab separated.

[IMPORTING] codepage TYPE ABAP_ENCODING

Encoding in which data should be transferred. This is the desired SAP codepage. If a blank is specified instead, the codepage in which the SAP GUI is communicating with the server is used. The codepage used for the transferred data can be set in SAP Logon for each system entry.

[IMPORTING] ignore_cerr TYPE ABAP_BOOL

Flag indicating whether errors in the conversion of the data should be ignored or not.

Possible values:

  • ABAP_FALSE

    conversion errors should not be ignored

  • ABAP_TRUE

    conversion errors should be ignored

[IMPORTING] replacement TYPE ABAP_REPL

Character to use for characters that cannot be converted, i.e. which cannot be represented in the specified encoding.

[IMPORTING] virus_scan_profile TYPE VSCAN_PROFILE

Group of scanners to use for checking the uploaded file (see notes 797108, 786179, 639486).

[EXPORTING] filelength TYPE I

Number of bytes transferred from the client. The size of headers if applicable are not included in the file length.

[EXPORTING] header TYPE XSTRING

Header in BIN transfer type.

[CHANGING] data_tab TYPE STANDARD TABLE

Table containing data retrieved from client.

Note Note

This parameter should have been defined as an exporting parameter because the content passed to the method will not be changed.

End of the note.
Exceptions

ACCESS_DENIED

Thrown if the user has no access to the specified file.

BAD_DATA_FORMAT

This exception is fired if the data has a format that cannot be converted for transfer.

DATAPROVIDER_EXCEPTION

Raised for unspecific data provider errors.

DP_OUT_OF_MEMORY

Currently not used.

DP_TIMEOUT

Currently not used.

DISK_FULL

Currently not used.

ERROR_NO_GUI

Currently not used.

FILE_OPEN_ERROR

If the specified file does not exist, FILE_OPEN_ERROR is fired.

FILE_READ_ERROR

Currently not used.

GUI_REFUSE_FILETRANSFER

If this exception is fired, the data could not be transferred to the Web GUI.

HEADER_NOT_ALLOWED

This exception is raised if a header length is specified for any transfer type other than BIN.

HEADER_TOO_LONG

If the header specified exceeds the maximum length allowed for the header, this exception will be raised.

INVALID_TYPE

This exception is thrown if an invalid transfer type has been specified.

NO_AUTHORITY

Thrown if user does not have the authorization to execute this operation.

NO_BATCH

Raised if operation is called from inside a batch process.

NOT_SUPPORTED_BY_GUI

Currently not used.

SEPARATOR_NOT_ALLOW

Fired if a separator has been specified for any transfer type other than BIN.

UNKNOWN_DP_ERROR

Thrown in case of an unidentified dataprovider error.

UNKNOWN_ERROR

Raised if an error occurs during the conversion of data to be transferred to the specified encoding, during the file transfer or during the scanning of the data for viruses.