Application Enhancement Tool can be used for both Field and Table Enhancement. Recently We had a requirement in my project to enable AET for a Table .This blog would explain on how AET can be used for Table Enhancement.
Field Enhancement : AET Tool can be used to create,update and delete fields in the table that does not belong to standard Delivery.
Table Enhancement : AET Can be used to create,update and delete tables that does not belong to standard delivery , the same table can be linked with an existing table via Parent ID . This table can be made available in the CRM WEB UI as an Assignment Block or in Form View.
There is a Relationship Table which maintains the relationship between the entities .For example we have a Case and Person as two entities and the different relationships can be created between these two entities .For Example : Person can be related as Suspect to a case , or as an Victim.
The requirement was to enable AET for this relationship Table , so that customer can maintain there own fields in a new table and link with this relationship Table.
Customer should be able to create , update and delete entries in this new table from UI .
1) Enabling AET for a Table
Call transaction AXTREG and create the Table Enhancement Place and also mention the required details like Application Group and the Parent ID .
Parent ID Data Element will be same as the Key field in the Parent Table.
Next step is to mention the Parent Business Object under which Extension BO will be created .
In the Transaction AXTREG , under Enhanced Business Objects select the Enhanced Business Object and the the part of Enhanced BO under which Enhancement place will be included
Specify the Table Enhancement Place which was created in first step and also Select New Extensions allowed .
2) Creation of Extension Tables From UI
Steps to make Configuration Active
First Enable the Configuration from Personalize settings from the Web UI
Now go to the page from where Enhanced BO will be called ( For which Table Enhancement Place is added ) and select configuration from left Upper corner as shown below.
Then Select the particular Block and Display the enhancements .
From here , you can create a table and this will generate all the Extension BO's with the structure of Table mentioned by the user.
Table Created is as show below
Once we Create Table from UI , this will also generate the View under the UI Component which is mentioned while creating.
View will have Context node referring the Extension BO Object .
3) Enhance the Genil Class to show the Extension Bo's in BOL Model Brower.
Next step is to Enhance the Genil Class to show the Extension Bo's which will be created under this root Object.
Below Code can be put in the Get_model Method of Genil class of Parent Object