Extending Data Structures

Basically, modern applications based on the ProFramework are based on so-called business objects, which represent an SAP standard or a ProNovia object. The business objects are part of the ProNovia ObjectLib or other ProNovia products.
The integration of business objects is done in ProFramework with the help of so called Object Handlers. These object handlers provide all functionalities (functions, commands, drag'n'drop, etc.) for a specific object type and make the concrete single object available as a business object.
Business objects can be easily extended with their own logic using the BAdI /PCH/BO, for example to:

  • check authorizations

  • validate data

  • change data before saving

  • execute own actions after saving

  • override metadata (e.g. changeability of fields)

  • protect objects against modification or deletion

For almost every business object an additional type specific interface (/PCH/IF_BADI_BO_OBJ_[...]) is available, which can be additionally implemented in the implementation class. These interfaces contain depending upon object further methods around still more precisely to be able to intervene.

The implementation of an extension for a business object should basically be independent of ProFramework, since business objects can also be used in other applications.

The business objects partially work only with a subset of the data provided by the SAP standard. In particular, business objects do not manage customer-specific fields that have been added to the corresponding main tables using append structures. However, it is possible to add additional fields to business objects through simple structure extensions. Basically, the business objects work with a pair of structures (sometimes with 2 pairs). One structure is used for the external representation with speaking field names, while a second structure has the same fields (in exactly the same order) with internal names of the SAP table. These tables basically have the following naming scheme and can be viewed in the view cluster /PCH/OBJ_TYPES (callable with transaction SM34):

  • /PCH/BO_<OBJECT_TYPE>_MAIN_DATA, structure with external field names

  • /PCH/BO_<OBJECT_TYPE>_DB_MAIN_DATA, structure with internal field names according to SAP table

For business objects with a lot of data (e.g. material) there is a second pair of structures (extended data). With the first structure pair only the most important basic data are administered, in order to improve the performance when reading. Consequently, the second structure pair contains all further data. An extension is possible in both structure pairs. Which pair is extended, however, depends to a large extent on the application. If the data is simply to be displayed additionally, e.g. in an interface, then the fields are to be added in the extended structure pair. But if the data is needed e.g. for very central accesses (authorization checks, formulas, etc.), the field should be added in the main pair. The extended structure pair has the following schema, but can also be looked up in the definition:

  • /PCH/BO_<OBJECT_TYPE>_EXT_DATA

  • /PCH/BO_<OBJECT_TYPE>_DB_EXT_DATA

A complete overview of BAdI methods and extension interfaces is available in the ProObjectLib Integration & Enhancement manual.



© ProNovia AG | Imprint | Data Protection