SAP SCRIPT 5

GROUPING TEXTS

From a business-oriented point of view, texts are usually related to a certain application. Therefore, most texts are allocated to a certain object, depending on their contents. On one hand, this grouping allows better handling of the texts, on the other hand it facilitates control of internal processes within SAPscript.
Text object
Text ID

TEXT OBJECT

In the SAP system, texts do not end in themselves but are usually linked with other business application objects. For example, one text describes a material in detail while another text contains a special agreement concerning an order. Such texts make sense only in connection with the allocated object, since they refer to a certain material or a certain order.
Apart from a contextual relation, these objects also determine certain processing parameters, which the SAPscript functions must consider. For example, when saving a text module, it depends on the object whether the module is directly written to the text database or whether the update task is used.
In the SAPscript environment, these objects are called text objects. Being allocated to a text object is an essential attribute of a text module.
The possible text objects and their respective attributes must be defined in table TTXOB.

TEXT ID

Usually one text is not enough for an application object. You need several texts to describe all the individual characteristics of an application object. For example, you may need these texts to store information on a customer:

- Sales notes
- Marketing notes
- Accounting notes
- Field service notes
- ...

To be able to distinguish between the texts of one object, you need another grouping attribute. SAPscript calls this attribute text ID. You use text IDs to identify the different texts describing the same text object.
The text IDs and their attributes must be defined in table TTXID.

ATTRIBUTES OF TEXTS

This topic describes the attributes of texts as well as the individual processing steps within SAPscript.
Storage mode
Line width
Editing interfaces
Editor title line
Text format
Style for formatting output
Layout set for formatting output
INCLUDE texts

STORAGE MODE

Text modules are related to an application object. They are created or edited together with the object. You can imagine them as a unit, even though they are stored in different tables. Therefore, the way in which a SAPscript text is written to the database should depend on the way the application object is stored. The following possibilities exist:

• Direct storage

When calling the corresponding save function, the system immediately writes the text module to the text database.

• Storage in the update task

All changes to the text modules of a transaction are stored intermediately in a buffer. Only when the application object is updated does the system write the texts to the log file and, in the update task, stores them in the text file.

• No storage within SAPscript

You can use SAPscript to edit texts that are not stored in the text database. In this case, SAPscript only returns the changed text table to the application program, which is itself responsible for storing the text.
This text attribute is defined in the table TTXOB in field TDSAVEMODE. With some function modules, you can use the parameter SAVEMODE_DIRECT to temporarily switch from storage in update task to direct storage.

LINE WIDTH

This attribute determines the line width to be used for this text in the text editor. A SAPscript text line may consist of up to 132 characters.
The editor can display only 72 characters of a text line. If the line width exceeds 72, you can shift the editor display horizontally and thus switch between the left and the right text part. If you set the line width to less than 72, in the editor you can use only as many characters as specified.
Beware that a very small line width may cause problems, since control statements must be contained in one line, and they may be too long then.
You define the line width in table TTXOB in field TDLINESIZE. When initializing the text using the function module INIT_TEXT, the system passes the value you enter here into the corresponding field in the text header. You can modify the line width for each individual text by changing the line size in the text header in field TDLINESIZE after calling the function module READ_TEXT or INIT_TEXT. The system saves the new line width together with the text module.
The line width of the text editor does not effect the line width of a text prepared for printing. This width is determined only from the definition of the paragraph format, the chosen font, and the window width within the layout set.

EDITING INTERFACES

If you want to edit a text with the text editor, you can choose between different interfaces. These interfaces determine which functions you can call to edit a text module.
Usually, you work with the interfaces TA or TN:

• TA application texts (variant 1)à

You choose this interface if you can select several texts from the application environment and you want to navigate in this selection list from within the text editor. You need not save each text explicitly, since the navigation functions (Next text, Previous text, Back) automatically save text changes.

application texts (variant 2)à• TN

You choose this interface, if you want to edit only one text from the application environment.

• TX standard texts (text object TEXT)à


Depending on the interface, different menu functions are active:

Menu function TX TN TA
Other textàText X
SaveàText X X
Save asàText X
Next textàGoto X
Previous textàGoto X
Allocateà Style àFormat X
Allocate Xà Layout set àFormat
ConvertàFormat X
Environment X
For special applications, there are other interfaces:

Documentationà• TD
• TY Layout set textsà
• TO Office textsà

These definitions are designed for SAP applications and contain functions which you cannot use in general.
Define the editor interface of a text object in table TTXOB in the field TDAPPL. You cannot change a value specified in this table for an individual text with the SAPscript programming interface.

EDITOR TITLE LINE

SAPscript displays the following status information in the title line of the editor:
: Language
The fields have the following meanings:

:

Long text of the text ID from table TTXIT

:

The current action is defined by the call of the text editor or by the current processing step within the text editor (change, display, mark, insert).

:

Name of the currently edited text.

:

Additional text from the application program.

:

Language ID of the currently edited text.

You can modify this default information.
If the field TDSHOWNAME in table TTXID is empty, the display of the text name is suppressed.
The contents of field is supplied by the application program. Its value is passed using the parameter EDITOR_TITLE when the text editor is called.
The application program can even lay out the title line of the editor completely to its own requirements, by using the parameter CONTROL of the function modules EDIT_TEXT or EDIT_TEXT_INLINE. If the parameter field USERTITLE contains an X, the title line preset by SAPscript is completely suppressed. The system then displays only the text passed in the parameter EDITOR_TITLE. If you use a variable & in this parameter, the system replaces it with the editing function (Display <-> Change, ...).

TEXT FORMAT

You can use the SAPscript programming interface not only to maintain texts in the SAPscript format ITF but also to pass texts with other formats. When calling the SAPscript function modules, the system passes all text lines, independent of their format, in a line table with the structure TLINE.
However, you can pass texts with other formats only to certain text modules. And the function modules EDIT_TEXT_FORMAT_xxx or PRINT_TEXT_FORMAT_xxx must exist for editing and printing these texts (xxx = text format). These function modules create a connection to the word processing program that can process the specified format.
You can define the text format both in table TTXOB and in table TTXID in the field TDTEXTTYPE, according to the following priority rules:

Table describing the text format

TTXOB-TDTEXTTYPE TTXID-TDTEXTTYPE Text format
> SPACE = SPACE from table TTXOB
> SPACE > SPACE from table TTXID
= SPACE > SPACE from table TTXID
= SPACE = SPACE SAPscript ITF format
When initializing a text using the function module INIT_TEXT, the system passes the text format to the field TDTEXTTYPE of the text header, depending on how tables TTXOB or TTXID are set and on the priority rules described above.
For an individual text, you can modify the text format by entering the desired format into this field of the text header after the call of function module INIT_TEXT. The system saves the new text format together with the text module.
To modify the text format of an existing text, you must convert the text from the old to the new format, using special converters supplied by the SAPscript programming interface.

STYLE FOR FORMATTING OUTPUT

The output format of SAPscript texts is controlled by character and paragraph formats. All output formats you may use for a certain text are combined in a style, which is allocated to the text. The style is stored in the text header in field TDSTYLE.
When creating a new text module using function module INIT_TEXT, the system can automatically store a default style in the text header. However, you must first define default styles for the objects concerned in table TTXOB in field TDSTYLE.
To change the style of a text after executing INIT_TEXT or READ_TEXT, enter the desired style in the text header. If you want to allocate a style for printing only, simply specify the style in the text header before calling the function modules PRINT_TEXT or WRITE_FORM_LINES. With certain text objects, the user can change the style in the text editor, provided the text interface offers the corresponding menu functions. The system then stores the style together with the text.




RELATED POSTS

SAP SCRIPTS PART 6

CRM Middle ware System Architecture
CRM Middle ware Enhancement

No comments :

Post a Comment