Thursday, September 29, 2016

Enhancements in SAP ABAP

Enhancements are the means by which we add our own/ modify existing functionality to SAP's standard business applications.


If you try to modify any SAP standard program, it will ask you for access key which you can get from SAP market place by requesting SAP.


But enhancements normally don’t require any special access key and can be implemented directly


There are 4 ways of doing enhancements in SAP:


1. User exits:
These are technically modifications. SAP provides many subroutine(s) with name USEREXIT_* (i.e ex: FORM USEREXIT_001 )


These are saved in many includes which can be found via SE80 >> Search for Package VMOD. These are also called as Form exits.


Custom coding can be done in the subroutine. But the main disadvantage of these exits are: It requires Access key and only SD module supports this kind of enhancements.


2. Customer exits:
Technically enhancements. Will not affect the source code of SAP program and hence no problem during upgrade. There are 3 kinds of Customer exits


a) Function exits:
Provided by means of FM's(Function modules) .The code for the function module is written by the developer. You are not writing the code directly in the function module, but in the 'Z' include that is implemented in the function module.


Ex: open any Function module EXIT_* in se37


Ex: EXIT_SAPMF02K_001. But in the SAPMF02K program you will see this as
CALL CUSTOMER-FUNCTION '001'
It will have a  Z include file, you can edit the file directly, no access key required.


b) Menu Exits:
Enhances the menu available in standard SAP program. Developer can add his/her own text and logic for the menu. Function codes for menu exits all start with "+".
  Format:  +CUS (additional item in GUI status)


c) Screen exits:
Used to enhance the screen, add elements in screen etc
Format:  CALL CUSTOMER-SUBSCREEN CUSTSCR2


3. BADI's:
Business Add-Ins may be simply defined as an object-oriented extension of the SAP enhancement technique. Multiple implementation for same BADI can be done as BADI supports encapsulation of data.


4. Enhancement Frameworks:
This is the new kind of enhancement technique provided by SAP. These provides some hooks or places where custom logic can be coded in the standard program.There are 2 kinds of Enhancement frameworks:
a) Implicit Enhancements are predefined by SAP at the beginning and end of includes, FM's etc.
You can see if implicit enh is available by going into editor and go to edit -> Enhancement Operations -> Show Implicit.


b) Explicit Enhancements are predefined enhancement sections by SAP. They can be implemented by going in the ABAP editor, get into the Enhancement Mode by clicking the spiral button, then, right click into the enhancement point you plan to implement and select Enhancement Implementation->Create. You will be asked a name and a description and after this you can simply add your code.
     1. Explicit Enhancement Point: If you have written code using enhacement point your custom code will be executed along with the standard code.
     2. Explicit Enhancement Section: If you have written code using enhancement section, only your custom code will be executed to replace the standard code. standard code will not be executed.

No comments:

Post a Comment

SAP giới thiệu mã hỗ trợ AI trong ngôn ngữ ABAP riêng của mình

SAP đã ra mắt một loạt tính năng mã hỗ trợ AI trong môi trường phát triển ứng dụng dựa trên đám mây của mình, đồng thời tham gia vào danh sá...