26
Generated by Jive on 2013-10-03+02:00 1 Enhancement in SAP Enhancement (an improvement that makes something more agreeable) The R/3 Enhancement concept allows us to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates enhancements for specific programs, screens, and menus within standard R/3 applications. These enhancements do not contain any functionality. Instead, the enhancements act as hooks where WE can HANG our own add-on functionality onto these hooks. Advantages 1. They do not affect standard SAP source Code When you add new functionality to your SAP system using SAP’s exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAP’s standard software package.

Enhancement in SAP

Embed Size (px)

DESCRIPTION

Enhancement in SAP

Citation preview

Page 1: Enhancement in SAP

Generated by Jive on 2013-10-03+02:001

Enhancement in SAP

Enhancement (an improvement that makes something more agreeable)

     The R/3 Enhancement concept allows us to add your own functionality to SAP’s standardbusiness applications without having to modify the      original applications. SAP creates

enhancements for specific programs, screens, and menus within standard R/3 applications. These

enhancements do not contain any functionality. Instead, the enhancements act as hooks where WE can

HANG our own add-on functionality onto these hooks.

Advantages

1. They do not affect standard SAP source Code

          When you add new functionality to your SAP system using SAP’s exits, you do not alter thesource code of standard SAP programs in any           way. The code and screens you create areencapsulated as separate objects. These customer objects are linked to standard applications,but           exist separately from SAP’s standard software package.

Page 2: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:002

2. They do not effect software updates

When you add new functionality to your SAP system using SAP’s enhancements, your objects(called customer objects) must adhere (remain) to strict naming conventions (standards). When itcomes time to upgrade to a new software release, customer objects names ensure that they willnot be affected by any changes or new additions to the standard software package.

Note: Customer enhancements may not available for all programs and screens found in the SAP System. You

can only use customer exists in the SAP System.

Page 3: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:003

• Screen and Menu Exits to enhance the front end.• Function Exits to Enhance the Programs• Append Structure to enhance Back End

Note : In Procedural, we have two type

1. Using subroutines - User Exits (Out Dated)

Page 4: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:004

2. Using Function Modules - Customer Exits

User Exits

User exits allow you to add additional functions to the SAP standard. Programs with user exits contain

subroutine calls at certain points in their syntax that are identified by the prefix USEREXIT. The actual user

exits are located in an include that has been assigned to a module pool. This is where customers can include

any changes (enhancements) that they want to make to the system. These includes are always processed

during program flow.

Advantage: In principle, customers can modify anything they want that is found in the include (tables,

structures, and so forth).

Disadvantage: SAP cannot check the individual enhancements themselves which often leads to errors in the

enhancement process.

Page 5: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:005

Customer Exits

Customer exits (Function module exits) are exits developed by SAP. The exit is implemented as a call to a

function module. 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 include that is implemented in the function module.

Customer exits are not available for all programs and screens found in the SAP System. You can only use

customer exits if they already exist in the SAP System.

The Entire SAP Product can be divided into 3 Parts

1. Menu Exits2. Screen Exits3. Function Module Exits

Locating Exits from Standard Applications:

Method 1

The naming standard of function modules for function module exits is: EXIT_<program name>_<3 digit suffix>

EXIT_SAPLCOMK_001 – Function Module Exit for Material Components

Page 6: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:006

Finding Exit Name form Function Module Name

Check in MODSAP table

Method 2

Step 1: Go to the relevant SPRO and look for the documentation.

Page 7: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:007

Step 2 : Click on documentation button , it will display all the available user exits

Page 8: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:008

1. Menu Exits :

Menu exits add items to the pull down menus in standard SAP applications. You can use these menu items to

call up your own screens or to trigger entire add-on applications.

SAP created menu exits by defining special menu items in the menu painter. These specialentries have function codes that begin with “+” (a plus sign). You specify the menu items textwhen activating the item in an add-on project.

Page 9: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:009

2. Screen Exits :

Screen exits add fields to screens in R/3 applications. SAP create screen exits by placing specialsunscreen areas on a standard R/3 screen and calling a customer sub screen from the standardscreen’s flow logic.

Page 10: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0010

Page 11: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0011

Page 12: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0012

3. Function Module Exits :

Function module exits add functionally to R/3 applications. Function module exits play a role in both menu and

screen exits. When you add a new menu item to a standard pull down menu, you use a function module exit to

define the actions that should take place once your menu is activated. Function module exits also control the

data flow between standard programs and screen exit fields.

Page 13: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0013

Business Add-Ins

SAP has introduced new enhancement technique Business Add-ins from release 4.6A Business Add-in is the

new enhancement technique based on ABAP Objects. BADI is an exit point in a source that allows specific

industry sectors, partners, and customers to attach additional software to standard SAP source code without

modifying the original object.

The users of Business Add-ins can customize the logic according to requirement or they can use the standard

logic one available.

SAP guarantees the upward compatibility of all business Add-in interfaces. Release upgrade do not affect

enhancement calls from which the standard software nor do they affect the validity of call interfaces.

Two different views of BADI are available:

• In the definition view, an application programmer predefines exit points in a source that allow specificindustry sectors, partners, and customers to attach additional functionality to standard SAP sourcecode without having to modify the original object.

• In the implementation view, the users of Business Add-Ins can enhance (customize) the logic thatneed or use a standard logic if one is available.

Difference Between Customer Exits and BADIs:

Customer Exit BADI

Procedural Approach to work with Enhancements, Object Oriented Approach to Work with

Enhancements.

Is a two level infrastructure (SAP and customer

solutions).

Allow for a multi-level system landscape (SAP,

partner, and customer solutions, as well as country

versions, industry solutions, and the like).

Page 14: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0014

BADIs can be created at each level within such a

system infrastructure.

Can only be implemented once and enhancements

that can be used actively by any number of

customers.

In addition, Business Add-ins can be defined

according to filter values. This allows you to control

add-in implementation and make it dependent on

specific criteria (on a specific Country value, for

example).

Source Code Enhancement

Page 15: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0015

Source Code Enhancement is one of the enhancement technologies available under Enhancement

Framework. Implementing this technology is also called as Source Code Plug-In. Technically the source

code plug-in implementations are stored in a separate include program and not as part of the original source

program.

There are two types of Source Code enhancements possible.

• Implicit enhancement option• Explicit enhancement option

Implicit Enhancement

Implicit enhancement points are basically points within ABAP code where an enhancement pointis implied, and in which case can be created.      Examples of implicit enhancement points are atthe beginning and end of FORM’s, at the end of a program, include or function module etc.

Step 1 - Activate the enhancement functionalityWithin SE80 open up the program/include you want to enhance

and click on the enhancement button (show below)

Page 16: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0016

Step 2 - Enhancement functionality activated

The SE80 screen will now look something like below!

Page 17: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0017

Step 3 - Show implict enhancement pointsGoto menu 'edit->Enhamcement Operations->Show Implicit

Enhancement Options' to display implicit enhancement points within the ABAP code

Page 18: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0018

Step 4 - Enhancement points with the code Once you have done this you will be able to see all the implicit

enhancement points available within you code, these are denoted by the line of quotation marks and the black

arrow at the start. In this example there are enhancement points at the start and end of each form and one at

the very end of the include.

Page 19: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0019

Step 5 - Create an implicit enhamcement point Inorder to implement an implicit enhancement point simply right

click on the required enhamcement point and select 'Enhancement Implementation->create'.

Page 20: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0020

Step 6 - Enhamcement point type Next click on the code button to create a code implementation

Page 21: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0021

Step 7 - Name and description Next give the enhancement point a name and description. Click the green tick

Step 8 - Change request Assign change to a change request in the usual way

Step 9 - Enhancement point created The enhamcement point will now have been created in the appropriate

place. Denoted by the ENHANCEMENT...ENDENHANCEMENT tags

Page 22: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0022

Step 10 - Enter code into enhancement You can now enter your own code into the enhancement point!

Page 23: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0023

Step 11 - Activate the enhancement point Click the 'Activate Enhancements' button to activate it.

Step 12 - Turn enhancement mode off Now click the 'Active <-> inactive' button to turn enhancement mode off

and return to standard SE80

Explicit Enhancement

Explicit enhancement points are basically hooks already coded into the program by SAP at various points

of the code.

Change an explicit enhancement point

First right click on the enhancement point you want change and choose ‘EnhancementImplementation->Change’

Page 24: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0024

Next select the enhancement point and press the green tick

Page 25: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0025

SE80 will now show your enhancement points as editable within the ABAP code so you can change the code

as you want.

Create an explicit enhancement point First right click on the enhancement point where you wantto add your code and choose ‘Enhancement Implementation->Create’

Page 26: Enhancement in SAP

Enhancement in SAP

Generated by Jive on 2013-10-03+02:0026

Next click on the create button and Give it a name, description and assign it to a change request (should not be

a Z package) and then simply add the code as normal.

Append Structure to Enhance Back End (For Tables)

Attached for your reference.

Your Suggestions Please.....

Regards,

Ramesh.T