New Functions of the SAPscript Program Interface as of 3.0 
Description
New function modules:
The function module implements the copying of texts. Only texts
which exist in the database can be copied. Copying text modules on
the text file was only possible up to now by importing the text to be copied with READ_TEXT and storing it under a new name with
SAVE_TEXT. With COPY_TEXTS, only the names of the texts to be copied
are transferred in a table, together with the names of the target
texts. Copying is carried out by copying the respective data records.
The lines of the transferred text are output in the display
exactly as they are in the SAPscript text editor. In this case the output is made in the layout set SAPSCRIPT_ITF.
With the parameter DEVICE=OTF_MEM in the function OPEN_FORM, the
SAPscript printout is kept in memory instead of generating a spool
order, for example. In this case the text is formatted internally for the pseudo device SCREEN.
With the function module CONVERT_OTF_MEMORY this buffered output can be retrieved to the table LINES.
The return format can be determined by the parameter FORMAT (currently only possible for ASCII)
The function module analyzes whether a character string present in
a text line is a SAPscript symbol. If it is a symbol, all information on this symbol is returned in the parameters SYMBOL_....
This function returns a table which contains all symbols which are
in the text lines transferred in the table parameter LINES.
The command lines IF, ELSE, ELSEIF, ENDIF, CASE, WHEN, OTHERS,
ENDCASE in the line table LINES are interpreted and the resulting text is returned to the table.
Stores the entered text keys for archiving. If the object belonging
to the respective application is archived (function module ARCHIVE_SAVE_OBJECT), the actual archiving start is carried out,
that is, all text keys which were entered with TEXT_ARCHIVE_OBJECT
are now read by the text database and written to the archive. The client from which the texts are to be read from the text database
can be entered as special parameter.
- TEXT_RELOAD_ARCHIVE_OBJECT
Restores all texts which exist for an application object in the
archive to the text database. The data on the application object was
read from the archive beforehand during the archive read operation.
The client in which the texts are stored is in the archive data, that
is, the restoring is always to the client from which archiving was started.
- TEXT_DELETE_ARCHIVE_OBJECT
All texts which received a deletion indicator when calling up the function module TEXT_ARCHIVE_OBJECT are deleted.
A SAPscript text with a text header and a text line table is put
into a pooled table. The pooled table can now be considered as an object and, for example, transferred to another system in one go.
The reading pointer is set to the specified text in the pooled table. This can be read afterwards with the function module
GET_TEXT_FROM_POOL.
Reads the text module from the pool to which the current reading
pointer is set. After this, the reading pointer is set to the next text.
Extensions to available function modules:
The extensions were made so that the previous functionality of the
affected function modules is preserved by the default setting of the new or changed parameters.
- When creating a new text, the parameter controls whether the
information in the text header concerning the creation is entered automatically by SAPscript or whether the data transferred in the
header should be used. The fields TDFUSER, TDFDATE, TDFTIME and TDFRELES in the text header are affected.
The texts to be updated can be specified via OBJECT, NAME, ID and
LANGUAGE. This way it is possible to put only a subset of the texts
kept in the text memory into the log file. The texts not selected remain in the text memory.
With KEEP, you can determine that the texts transferred to the log
file are not deleted from the text memory. This way they are still available for the current transaction. In a further COMMIT_TEXT,
these texts are only written to the log file if they were changed in the meantime.
Via the parameter SAVEMODE_DIRECT, the texts available in the text
memory can be written immediately in the database, that is, the database changes are not carried out via update. The parameter has
the same mode of operation as the one for SAVE_TEXT or DELETE_TEXT.
- WRITE_FORM, WRITE_FORM_LINES
The parameter PENDING_LINES returns whether there are still text
lines in the overflow buffer, that is, that not all lines were yet printed to the layout set. This is possible, for example, if a
PROTECT command was carried out, the respective ENDPROTECT was not yet sent to the SAPscript Composer however.
If such lines exist, this parameter has the value 'X'.
Up to now the program name could only be entered for the OPEN_FORM, from whose data range the values of program symbols
should be taken. This is also now possible for the START_FORM via
the parameter PROGRAM. If nothing is entered here, the program name specified in the OPEN_FORM is used as it was before.
For the conversion of symbol names from the R/2 System into the
R/3 System, the function module RS3l_CONVERT_FIELDNAME is called up.
The counter variable &c0 .. &c9 occurring in R/2 in texts are converted into the corresponding SAPscript counters
SAPSCRIPT-COUNTER0 .. SAPSCRIPT_COUNTER9.
The parameter REPLACE_SYMBOLS determines whether the symbols occurring in the value are to be replaced immediately by their
respective values.
If this parameter has the value 'x', symbols which are contained
in the field VALUE are replaced immediately by their current values,
that is, there are no more SAPscript symbols in the assigned value.
If this parameter is set to SPACE, the contents of the VALUE field are copied without any changes. Symbols occurring in it are only
replaced by their current value if the symbol entered in the parameter NAME is called up in the text.
- TEXT_INCLUDE_REPLACE, TEXT_SYMBOL_REPLACE
Via the parameter PROGRAM, the name of the program can be entered
from whose data range the values of program symbols are to be transferred. This definition applies only to the current call up of
these function modules.
New fields in reference structures of parameters
TDNOPREV controls whether the print layout of the text can be chosen from the SAPscript print pop-up.
Via TDPRINTER, a device type can be given. When selecting the
printers on the print pop-up, only printers corresponding to this device type can then be chosen.
MANDT contains the client of the text module.
TDTEXTTYPE defines the text format of the text module. If the field is empty, the text is in the SAPscript ITF format.
Otherwise, the text exists in a format which cannot be processed by the SAPscript editor or by the SAPScript printout.
TDCOMPRESS indicator for text compression. Is no longer used, since
the compression of the tables which contain the lines is carried out by the ABAP interface automatically.