Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Almost everyone knows that adding custom fields in SAP CRM is easy with the Easy Enhancement Workbench or Application Enhancement Tool. But there are some objects of the object model for business transaction which cannot be enhanced using EEWB. For such cases SAP provides an alternative enhancement option.
This Blog explains how the enhancement of the object models for business transaction using the extension with new nodes and relations and also tells how you can determine the assignment of an object to a handler class in the customizing of the object model for business transactions. 

This is the first part of the blog. Here we will create new relation to BTAdminH and its handler class. In the second part we will use this new relation in the Web UI in business transaction.

Step1: Create a Ztable with the following fields

Step2: Create a Structure with the following fields which will be used as communication structure

Step 3: Create a Table Type with the following structure. This will be used in the Web UI.

Step 4: Create another structure for Key fields as shown below.

Step 5:  To create new Relationship to the BTAdminH we have to do customization. The SPRO path is given below.

SPRO->Customer Relationship Management->CRM Cross-Application Components->Generic Interaction Layer/Object Layer->Component Specific Settings->Business Transactions->Extend Model for Business Transactions with New Nodes.

Note: The HANDLER CLASS column of the table frequently has no entry for an implementation class of an object, reason that the GenIL uses a generic procedure to determine the class name while generating an object instance for business transactions.For example object BTQuery1O, the implementation of the object will be CL_CRM_+ Query1O + _RUN_BTIL. 

Step 6: Now we will define two relationships. The SPRO Path is shown below.

SPRO->Customer Relationship Management->CRM Cross-Application Components->Generic Interaction Layer/Object Layer->Component Specific Settings->Business Transactions->Extend Model for Business Transactions with New Relations.

  1. BTAdminH to ZProdCatHSet              
  2. ZProdCatHSet to ZProdCatHAll

Step 7:  Define handler class for Business Transaction Model Nodes. The SPRO path is shown below.

SPRO->Customer Relationship Management->CRM Cross-Application Components->Generic Interaction Layer/Object Layer->Component Specific Settings->Business Transactions->Define Custom Handler Classes for Business Transactions Model Nodes.

Step 8: Create the Handler class for External Object ZProdCatHSet

Go to SE24 and create class ZCL_PRODCATHSET_RUN_BTIL having Super class CL_CRM_RUNTIME_BTIL.

Step 9: Redefine method IF_CRM_RUNTIME_BTIL~READ_ATTRIBUTES

Step 10: Create new handler Class for External Object ZPRODCATHA

Go to SE24 and create class ZCL_PRODCATHALL_RUN_BTIL having Super class CL_CRM_RUNTIME_BTIL.

Step 11: Redefine method IF_CRM_RUNTIME_BTIL~READ_ATTRIBUTES

Step 12: Maintain some entries into the Custom table to check the new relations.

Step 13: Test new relation

Go to t-Code genil_bol_browser and search for the Tele Sales 7299

Go to the children of BTOrderHeader. You will see the new relation BTHeaderProdSet.

Click on the children and you will get all Records for BTProdCatHAll shown below.

As you see the enhancement of the business transaction by extending it with new node and relation. Next blog we will incorporate the business transaction enhancement in the Web UI.

  • No labels