SAP Function RSTS_READ - Read from TemSe Object

Parameter Reference Type Length Default Optional Text
BUFFLG 0 '*' X Maximum Storage Length per Line
FBHANDLE RSTSTYPE-FBHANDLE X 196 0 X Handle for Open Object
HFLAG RSTSTYPE-SHOWLG C 1 ' ' X Indicator for Hexadecimal Display - For Internal Use Only
MAXIX 0 '*' X Maximum Number of Lines to be Read (1000)
PARTS1BY1 RSTSTYPE-PARTS1BY1 C 1 ' ' X Only Part of TemSe Object Each Time
SHOWLG RSTSTYPE-SHOWLG C 1 ' ' X Every Line with Length Field

Parameter Reference Type Length Text
ALLDATA RSTSTYPE-ALLDATA C 1 All Data was Read

Parameter Reference Length Optional Text
DATATAB 0 Data Transfer

Exception Text
FB_CALL_HANDLE Error with Handles at CALL Interface
FB_ERROR Function Module Error
FB_RSTS_NOCONV Required Conversion Not Possible
FB_RSTS_OTHER Other Errors Reported by TemSe C System


Read from a TemSe object which was previously opened, e.g. with thefunction module 'RSTS_OPEN_RLC' or 'RSTS_OPEN_RB'.
The Temse object is read in lines or blocks, depending upon the functionmodule with which it was opened.

Special processing at the end
Each part of a TemSe object should finish at the end of a read record.There are some exceptions:
If the object is organized in lines and the records were read in lines,a half a line at the end, means a data format error.
If the object is organized in fixed length records, and the records wereread by lines, a half a line at the end means a dataformat error.
If the object is read in blocks, a half a block at theend of each part is accepted and read. Attention: each newobject part is re-aligned. If you want to check whetherall the blocks are complete, use SHOWLG = 'X'.

Parameter

DATATAB
An internal table, in which the data are written. Ifthe table was not empty, entries are APPENDed.

BUFFLG
Maximum line length. This paramter exists for certain special cases.In general the line length is determined by the width of the internaltables passed.

MAXIX
Maximum number of lines to be read. This is a protection to avoid e.g.100 Megabytes being read at once. Thedefault setting is: maximum 1000 lines. You can enter here themaximum number of lines which can be appended to an internal table.As a special case, zero (0) means that anunlimited number can be read.

PARTS1BY1
This function module normally tries to read a complete TemSe object atonce. If the Teme object consists of several parts, they are all openedseparately in this function module, readand closed again. You can set a protection here to prevente.g. too many TemSe objects being opened in adatabase transaction.

FBHANDLE
Handle for an open object. Must always be specified when a handle isused with 'RSTS_OPEN_...'.

ALLDATA
All data have been read. With this parameter you can, if you havespecified PARTS1BY1 or MAXIX, check whether the restriction applied,or whether all data were read.

SHOWLG
'X': The length of the line is put in front of each line. In thedata space (BUFF or BUFFTAB) is first the length, then possibly afirst column (ALLINE at Open), and only then theactual data.

Exceptions
The exceptions are classified according to the software level in whichthey occur.

FB_ERROR
Error in the function module or in its call.

FB_CALL_HANDLE
CALL interface handle error. e.g. when the TemSe is processed byfunction modules and the CALL interface.

FB_RSTS_NOCONV
Desired conversion was not possible. Details can be obtained with thefunction module 'RSTS_LAST_ERROR'.

FB_RSTS_OTHER
Other errors, whch are reported by the TemSe C system. Details can beobtained with the function module 'RSTS_LAST_ERROR'.