
SAPscript texts are usually allocated to an object from an SAP application. For example, there are texts on customers, vendors, and materials. To see immediately to which application object a text belongs, the text name should correspond to the respective object name.
|
Text name |
|
|---|---|
|
Customer 0000000012 |
0000000012 |
|
Customer 0000000007 |
0000000007 |
|
Vendor 0000000014 |
0000000014 |
As long as the names of customers differ from the names of vendors, no problems can occur. However, since this is not the case, you need another attribute in the text key to make the allocation unique: the text object. The text object links a text directly to the corresponding application object.
|
Text Object |
Text name |
|
|---|---|---|
|
Customer 0000000012 |
KNA1 |
0000000012 |
|
Vendor 0000000012 |
LNA1 |
0000000012 |
In most cases, one text to describe an application object is not enough. For customers, you may need texts for the accounts department, for the marketing department, and for the sales department. To identify these different types of texts, you use the text ID. The text ID, thus, is an attribute for distinguishing texts within one text object.
|
Text Object |
Text name |
Text ID |
|
|---|---|---|---|
|
Customer 0000000012 Accounting note |
KNA1 |
0000000012 |
0002 |
|
Customer 0000000012 Marketing note |
KNA1 |
0000000012 |
0003 |
|
Customer 0000000012 Sales note |
KNA1 |
0000000012 |
0001 |
|
Vendor 0000000012 Accounting note |
LNA1 |
0000000014 |
0001 |
Since the SAP system is a multi-lingual system, these different texts, moreover, can appear in different languages. This makes the language ID another integral part of the text key:
|
Text Object |
Text name |
Text ID |
Text language |
|
|---|---|---|---|---|
|
Customer 0000000012 Accounting note |
KNA1 |
0000000012 |
0002 |
D |
|
Customer 0000000012 Accounting note |
KNA1 |
0000000012 |
0002 |
E |
|
Customer 0000000012 Marketing note |
KNA1 |
0000000012 |
0003 |
D |
|
Customer 0000000012 Marketing note |
KNA1 |
0000000012 |
0003 |
F |
|
Customer 0000000012 Sales note |
KNA1 |
0000000012 |
0001 |
E |
|
Vendor 0000000012 Accounting notes |
LNA1 |
0000000014 |
0001 |
D |
|
Vendor 0000000012 Accounting notes |
LNA1 |
0000000014 |
0001 |
E |
All texts are stored with the respective client. The complete text key now consists of the following components:
|
Type |
Length |
Table field for Like definition |
|
|---|---|---|---|
|
Client |
CLNT |
3 |
THEAD-MANDT |
|
Text Object |
CHAR |
10 |
THEAD-TDOBJECT |
|
Text name |
CHAR |
70 |
THEAD-TDNAME |
|
Text ID |
CHAR |
4 |
THEAD-TDID |
|
Text language |
LANG |
1 |
THEAD-TDSPRAS |
To find out the key of a text, in the SAPscript text editor choose to display the text header. A dialog box appears that contains the key components of the current text and other information.
The SAPscript function interface checks whether the key fields passed contain valid values:
Text object:
The specified text object must be defined in the table TTXOB.
Text ID:
The text ID specified must be defined in table TTXID together with the specified text object.
Text language:
The language specified must be defined in table T002.
Text name:
The text name specified must not contain the characters ',' (comma) and '*' (asterisk).