SAP Function RSTS_OPEN_WB - Open TemSe Object, to Write Block-By-Block

Parameter Reference Type Length Default Optional Text
AUTHORITY RSTSTYPE-AUTHCHECKD C 20 ' ' X Who Carried Out Authorization Check
CHARCO RSTSTYPE-CHARCO N 4 '*' X Character Set (or System Character Set)
ENQLOCK RSTSTYPE-PROM C 1 'N' X Without ("N) or With ("E") Enqueue Lock
LIFEHOURS 0 192 X Life Cycle of the Object (in Hours)
NAME RSTSTYPE-NAME C 20 Name of Temse Object
NO_ROLLBACK RSTSTYPE-MOD_NOROLB C 1 ' ' X No Data Loss for ROLLBACK
OBJTYPE RSTSTYPE-TYPE C 12 'TEXT' X Data Type
OWN_FBHANDLE RSTSTYPE-WFBHANDLE C 1 ' ' X 'FBHANDLE' is Used
PATH RSTSTYPE-PATH C 12 'db' X Path Name (for example, "DB", "&G" and so on)
PROM RSTSTYPE-PROM C 1 'E' X Processing Mode
RECTYP RSTSTYPE-RECTYP C 7 '*' X Record Type

Parameter Reference Type Length Text
FBHANDLE RSTSTYPE-FBHANDLE X 196 Handle for Open Object

Exception Text
ENQ_FOREIGN_LOCK Object Locked by Another User
ENQ_OTHER
ENQ_SYS_FAIL
FB_CALL_HANDLE Error with Handles at CALL Interface
FB_ERROR Function Module Errors
FB_RSTS_NOCONV Required Conversion Not Possible
FB_RSTS_OTHER Other Errors Reported by TemSe C System
NO_OBJECT Required TemSe Object Does Not Exist
NO_PERMISSION No Authorization for This Operation

Task of function module "RSTS_OPEN_WB"
TemSe objects save sequential files. Before they can be edited theymust be opened and when editing is finished, they must be closed.
This function module opens a TemSe object to write to it row by rowusing "RSTS_WRITE".
After editing is completed, the function module RSTS_CLOSE is called.

Parallel processing and handle concept
This group of function modules is designed for use with several TemSeobjects in parallel. Most of the time, however, only one TemSe objectis edited at one time. The application was therefore simplified for usewith one TemSe object at a time.

Processing only one object at a time
The following parameters do not have to be used if only one object isprocessed at a time:
Function module,,Parameter
RSTS_OPEN_WL,,OWN_FBHANDLE
,,FBHANDLE
RSTS_WRITE,,FBHANDLE
RSTS_CLOSE,,FBHANDLE
If you want to process multiple objects simultaneously, set"OWN_FBHANDLE" to "X" and use a variable for "FBHANDLE" that can beused for the related calls "RSTS_OPEN_WL", "RSTS_WRITE" and"RSTS_CLOSE".

Parameters

NAME
The name of the TemSe object to write to. There are naming conventionsfor TemSe objects from which the authorizations are also derived. Seealso table TST07.

Further optional parameters

CHARCO
This specifies the character set to use for the data output. Usually,the system character set is used.

LIFEHOURS
This specifies when the TemSe object expires and can be deleted by anautomatic cleanup (measured in hours from the current time).
Specifying "*" means the object has an infinite lifespan. If you do setthis to "*", determine who should ensure the object is later deleted.

NO_ROLLBACK
Usually, writes to TemSe objects follows the same concept as writes bytransactions to the database: the data is written after the COMMIT. AROLLBACK resets any changes made since the last COMMIT. If
NO_ROLLBACK = "X" is specified, the TemSe data written isretained even after a ROLLBACK.
Caution: The parameter NO_ROLLBACK currently requires that the TemSeobject is saved to a file or files. See "PATH".

PATH
This is used to specify where the TemSe object is saved. There are fourpossible data storage locations:

  • db: Data stored in the database

  • &G: Data stored in files in the global SAP directory

  • &L: Data stored in files in a local SAP directory on the
  • application server. This option is usually much faster but data is notvisible to other application servers. A read request from anotherapplication server is rejected with a file read error.
    • Otherwise specify a path where the data file is to be saved.
    • (caution: This path name can currently only be up to 12 characters)

      PROM
      The processing mode. There are three processing modes:
      Mode,,Processing in
      "I",,This internal session
      "E",,All internal sessions within this external session
      "W",,This work process
      Note:
      There is a limit to the number of TemSe objects that can be opened in adatabase transaction using processing mode "E". If a TemSe objectconsists of multiple parts, each part counts separately.
      Only use mode "W" if you understand the consequences completely.

      RECTYP
      Record type

      OBJTYPE
      Data type of the object

      AUTHORITY
      Name of the function or transaction that checked the requiredauthorizations

      ENQLOCK
      Lock mode of the object. The default value is "Do not use enqueuelock".
      Possible values:
      "N" Do not use enqueue lock (this is compatible with the previous
      implementation)
      "E" Set an exclusive enqueue lock until the corresponding
      RSTS_CLOSE is called. If all users use the parameter, this
      prevents a TemSe object from being written to simultaneously
      by multiple users.