SAP Function TB_LIMIT_WS_DOWNLOAD - File Transfer from Internal Table to Presentation Server File

Parameter Reference Type Length Default Optional Text
BIN_FILESIZE ANY A 0 SPACE X File Length for Binary Files
FILENAME ANY A 0 SPACE X Name of the File (Default Value)
FILETYPE RLGRAP-FILETYPE C 3 SPACE X File Type (ASCII, Binary, ...)(Default Value)
MODE ANY A 0 SPACE X Write Mode (Overwrite, Append)

Parameter Reference Type Length Text
FILELENGTH ANY A 0 Number of Bytes Transferred

Parameter Reference Length Optional Text
DATA_TAB 0 Transfer Table

Exception Text
FILE_WRITE_ERROR File Cannot Be Written
GUI_REFUSE_FILETRANSFER Incorrect Front End, or Error in Front End
INVALID_FILESIZE Invalid Parameter BIN_FILESIZE
INVALID_TYPE Invalid Value for Parameter FILETYPE
NO_AUTHORITY No Download Authorization
NO_BATCH Front-End Function Cannot Be Executed in Batch
UNKNOWN_ERROR Not Used


Storage of SAP data in a file in the file system on the presentationserver.
The size of the generated file is returned.
When generating a binary file, it is necessary to specify a file length
, since the transfer table (one column, type X) in the last row mightnot be completely valid.
A length of 0 (zero) is not permitted and generates an exception(INVALID_FILESIZE).
A length of more than the number of bytes in the table (width * numberof rows) also generates this exception.
Name of the file to be generated on the presentation server (with thepreceding path name if required). If the path does not exist or the filecannot be opened in write mode, the corresponding exceptions are set.
In a download, various conversions can be made. The target format isdetermined by the FILETYPE.
'ASC' : Ascii format, the table is stored by row.
'IBM' : Ascii format such as 'ASC' with IBM code page conversion (DOS)
'DAT' : Ascii format such as 'ASC', additional column division with TAB
Column selection is possible using COL_SELECT and COL_SELECTMASK
'WK1' : Storage by row and column in table format WK1
: Column width for C fields max. 240 characters
'BIN' : Binary format (specification of BIN_FILESIZE required)
'DBF' : Storage as a DBase file (always with DOS code page)
'VSS' : The first 4 bytes of each row in the transfer table specify the
number of bytes of the data to be transferred in this row.
'A' : Append (not for 'DBF' and 'WK1')
SPACE : Overwrite
Recommended table structures
'ASC' : 1 column, type C
'DAT' : n columns, mixed types (C, P, F, I)
'BIN' : 1 column, type C, width < 1023 bytes, otherwiseINVALID_TABLE_WIDTH
'WK1' : n columns, mixed types (C, P, F, I)