Showing posts with label Enhancements. Show all posts
Showing posts with label Enhancements. Show all posts

Friday, July 20, 2018

AET tips


How to generate(or regenerate) AET extension which was in error?
Go to tcode AXTSHOW and give extension and click on regenerate

How to modify AET field ?
AXT_EXT_PART_DTL  (Table) - In this table, you can modify field name (or properties) and then regenerate using tcode AXTSHOW. 
Note: If you change field name, then a new field will be created, then make sure u delete the old field from appropriate structures (like CI_EXTBUT000, CI_EXTBUT000_X etc).. Also, delete entries in Transport for old field name.

Wednesday, August 10, 2016

New fields for Output control – User exits

New fields for Output control – User exits

https://scn.sap.com/thread/242281

Can be sued for Picklist group output etc..

Thursday, June 16, 2016

How to find User exits for a tcode


Link to find SMOD Enhancements (User exits) for a tcode
http://scn.sap.com/community/erp/manufacturing-pp/blog/2012/11/07/how-to-find-user-exit-for-any-t-code

Wednesday, June 15, 2016

Add custom fields to Material Master - MM01

How to add custom fields to Material Master - MM01/2  - and in MARA (Append structure)


http://scn.sap.com/docs/DOC-47544
http://scn.sap.com/community/abap/blog/2015/03/06/additional-fields-on-the-material-master

Tuesday, March 8, 2016

Idoc user exits - fetch item number from parent segment

 
Demo code for Idoc (EDI) user exits, where you don’t get item number in all segments.  This shows how to fetch item number from Parent segment (E1EDP01 in this case).
 
E1EDPA1 (Partner function segment in ORDERS idoc) does NOT have item number in it, So fetch from parent E1EDP01 (Item details) segment. To do that, write LOOP with  segnam = E1EDP01 or E1EDPA1 – demo code is shown below.
 
    LOOP AT int_edidd ASSIGNING <fs_edidd> WHERE segnam 'E1EDP01'
                                             
OR  segnam 'E1EDPA1'.

      
IF <fs_edidd>-segnam 'E1EDP01'.
        
CLEAR ls_e1edp01,
                lv_ebelp
.
        ls_e1edp01 
<fs_edidd>-sdata.
        lv_ebelp   
=  ls_e1edp01-posex.
        
CONTINUE.
      
ENDIF.

      
CLEARls_e1edpa1.
      
CHECK  <fs_edidd>-sdata+0(2) = 'WE'.
      ls_e1edpa1 
<fs_edidd>-sdata.

      
REFRESHlt_po_del_addr[].
*     Get  PO del address
      
CALL FUNCTION 'BAPI_PO_GETDETAIL1'
        
EXPORTING
          PURCHASEORDER    
xekko-ebeln
          DELIVERY_ADDRESS 
'X'
        
TABLES
          POADDRDELIVERY   
lt_po_del_addr.

*     Get Item PO delivery address
      
CLEARls_po_del_addr.
      
READ TABLE lt_po_del_addr INTO ls_po_del_addr WITH KEY po_item lv_ebelp.
      
IF sy-subrc EQ 0.
        ls_e1edpa1
-strs2 ls_po_del_addr-str_suppl3.
        ls_e1edpa1
-pfach ls_po_del_addr-location.
        <fs_edidd>
-sdata ls_e1edpa1.
      
ENDIF.
    
ENDLOOP.
 

Thursday, August 14, 2014

AET Tips - CRM


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.

Wednesday, April 2, 2014

BTE events - FI userexit functions


Transaction codes for BTE are:
FIBF Maintenance BTE
BERE Business Event Repository
BERP Business Processes
BF31 Application modules per Event
BF32 Partner Modules per Event
BF34 Customer Modules per Event
BF41 Application Modules per Process
BF42 Partner Modules per Process
BF44 Customer Modules per Process