Ansicht
Dokumentation

SQ00TEXT_02 - Define Exceptions for Text Retrieval

SQ00TEXT_02 - Define Exceptions for Text Retrieval

General Material Data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

In this activity you can define exceptions and enhancements for text identification in SAP Query.

To understand more, here is a closer description of how texts are identified in the standard area:

The texts are identified over the classes CL_TEXT_IDENTIFIER or CL_HR_TEXT_IDENTIFIER and relayed to the SAP Query or other applications.

SAP Query automatically decides here which classes will be used. The class CL_HR_TEXT_IDENTIFIER (which takes HR-specific terms into account) is used for HR InfoSets, the class CL_TEXT_IDENTIFIER is used in all other cases.

You will find detailed information on the interface IF_TEXT_IDENTIFIER (automatic text identification in DDIC), which is implemented in the two classes specified, in the interface documentation:

The definition can be made in the following (business-related) cases:

  • Case A: You have defined fields yourself whereby the standard procedure as described above does not deliver results.
  • Case B: You want to define your own text identification for fields for which the standard procedure delivers texts. Meaning, in this case you override the standard procedure for text identification.
  • Case C: You want to define a text identification for a standard field for which the standard procedure does not deliver texts.

The technical realization of the exception definiton can take place in three different ways:

  • Define exception for text table/text field
In this case you define an exception that is valid for a specific field in a specific table.
  • Define exception for data element
In this case you define an exception that is valid for all fields that use a certain data element.
  • Define exception for domains
In this case you define an exception that is valid for all fields that use a certain domain.

There is a maintenance view in the Customizing activity for you to use for each of these three methods.

Besides the key fields (table, field, data element or domain) that you maintain independently of the type of exception definition, you must also make entries in the following fields:

  • Text table
In this field, enter the name of the text table with which the texts are to be identified.
  • Text field
In this field, enter the name of the text field (from the table given) with which the texts are to be identified.
If you do not make any entries in this field, the system automatically starts searching for a corresponding text field in the text table given.
  • Function module
If you want the texts to be identified over a function module, enter the name of a function module in this field.
Use the template TXID_TEXT_IDENTIFIER_ TEMPLATE to copy from when creating your own function module. Follow the procedure given in the template when implementing the function module. See the function modules delivered by SAP as an example. You can find these in the SAP exception tables TEXC_FLD, TEXC_DE, TEXC_DOM (SAP exception definitions for text identification).

Note on the fields text table/text field/function module:
As you can either carry out text identification using text table/text field or a function module, you can only use one of these two options each time you define an exception (see also examples).

  • Priority (mandatory entry)
In this field you define when the exception (independently of existing check tables, text tables, domain fixed values or other text sources) is used. You can choose between the following priorities:
  • Always use (Default)

The exception is always used.
  • Use if neither domain fixed value nor check table exists)

In this case, the system first checks if a check table exists or if domain fixed values can be used for text identification. The exception is only used if neither a check table nor a domain fixed value can be used.
  • Use if no text source is found

In this case, the system first checks if a check table, domain fixed values or a value table can be used for text identification. Only if this is not the case will the exception be used.

Notes on field priority:
If in doubt, always use the default value Always use. The other two values only help in certain cases.

  • Specific class
This field can help you control for which of the two classes CL_TEXT_IDENTIFIER or CL_HR_TEXT_IDENTIFIER the exception will apply to. Alternatively, you can enter other classes here that implement the interface IF_TEXT_IDENTIFIER.
At current release state, the entries should correspond to the following logic:
  • You want to define exceptions for InfoSets from HR:
    In this case, enter the class CL_HR_TEXT_IDENTIFIER in the field Specific class. Your exception will only work when you execute SAP Query if you make this entry, as this is the exact class that will be called up for HR InfoSets in SAP Query.

  • You want to define exceptions for InfoSets for other applications:
    In this case, you must not make an entry in the field Specific class, the exception is then used for the general class CL_TEXT_IDENTIFIER.

  • If you have defined your own class that implemented the interface IF_TEXT_IDENTIFIER, enter this class in the field shown.

Example 1 (exception for table/field using table/field, not HR)

Table: Tnnn
Field: Fnnn
Text table: Tmmm
Text field: Fmmm
Function module: (SPACE)
Priority: Always use
Specific class: (SPACE)

In this example, the field Fnnn in the table Tnnn is set to be provided with texts from the field Fmmm of table Tmmm. The exception is always carried out.

Example 2: (Exception for table/field using FB, HR)

Table: Tnnn
Field: Fnnn
Text table: (SPACE)
Text field: (SPACE)
Function module: TXID_TEXT_IDENTIFIER_nnnn
Priority: Always use
Specific class: CL_HR_TEXT_IDENTIFIER

In this example, the field Fnnn in the table Tnnn is set to be provided with texts from the function module TXID_TEXT_IDENTIFIER_nnnn The exception is always carried out.

Example 3: (Exception for data element using FB, not HR)

Data element: Dnnn
Text table: Tmmm
Text field: Fmmm
Function module: (SPACE)
Priority: Always use
Specific class: (SPACE)

In this example, the data element Dnnn is set to be provided with texts from the field Fmmm of table Tmmm. The exception is always carried out.

  1. Navigate to the view you want (exception for table/field, data element or domain)
  2. Make your entries according to the field documentation and examples above.
  3. Save your entries.





SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 8038 Date: 20240523 Time: 155447     sap01-206 ( 116 ms )