http://scn.sap.com/community/crm/webclient-ui-framework/blog/2012/11/24/the-new-aet-table-extension-feature-of-ehp1-creating-your-own-components
Nice blog by Suchita in SCN
Pre-requisite before doing AET Table extension: Go to transaction AXTSYS and name the component you would like to be created. AET will create a Z component with this name and will add all your Z views created using AET to this component, unless, you change to other component in this transaction.
Doing AET Table extension:
1) Start the WEB UI and navigate to the overview page on which you want your custom Z component based view as a new "Assignment Block".
2) Use the "Configure" button and choose the Header View from the views grayed out on Overview page . The view config tool opens in a pop-up. Select "Display Enhancements" button. A new popup opens which display the existing enhancements.
3) Simply use ADD TABLE button and follow the wizard. In the very first step itsef, AET tells you what will be the name on Z table and also ask you the window/view name (it is a technical name and not the assignment block title) you would like for the new view.
4) You can define whether you want Form view ( 1:1 cardinality) or Table view ( 1:n cardinality ) within the wizard itself.
5) When you complete defining your requirements and adding fields to the AET table, and say "Save and Generate", AET will take all care to give you what you want.You see the new Assignment block on the Overviewpage unsed "Available blocks". You just need to pull it in "Displayed Blocks" and your new assignment block based on a ZTABLE is ready for use. You can edit it, add values and ht save and record ets created in the ZTABLE. You can change the values , delete the values and record in table gets modified on its own. You dont need to write a single code to care edit/update/delete etc. What all AET gives you in this development is listed below:
- You get the Z COMPONENT created automatically with the name you specified in transaction AXTSYS.
- You get the view and related windows created with the name you specified during AET (AET adds _MAIN to the window name you give during AET to generate your view name. For ex. if you gave name as MYVIEW during AET, then in component you find a Window with name MYVIEW and the view with name MYVIEW_MAIN)
- You also get RUNTIME REPOSITORY in a ready to use state, meaning, you don't need to do any view and window assignments here.
- You get the ZTABLE ready in Data dictionary with AET given name with all Z fields you defined during AET
- The Ztable fields have auto-generated name and auto-generated data elements based on information you gave to AET during table-fields creation
- The data elements get auto-generated domains and if you have specified checktables, dropdown values etc during AET, then you can see those value table assignments in the domain.
- Further, if you go to GENIL_MODEL_BROWSER and open the root/access object of your overview page model set (ONEORDER for sales.service etc documents and BP_ALL for accounts and related documents. for ex if i started AET to add a ZTABLE based view as assignment block on Service order header, then my root is BTORDER and Access is BTADMINH) , you can see a Z BOL object created for you and related to the access object via Z-relation
- You get Function module ready to read the record from your Zview and also the function modules to work upon them, in case you need to read your view data in some BADI or Actions.
So in my view, with the AET table extension, SAP has given a great relief to UI developers from complex and time-consuming task of own Genil and BOL developments . However, the AET tool is not all PERFECT and you must take precautions while using it.
Things to Remember before and during you do AET TABLE Enhancements :
0) AET Table exention invlives both customizing and workbench tasks hence you should do AET on the client with allows you both. If is better to ask BASIS person which client they have decided for AET developments. If your customizing clinet does not allow workbench changes, then better start on workbench client. Ideally you should start on customizing client and it should be allowed to have workbench changes in this customizing client. Do inform Basis person about this if he is not aware.
1) You must be well prepared with what you want. It is a good idea to have an excel sheet where you have already written what fields of what data type and length, will it be a dropdown or search help ? and if so have the search help table ready in dictionary before you start. Same is applicable for check table related fields.
2) You can not change the field's data type and length once it is created and generated by AET.
3) Once AET is generated, all you can change for an existing field is its Description and rendering for search/check table fields.
4) You can add/remove/update dropdown list values anytime
5) You can add more fields or remove fields from your Z AET table extension anytime but avoid deleting the fields as you may experience lot of inconsistencies and mess if your field is getting used somewhere and you delete it from AET. This will directly dump on the system and it is difficult to find why the dump occurs if others don't know the background of your work.
6) Be extremely cautious during deleting fields if your AET generated view fields are used in BRF+ business rules or used in a view configurations. System will straightly dump during generation and onwards untill you fix the inconsistencies.
7) If AET generation fails, go to transaction AXTSHOW and investigate your extension for each element there to see where it is red light and what has failed. for example, if the AET table was locked in some other request and you try to add the new field then its an issue if your landscape follow separate customizing and workbench clients.AET generation fails in tis case and you need to release the transport that locks the object and Re-generate the AET.
8) Though everything you get with AET table extension is in Z space, do not change the fields directly in ZTABLE or do not change domains, data element properties directly in SE11. It will give lot of inconsistencies even though SE11 and SE14 activation is successful. Always use the AET tool only to work upon anything generated by AET.
9) Do not change anything or try to modify the things in Z function modules AET generated for your component. If you need any special behaviors, then create your Z utility class and handle it in a custom method there with BOL programming & ABAP.