Enhance ABAP Business Objects Without Modification

  • by Saif ur Rehman, SAP ABAP Team Lead, DESCON Engineering Limited
  • June 12, 2012
Enhance standard business objects so that you can customize them to your requirements without creating new business objects or modifying the standard business object. You can develop the standard business object’s method to fulfill additional requirements such as adding related standard or custom fields.
Key Concept

A business object is the interpretation of a real-time entity in an object-oriented way. Examples of business objects are materials, inspection lots, sales orders, and purchase orders. A business object has both attributes and methods. Attributes are the characteristics of business objects. For example, Inspection Lot (BUS2045) contains attributes such as inspection lot number, plant, and item. Methods are the actions that the business object can perform. For example, Inspection Lot (BUS2045) encapsulates methods such as Create, Edit, and GetDetail.

Business objects are frequently used in workflow and interfaces with non-SAP applications. In either case, you mostly create a new business object to fulfill a requirement for a particular business process. For example, with custom fields of the material master, no method is available in the business object of material BUS1001 to either get or set the custom fields. In such situations, you create a new custom business object to cater to these requirements­. Creating new business objects has the risks of low performance and continued maintenance. To overcome these problems, the solution is to enhance the standard business object to fulfill specific requirements, resulting in fewer performance and maintenance risks.

You need to enhance two sections to improve a business object’s method: the parameter enhancement and the source code enhancement. Methods are events of the business object that are performed based on the business need. Methods are used for either data manipulation or data modification. Methods for data manipulation provide the attribute values after performing a certain procedure. Methods for data modification either create or change the attribute values as per the requirements. With data manipulation, the parameter enhancement requires you to improve the structure used in either exporting or changing the parameter. You can enhance the structure by customizing includes or appending structures. The source code enhancement is implemented by an implicit enhancement. With data modification, the difference from data manipulation is that the import parameter is used instead of the export parameter. The remaining parameter and source code enhancements remain the same.

Here are two examples of enhancing a standard business object:

  • Example 1: For the standard business object Inspection Lot (BUS2045), the business process needs information related to the material, then the standard business object’s method is developed to provide additional information without creating a new business object. In this example, you need customizing includes and an implicit enhancement that are implemented to cater to these requirements.
  • Example 2: For the standard business object of material BUS1001, the additional information of material group standard and custom fields is required by the user, and then the standard business object’s method is enhanced to cater to these requirements. In this example, an append structure and implicit enhancement are used to fulfill the business process.

I now show you how to implement these two examples. Before you implement these enhancements in the business object, however, you must have knowledge of ABAP, including the ABAP Data Dictionary, function modules, and business objects.

Saif ur Rehman

Saif ur Rehman is an SAP ABAP team lead at DESCON Engineering Limited in Pakistan. He has more than five years of SAP experience. He has an MS degree in computer science and has worked in industries such as FMCG, health, beverages, and telecommunications. Formerly, he worked at PepsiCo Inc. and Pakistan Telecommunication. To contact the editor, click here

See more by this author


No comments have been submitted on this article. 

Please log in to post a comment.

To learn more about subscription access to premium content, click here.