SAP SCRIPT CONTROLS 3

Initializing Numbered Paragraphs: RESET

The RESET control command is used to reset the numbering of an outline paragraph to its initial value. If the RESET command is not used, then the numbering of all outline paragraphs in a text will be continuous. If the name of an outline paragraph is specified in the RESET command, then its paragraph numbering and that of subordinate paragraphs will be reinitialized.


Syntax:
/: RESET paragraph_format
The paragraph format specifies the outline paragraph to be reset.

Assume that the paragraph N1 is defined in the style you are using. This kind of paragraph is intended for enumerated lists and causes a sequential number to be output.


* Proceed as follows if you want to work with the SAP R/3 system:

N1 Ensure that you have a PC
N1 Switch the PC on
N1 Click on the SAP icon using the mouse.
* You will then enter the SAP logon screen. In order to log
on here, you must carry out the following actions:
/: RESET N1
N1 Enter your user name
N1 Enter your password
N1 Select the application you want to use
This text specification would be output as follows:


Proceed as follows if you want to work with the SAP R/3
system:
1. Ensure that you have a PC
2. Switch the PC on
3. Click on the SAP icon using the mouse.


You will then enter the SAP logon screen. In order to log on here, you must carry out the following actions:


1. Enter your user name
2. Enter your password
3. Select the application you want to use


If there were no RESET command between the two sections, then the two lists would be numbered in a single sequence:

Proceed as follows if you want to work with the SAP R/3
system:
1. Ensure that you have a PC
2. Switch the PC on
3. Click on the SAP icon using the mouse.
You will then enter the SAP logon screen. In order to log on here, you must carry out the following actions:
4. Enter your user name
5. Enter your password
6. Select the application you want to use


Including Other Texts: INCLUDE

You can use the INCLUDE control command to include the contents of another text into the current text. The text to be included continues to be treated as a separate text and is copied over only at the point at which the output is formatted.

Thus the use of the INCLUDE command always ensures that the most current version of a text is included into the output, since the text is not read and inserted until the output is formatted.
Syntax:
/: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p]
[NEW-PARAGRAPH np]


The name of the text to be inserted must be specified and can be up to 70 characters long. If the name of the text contains spaces, then it must be enclosed in quotes as a literal value. The name may alternatively be specified via a symbol. All remaining parameters in the INCLUDE command are optional.If an optional parameter is not specified, then SAPscript uses default values as applicable for the calling environment.

/: INCLUDE MYTEXT
The text MYTEXT is included in the language of the calling text.
/: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'
The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call.

Optional parameters:

• LANGUAGE

If this parameter is not specified, then the language of the calling text or the layout set language are used for the text to be included. If the language is specified, then the text will be fetched in this language, regardless of the language of the calling text.

• PARAGRAPH

The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.

• NEW-PARAGRAPH

The first line of the text to be included will be given this format indicator, as long as it is not a comment or command line. If the optional PARAGRAPH parameter (see above) is not specified, then all *-paragraphs of the included text will also be formatted using the paragraph np specified in the NEW-PARAGRAPH command.

• OBJECT

In order to completely specify a text, information about the text object is also required. There are a number of restrictions and other rules that depend on the object type of the calling text:

- Any kind of text can be included in a layout set. If no object is specified, then TEXT will be used (standard texts).
- In the case of a document text (DOKU object), you can include only document texts. This object type will also be assumed if no object is specified in this environment.
- Only hypertexts and document texts can be included in a hypertext (DSYS object). If the OBJECT parameter is missing, then DSYS is used as the default value.
- In the other kinds of text you can include only standard texts (TEXT object), document texts or hypertexts. If there is no specification, then the default object is TEXT.

• ID

The text-ID is a part of the text key which permits further text objects within a given object. If no ID is specified, then the default include ID is used from the TTXID table for the calling text. If there is no entry in this table, then the text-ID of the calling text is used.

The following consistency check is applied both to the ID and the object:

• All text-IDs are allowed in a layout set.
• In document texts only document texts may be included which have text-IDs TX (general texts) or UO (authorization objects) and also other document texts which have the same text-ID as the calling document text.


• In DSYS texts all DSYS texts can be included, whatever ID they have. Document texts to be included must have one of the IDs TX and UO.
• Standard texts with any allowable text-ID, DSYS texts with all IDs and document texts with the IDs TX and UO can be included into the other texts.

The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:

• 0: the text include was successful.
• 1: the command could not be executed because it contained syntax errors.
• 2: the rules governing the text to be included were not followed (see above).

This value cannot occur if the command is used in a SAPscript layout set.

• 4: the specified text could not be found.


Changing the Style: STYLE

The STYLE control command allows you to change the style within a text. The new style is in force until another STYLE command is issued. If * is specified as the name of style, then the system reverts to the original style.


Syntax:
/: STYLE style
/: STYLE *
The STYLE command is automatically set in the text editor if another text module is inserted and immediately expanded using the menu option Include ® Text. The same thing happens if the contents of texts that have been included using INCLUDE are copied into the text via Edit ® Selected area ® Expand INCLUDE.


RELATED POSTS

SAP SCRIPT CONTROLS 6
SAP SCRIPT CONTROLS 5
SAP SCRIPT CONTROLS 4
SAP SCRIPT CONTROLS 2
SAP SCRIPT CONTROLS 1

No comments :

Post a Comment