CL_CHR_MAIN - Characteristics: Process, Check, Save

ROGBILLS - Synchronize billing plans   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Functionality

This class covers the entire processing logic for characteristics (for exceptions see below).

As a key, either the characteristic name or the internal key can be used everywhere. To match the data format, it is more convenient to use the external key.

The format of the interfaces and the entire processing is based on API format (butwith, for example, counters for values instead of VALUE_BEF). All the fields have the same names asin API format. In the basic data, check tables and check function modules have been added, and for thevalues, the explicit entries for subordinate and superior value are replaced by counters. The countershows the sequence of values and must be assigned consecutively (counter = SY-TABIX). In this class,with a few exceptions, no engineering change management logic is executed. Both reading of data and creation of relevant data records in internal format is executed in separate function groups.

There can be only one instance of a characteristic (which you can get using Get_Instance). This means that a characteristic can only ever be processed with one validity or one engineering change order.

The modifying methods make all the relevant checks. In case of errors, messages arecreated in the system variables (or displayed if the exceptions are not caught). If using API or BAPI, a message is also written to the log (object CAPI, subobject CAPI_LOG).

In addition to Create, Change, and Delete, there are also methods that change parts of a characteristic(descriptions, values, and value descriptions). These methods start with SET and REMOVE. If these methodsare used, no checks need to be made on unchanged data areas. However, there is no method for changingbasic data. Such a change requires a check to see whether values match the new format, so the Change method can be used.

Long text and dependencies can only be processed with their own methods, not by using Create or Change.

With dependencies, you must remember that the basic function modules are not object oriented. This means that the following restricutions apply:

  • The Init method also calls the Init API for dependencies. This API undoes all changes, including changes to other characteristic instances!
  • All characteristic instances that change dependencies must be processedwith the same change number (or all without a change number)! Otherwise, the dependency APIs are initialized again (see above).

The check methods are public, so that it is also possible to use the check methodsonly, and call the change method once before saving. Because of interdependencies between the checks,when a change method is called all checks are executed again. For this reason it tends to be easier to call the change method immediately, instead of the check method.

All changes made are saved by using method Post or removed by using method Init.

Overwrite is fully supported. To do this, the constructor needs only the name, class,and class type. Existing events can be used to process overwrite keys that have been created or removed.All entries in fields that are not changed by the overwrite are ignored. This means that an overwrite only needs to transfer the fields actually being changed. Everything else is derived from the original characteristic.

Functions of old characteristics management that are not supported:

  • Headings are no longer supported in old characteristics either. If a characteristic has headings and is changed with the new characteristics management functions, the headings are lost.
  • Data formats ADT, BOOL (used by IPC only)
  • Entry of numeric templates (to remove thousand separators): You can use customer-specific methods to set or delete thousand separators, so this is not a restriction in practice.
  • Conversion exit, if the characteristic is not a reference characteristic and does not have a check table.
  • Reference characteristic with allowed values
  • Value SPACE
  • Exotic indicators: aggregating, balance, ATAME, ATWME, restrictable, entry required,conf., ATTEI, ATHIE, ATFGA, ATYAC, ATWSO, ATBSO, ATWRI, selected set, catalog, ATHKA, ATHKO, tolerance, ATZUS, ATVPL.
  • Classification of characteristics and characteristic values. The classificationof characteristics is merely superfluous, but the classification of characteristic values causes problems:OBJEK consists of ATINN (which is system specific and therefore cannot be distributed) and ATWRT (in user-specific format, not global format).

Relationships

Class CL_CHR_MAIN uses the following function modules:

  • Function modules of function group CLSE for database accesses and database buffering.
  • Function group CTVB for posting, as in old characteristics management (BUS1088_DATABASE_UPDATE).
  • Old engineering change management, dependencies (see above for information on the problems) and long text are also connected by using function modules.

Class CL_CHR_MAIN uses the following additional classes:

  • CL_CHR_CONST contains all the usual constants in characteristics management.
  • CL_CACL_CONTROL controls whether processing is in the foreground or the background - in other words, whether messages are written to the log and whether the template is handled in global format.
  • CL_CHR_CONVERSION provides all conversions between internal format and processing format.
  • CL_CACL_MESSAGE writes messages to the log. This class cannot be used to display messages, because this would cause problems for OO processing.
  • CL_CHR_SERVICE provides services that are used both for processing and on the user interface, such as the determination of format data from a table field.
  • CL_CHR_STACK offers the option of implementing an "undo" function with a specified number of levels from the user interface.
  • CL_CHR_TEMPLATE provides all template checks and template generation.
  • CL_CACL_VALUEFORMAT is the interface for connection to function group CTCV with instantiation and buffering. This class represents value checks and conversion.
  • CL_CLS_MAIN is the OO class of class management, used in overwrite.

These classes replace the following function groups:

  • CTMV: Characteristics processing.
  • CTUT: Buffer between CLSE and CTMV, various checks (for example, use).
  • CALO, STAP: Log for ALE/ API/ BAPI.

Example

Notes

Further information



General Material Data   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.


Length: 7781 Date: 20120526 Time: 100240     triton ( 363 ms )