SAP SCRIPT 6

LAYOUT SET FOR FORMATTING OUTPUT

A style determines only the paragraph and character formats. To layout the individual print pages, you define layout sets in SAPscript. You can also specify paragraph and character formats in layout sets. If no style is allocated to a text, the system uses the paragraph or character formats defined in the layout set under the same names. If no layout set is allocated to a text, the system automatically uses the layout set SYSTEM.The layout set is stored in the text header in field TDFORM. When initializing the text using INIT_TEXT, the system copies the default value from the corresponding field in table TTXOB into the text header. After initializing or reading a text, you can change the layout set by entering another layout set into the text header. If you want to allocate a layout set for printing only, simply specify the layout set in the text header before calling the function module PRINT_TEXT. With certain text objects, the user can change the layout set in the text editor, provided the text interface offers the corresponding menu functions. The system then stores the layout set together with the text.
A layout set specified in the text header is used only if you format a text directly from within the editor or print it using the function module PRINT_TEXT. If you pass a text to the function module WRITE_FORM_LINES, the system ignores the layout set specified in the text header and uses the layout set opened with OPEN_FORM or START_FORM instead.

INCLUDE TEXTS

To include the contents of one text into another, use the statement INCLUDE. The SAPscript composer then includes the second text when processing the first. To specify the text to be included, you must enter the text name with the INCLUDE statement. Entering the text object, the text ID, and the text language is optional. If you omit these entries, the system uses defaults. These defaults are described in the documentation of the SAPscript statement INCLUDE.
The default for the text ID is stored in the field TDID of table TTXID. If the table does not contain an entry here, the system takes the ID of the text that contains the INCLUDE statement.

***************STRUCTURE OF THE TEXTKEY

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 KNA10000000012 0002
Customer 0000000012 Marketing note KNA10000000012 0003
Customer 0000000012 Sales note KNA1 0000000012 0001
Vendor 0000000012 Accounting note LNA1 0000000014 0001
Since the R/3 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 note LNA1 0000000014 0001 D
Vendor 0000000012
Accounting note LNA1 0000000014 0001 E
All texts are stored with the respective client. Thus, the client in also part of the text key. 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 Goto Header 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 text object specified must be defined in 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).

***************



RELATED POSTS

SAP SCRIPTS PART 7

CRM Middle ware Data Flow 
CRM Middle ware Modelling 
CRM Adapter Overview 
CRM Software Logistics and support

1 comment :