9.4 Text Control II: Automatic Text Transfer, Text Determination Analysis, and Special Features
Key Takeaways
Automatic text transfer requires an access sequence assigned to the text type in the text determination procedure; the access sequence searches text objects and text types in sequence.
Accesses in a text access sequence are exclusive: the first text that meets the requirements is copied and later accesses are skipped; after changes, the accesses must be generated in VOTXN (Texts, Generate access).
Text objects VBBK and VBBP in an access always refer to the directly preceding document, so a text cannot be copied directly from an inquiry into an order created from a quotation.
For delivery-related billing, the Text Delivery indicator in the billing type decides whether texts are copied from the delivery or from the underlying sales order.
A referenced text exists only once and changes with the source until the user edits it; a duplicated text is stored separately; the Text is mandatory setting controls display during transfer and incompleteness (procedures 50 and 51).
Text Control II: Automatic Text Transfer, Text Determination Analysis, and Special Features
Entering texts manually (section 9.3) is only half of text control. Important information is often already stored elsewhere, in a quotation, a customer master record, or a material master record, and should be copied into the sales order automatically, either to inform the order processor or, if the text is printed, the recipient of the output. This section covers the automatic transfer and the special features of the S46056 course.
Automatic Text Transfer with Access Sequences
The course gives two typical examples:
- The text of a text type in a standard order is copied automatically from the underlying quotation.
- A text is copied automatically from the customer master of the sold-to party or from the material master record of the sold material.
To enable automatic transfer to a text type, an access sequence must be assigned to the text type in the relevant text determination procedure.
The Access Sequence
An access sequence is a search strategy for texts. It has at least one, usually several, accesses, processed one after another. In each access, you define in which text object and which text type the system searches for the text to be transferred. You can also define requirements, in particular the language of the text, and partner roles and conditions:
- If a text that meets the requirements exists, it is transferred to the calling text type.
- If not, the next access runs. It might search the same text object and text type in a different language, a different text type of the same object, or a text type of a different object.
The accesses are exclusive: as soon as one access finds a suitable text, it is transferred and the remaining accesses are not executed.
After creating or changing an access sequence, generate the accesses after saving, in transaction VOTXN with the menu path Texts → Generate access.
Permitted Text Objects
An access can only read certain text objects, the permitted text objects. Examples include the sales document header and item of the preceding document, customer master texts, material master texts, and standard texts.
One Access Sequence, Several Text Types
An access sequence can be assigned to one or several text types in the text determination procedure. For each of them, it procures text from the text objects and text types of its accesses within the defined requirements.
Copying from the Directly Preceding Document
The text objects VBBK and VBBP in an access always refer to the directly preceding document. The course example:
- Inquiry: its procedure contains text type
0001Form Header with an access sequence whose first access readsVBBKtext type0001from the preceding document. The inquiry has no preceding document, so no text is found and the processor enters the header text manually. To avoid an unnecessary access (which costs performance), you can add condition1Reference doc. header to that access. - Quotation created with reference to the inquiry: the same procedure copies the
0001text from the inquiry. - Sales order created with reference to the quotation: a procedure with a
VBBKaccess copies the text from the quotation.
It is not possible to copy a text directly from the inquiry into the order, because the quotation, not the inquiry, is the order's direct preceding document.
Text Source for Billing Documents
In delivery-related billing, the direct preceding document of the invoice is the delivery. You can nevertheless copy texts from the underlying sales order. In Customizing of the billing type, the Text Delivery indicator selects the preceding document for text objects VBBK and VBBP, for all text types of the billing document:
- Selected: texts are copied from the outbound delivery.
- Not selected: texts are copied from the underlying sales order, even though the invoice refers to the delivery.
Analyzing Text Sources: The Text Determination Analysis
You can analyze where the texts in a sales document came from, or why a transfer failed. In the sales document, choose Goto → Header (or Item) → Texts, then the Display log button. The analysis shows each text type, the accesses tried, and their results. With the relevant authorizations, you can jump from the analysis directly to text control Customizing. The course simulation tests the configuration this way: a quotation header text is entered, an order is created with reference, and the copied text and its log are checked.
Referencing or Duplicating Texts
If a text type can be copied (an access sequence is assigned), you define in the text determination procedure whether the text is referenced or duplicated from the source:
| Option | Database | Effect of Changes |
|---|---|---|
| Duplicate | The copied text is stored as its own record | Source and copy are independent; either can change without affecting the other. Needs more storage, so use it only when functionally required. |
| Reference | The text exists only once | If the source changes, the referenced text changes too. If the user changes the text in the document, the system duplicates it automatically, and from then on source changes no longer affect it. |
The Setting "Text Is Mandatory or Should Be Displayed"
For each text type in the procedure, this field controls two behaviors:
- Whether a transferred text is displayed during the transfer. If so, a dialog box shows the text on the overview screen during document processing, and it can be edited there.
- Whether a text for this text type is mandatory for the incompleteness check. If a mandatory text type receives no text, by transfer or manual entry, the document is incomplete.
The hard-coded incompleteness procedures 50 and 51 for texts can only be maintained with view V_TVUVF in transaction SM31; SAP Note 385982 gives the details.
Data Transfer Routines for Texts
If the standard accesses are not enough, you can create data transfer routines for texts with transaction VOFM (Maintain: Requirements & Formulas). A routine formulates requirements for the text transfer in ABAP and is assigned to an access in an access sequence. The customer namespace for text routines is 50-99 (two-character keys); the delivered sample routines 1 (Exit sample) and 2 (Exit sample 2) describe the available data structures.
Course Example: Routine 91
Routine 91 reads a standard text from text object TEXT, text ID SDVD, with the name ZMAT:*, where * is replaced by the material number of the item. If material P650-100 is sold, the system looks for the standard text ZMAT:P650-100. Prerequisites are an access sequence with an access to object TEXT and text ID SDVD, the routine assigned in that access, and the standard texts, which are maintained with transaction SO10.
Worked Example: Copying the Quotation Note into the Order
Requirement: the customer note entered in a quotation header should appear automatically in the order and must be shown to the order processor; orders without a customer note are not allowed.
- In the order header procedure, assign an access sequence to text type
0002Header Note 1. Its first access reads text objectVBBK, text type0002, in the document language; a second access tries the same text in English. - Generate the accesses in
VOTXN. - Set the text type to reference the text (no extra storage) and set Text is mandatory or should be displayed so that it is displayed during transfer and required for completeness.
- Test: create a quotation with a note, then an order with reference. The note appears in a dialog box and is copied; the text determination log shows the successful first access. An order created without reference has no note and is incomplete until a note is entered.
An inquiry, a quotation created from it, and a sales order created from the quotation all use a header text type with an access to text object VBBK. From which document does the sales order copy the header text?
From both documents, which are combined into one text
From the inquiry, because it is the first document in the chain
From the customer master of the sold-to party
From the quotation, the directly preceding document
In an invoice created with reference to a delivery, the header texts should come from the sales order rather than from the delivery. Which setting achieves this?
Leave the Text Delivery indicator in the billing type unselected
Set the reference option in the billing type's text procedure
Assign the text determination procedure to the delivery item category
Create a data transfer routine in the 50-99 namespace
A text type copies its text by reference from the source document. What happens when the user edits the copied text in the follow-on document?
The source text in the preceding document is changed as well.
The change is rejected because referenced texts are read-only.
The text is duplicated, so source changes no longer affect it.
The text determination log of the document is deleted.
Sections you finish are checked off in the contents.