Sei sulla pagina 1di 18

BY MR.

BABU (OASIS TECHNOLOGIES)


Enhancements

 This concept is used to add additional customer specific functionalities to the


standard applications or programs or transaction codes.

Following are the different enhancements techniques or methods.

1. Customer Exits.
2. Business Transaction Events (BTE).
3. Enhancement frame work.
4. User Exits.
5. Business ADdIns (BADI).
6. Functional Routines

1).Customer Exits:

 Customer Exits are available in most of the functional areas such are SD- Sales
and Distribution, Material Management (MM), Finance and Controlling (FI/CO)….
Etc.
 They are used to add the additional functionalities in the standard applications or
programs, without using access key to break them.

Access key:

It is the unique key provided by the basis consultant or SAP People to break the
standard applications or programs.
 The application or program will become custom development once they
are broken.

Following are the different types of Customer Exits.

a) Field Exits.
b) Function Exits.
c) Menu Exits.
d) Screen Exits.

a).Field Exits:

They are used to change the field labels of the standard data elements.

b).Function Exits:

They are used to add an additional functionality to the standard applications or program
without breaking them.
BY MR. BABU (OASIS TECHNOLOGIES)
 Each Function Exit contain a custom include program which starts with Z* to
implement the customer specific additional business logic.
 The Function Exit is the three digit number which is called using the ABAP
statement
CALL CUSTOMER_FUNCTION.

Ex:

*Function Exit

CALL CUSTOMER_FUNCTION ‘<XXX>’

IMPORTING

im_param =

..

TABLES

FUNCTION <funct_exit_name>.

Z<INCLUDE_NAME>

* Define include with Additional Custom Business Logic

SELECT….

ENDFUNCTION.

Note: In the real time we mostly work with function exits.

c).Menu Exits: They are used to add the custom specific menu items and
corresponding additional functionality based on the selected menu item.

d).Screen Exits: They are used to add the additional screen elements and the
corresponding additional functionality to the standard screens, or application or
transaction codes.

 The T-Code SMOD and CMOD is used to work with the Customer Exits.

T-Code SMOD: It is used to find the Customer Exits of the standard package.

T-Code CMOD: It is used to assign the enhancements or exit to a project to record


the changes, activate and de-activate the enhancements.

Note: It is not possible to assign an enhancement or exit to more than one project.
BY MR. BABU (OASIS TECHNOLOGIES)

Different ways to find Exits:  Following are different ways to find Exits.

1) Using the Package name of the applications.


2) Using the T-Code “SE84”.
3) Using the find function in standard programs.
4) Using the standard tables MODSAP and MODACT.

1). Steps to find Exits using Package:

a)Finding Packages:

 Execute the required T-Code or application.

Ex: VA02/VL02.

 Click on system menu item.


 Click on status and double click on the program name (screen).
 Click on ‘Go to’ menu item.
 Click on attributes.

Note:  The corresponding Package name is displayed in the package field.

b) Finding Exits using T-Code SMOD:

 Execute the required T-Code SMOD.


 Click on utilities menu item.
 Click on find.
 Enter the above found package.

Ex: VA/MGA…

 Click on execute.

Note:  All the corresponding of the Package are listed.

 Find an accurate exit by understanding the system given short description or by


using an trial and error method by activating the exits and perform the required
action.

2). Steps to find Exits using the T-Code SE-84:

 Find the package name of the required T-Code.


 Execute the T-Code SE84.
BY MR. BABU (OASIS TECHNOLOGIES)
 Expand enhancement folder.
 Double click on enhancements.

Note:  An item project is used to find the enhancements of the projects.

 Enter the required package name or Exit name.


 Click on execute icon.

Note:  1).All the corresponding Exits are listed.

2) Find the correct exit by analyzing the system given short text or by using

Trial and Error method.

3). Steps to find Exits using the find function:

 Execute the required T-Code (Ex: MM01/VA01….).


 Click on system menu item.
 Click on status.
 Double click on the screen program name.
 Click on find icon.
 Enter the find string as CALL CUSTOMER_FUNCTION.
 Press enter button.

Note:  All the Exits which are called using the statement

CALL CUSTOMER_FUNCTION are listed.

 Double click on the required found location.


 Set a session break points.

Note:  Set the session break points for all the found locations up to 30 only at a time.

 Perform the required action in the T-Code to stop the correct Exits.

4). Using the standard table MODSAP and MODACT:

 The standard table MODSAP or MODACT can also be used to list out the
enhancement projects.

Scenario on Field Exit: Change the field table of the standard data element
DWERK_EXT – Deliver plant in the T-Codes VA01, VA02, VA03.

Steps to change the Field label in the standard application:


BY MR. BABU (OASIS TECHNOLOGIES)
 Execute the required T-Code Ex: VA02/…
 Enter the document or order number.
 Press enter button.
 Place a cursor on required field.
 Press F1 function key.
 Click on technical information icon.
 Copy the data element name.
 Execute the T-Code CMOD.
 Click on GOTO menu item.
 Click on text enhancements.
 Click on key words.
 Click on change.

Note:  An option “Data elements” is used to change the documentation of the


standard data Elements.

 Paste or enter the required data element name DWERK_EXT.


 Click on yes button.
 Change the field labels.
 Click on save icon.
Ex:- Deliver plant  Del.plant.
 Create the transport request number by pressing create request icon.
 Click on yes button.
 Cancel the change key words window.

Note:  Check the change field label by executing required T-code.

Scenario on Function Exit:

Hiding the attributes of an executable program in the T-Code “SE38” -Attributes.

Steps to find exact Exits:

1. Find an appropriate package name of the required T-Code or an application.

Ex: Package for attributes is SE38 is SEDT.

2. Finding Exit:
 Execute the T-Code SMOD.
 Click on utilities menu item.
 Enter the required found package name.
Ex: SEDT/MGA/VA…..
 Click on execute icon.
 Click on find icon.
BY MR. BABU (OASIS TECHNOLOGIES)
 Enter the required find string.
Ex: Attributes/check/save/function.
 Press enter button.
 Copy the font Exit names by pressing (Ctrl + Y).
 Cancel the find windows.
 Click on back.

3. Project Creation - CMOD:


 Execute the T-Code CMOD.
 Enter the project name (ZB20_PRJ).
 Click on create button.
 Enter short text.
 Click on enhancement assign button.
 Click on yes button.
 Enter the package name.
 Click on save icon.
 Create the TR-Transport request number by pressing an icon create
request.
 Click on yes button.
 Paste or enter the found Exit name.

Note:  The exit cannot be assigned more than one project.

 Press enter button.


(Ex: SEU00001 – Fonction Exit in program attributs)
 Click on components button.
 Click on yes button.
 Click on activate icon.

Note:  1.Color of the traffic light will become green, once the project is activated.

Red – Inactive.

Green – Active.

2. The tick marks are appeared under Impl. Column once the Exits are Implemented.

 Double click on function Exit names.


 Double click on the system provided Z* include name.
 Press enter button for the first time.
 Click on yes button.
 Enter the package name.
 Click on save icon.
BY MR. BABU (OASIS TECHNOLOGIES)
 Create the TR if required.
 Click on yes button.
 Write any statement to get the Exit stop in the debugger.
Ex: BREAK <OASIS>.
 Activate include program.
 Click on back icon.
 Click on back icon to come out of the function module Exit.

Note:  Follow the similar steps to implement any number of Exits by double
clicking on them.

4. Finding Exact Exit:


 Execute the required T-Code.
Ex: SE38/MM02/….
 Perform the required action.
Ex: AttributesDisplay/Save/Delete.

Note:  An accurate/Exact exit is stopped in debugger.

5. Implementing the required Business logic in the found Exit:


 Execute the required T-Code - CMOD.
 Enter the required project name (ZB20_PRJ).
 Click on display button.
 Click on components button.
 Double click on the required Exit name.
 Double click on the include program name.
 Click on display or change icon.
 Implement the required business logic as per the specification.
 Activate the include program.
Ex: *Additional business logic.
<If program EQ ‘ZB21_ALV_GRID_LIST’.
MESSAGE ‘Attributes are Hidden’ type ‘I’.
LEAVE SCREEN.
ENDIF.>

6. Test the Scenario:

 Execute the required T-Code SE38/MM02/ME22N…


 Enter the required data.
Ex: Program name/Doc.No./…
(ZB21_ALV_GRID_LIST)
BY MR. BABU (OASIS TECHNOLOGIES)
 Perform the required action.
Ex: Select Attributes  Display/Save/Enter.

Note:  An information message is given as ‘Attributes are hidden’ from the


implemented function Exit.

Scenario on MENU Exits:  Add an additional custom menu item and the
corresponding additional functionality to the standard T-Code MC94 – Change plan.

1. Find Package name: 

 Execute the T-Code MC94.


 Click on system menu item.
 Click on status.
 Double click on screen program name.
 Click on GOTO menu item.
 Click on Attributes.
 Copy the package name (MCP2).

2. Find Exits:

 Execute the T-Code SE84/SMOD.


 Expand enhancements folder.
 Expand customer exit folder.
 Double click on enhancements.
 Enter or paste the required package name (MCP2).
 Click on execute icon.
 Click on find icon.
 Enter an appropriate find string (function).
 Press enter.
 Copy an appropriate found exit name.
Ex: MCP20003

3. Project Creation:

 Execute the T-Code- CMOD.


 Enter the Project name (ZB20_PRO).
 Click on Create button.
 Enter short text.
 Click on enhancements assignments button.
 Click on yes button.
 Enter the package name.
 Click on save icon.
BY MR. BABU (OASIS TECHNOLOGIES)
 Create the TR by pressing create request icon.
 Click on yes button.
 Enter/Paste the required Exit name.
 Press enter button.
 Click on components button.
 Click on yes button.
 Click on activate icon to activate the Exits.

Note:  1.An Icon undo activation is used to de-activate the enhancement project.

2. Click on back icon then use activate icon in case of not appeared in the

Components Screen.

 Double click on any one of the function codes such as +CU1,+CU2….


 Enter function text, icon text, icon text, info text … etc.
 Click on yes button.
 Click on yes button.
 Double click on the corresponding function Exit name to add an additional
functionality when the custom menu is pressed.
 Double click on the custom include program name.

Note:  Press enter button then create an include program name for the first time.

 Implement the required additional interactive functionality (as per the


specification).
Ex: -- *Additional Interactive Business logic.
 IF i_fcode EQ ‘+CU2’.
CAL TRANSACTION ‘SE11’.
END IF.
 Click on pretty printer button.
 Click on Activate icon.
 Press enter and Click on Back.

4. Test the Scenario:

 Execute the required T-Code (Ex: MC94).


 Enter the required data.
o Ex: Planning type: REPL.
 Press enter button.
 Click on activate version button or perform the required action.
 Click on extras menu item.
 Click on customer functions.
BY MR. BABU (OASIS TECHNOLOGIES)
 Click on the required additional custom menu item.

Note:- The additional functionality such as call another T-code (SE11) is happened

From the Implemented menu exit and function exits.

Scenario on Screen Exits:  Add the additional screen fields with the transaction
code MP01 (Maintain Approved manufacture parts).

Common steps involved in Screen Exits:

1. Find the corresponding screen exits of an application or T-Code by using the


corresponding package name.
2. Add the additional fields to the corresponding structure which stars with CI* or
standard tables by appending a structure.
Ex: CI_AMPL/…
3. Define the screen or sub screen of the screen Exit with required additional fields
by creating the enhancement projects.
4. Provide the additional functionality to pass data to the database tables, provide
Search help and etc using corresponding in exit or flow logic of the screen in the
screen exit.

Steps to work with Screen Exits:

1. Find Screen Exit using the package :

 Once the package name of the application or T-code is found then execute
SMOD.
 Click on utilities menu item.
 Click on find icon.
 Enter the required found package name (ME).
 Click on execute icon.
 Click on find icon.
 Enter appropriate find string (screen).
 Press enter button.
 Click on required found string.
 Read the system given short text.
 Copy the found exit name.

2. Add additional fields by appending structure or by CI* structure:

 Once the required standard table or table is in display mode.


Ex: AMP1/MARA/….
 Double click on a structure which starts with CI*.
BY MR. BABU (OASIS TECHNOLOGIES)
Note: -- Use append structure button in case of the CI* structure does not exit.
 Click on yes button.
 Enter short description.
 Define the required fields such as MATKL (Material Group) … etc.
 Activate the CI* structure.
 Click on back.

3. Enhancement project creation:

 Execute T-Code CMOD.


 Enter the project name.
 Click on create button.
 Enter short text.
 Click on enhancement assignment button.
 Click on yes button.
 Enter the package name.
 Click on save icon.
 Create the TR by pressing create request icon.
 Click on yes button.
 Enter or paste the required enhancement name (AMPL0001) - (user sub screen
for additional data on AMPL).
 Click on components button.
 Click on activate icon to activate enhancement project.

Note: -- Activate and Deactivate project in an initial screen of CMOD if they are not
appeared.

 Double click on the system provided sub screen number of screen exit.
 Press enter button.
 Enter short description.
 Click on layout button.
 Click on dictionary or program fields windows (F6).
 Enter the required table or structure name.
Ex: AMPL
 Select the required additional field.
Ex: MATKL
 Press enter button.
 Place if on the screen by pressing left mouse button.
 Click on activate icon.
 Enter the package name.
 Click on save icon.
 Click on yes button.
BY MR. BABU (OASIS TECHNOLOGIES)
 Click on the button maintain original language.
 Click on back.
 Click on flow logic and add the additional functionality.
Note: -- Use the system provided for exits.
 Make sure the screen type ‘Sub screen’ is selected under attributes tab while
defining the sub screen.

4. Test the Scenario:

 Execute the required T-Code MP01.


 Enter the document number (material number).
 Press enter button.
 Double click on any one of material number.
Note: -- The additional custom fields are appeared o standard screen.

BTE—Business Transaction Events:

The Business Transaction Events are also called Source code plug-ins to add an
additional functionality in the standard program or T-Code.

 Each BTE is linked with the system provided interface to which the custom
function module can be assign.
 The BTE are called using the function
OPEN_FI_PERFORM* and OUTBOUND_CALL*.

Ex:--
 Standard program.
.
CALL FUNCTION ‘OPEN_FI_PERFORM
(or) OUTBOUND_CALL’…
BTE-0001490

ZCUSTOM_FUNCTION
 The T-Code BERE and FIBF are used to work with BTE’s.
BY MR. BABU (OASIS TECHNOLOGIES)
T-Code BERE: It is used to find the BTE’s.

T-Code FIBF: It is used to work with the BTE’s.

Scenario on BTE: It gives an information message while saving the vendor data (or)
sends a purchase order as a PDF attachment to an Email of the vendor.

T-code—XK02/XK01

Tables – LFA1/LFB1

Find BTE:

 Execute the T-code BERE.


 Click on execute icon.
 Click on find icon.
 Enter a appropriate find string.
Ex: Vendor/Customer/Material.
 Press enter button.
 Close the find window.
 Double click on the required found ‘BTE’.
Ex: 00001420 – VENDOR
 Click on sample module button.
 Click on copy icon.
 Change two function module names and enter the function group name.

Ex: FROM FM: SAMPLE_INTERFACE_00001420

TO FM: ZB20_CUST_INTERFACE_00001400

Function group: ZB20_FUN_GRP.

 Click on yes button.


 Press enter button.
 Enter the copied interface name/Fm name.
 Click on change icon button.
 Implement the required additional business logic as per the specification.
Ex: *Implement additional customer specific business logic.

*Give message.

MESSAGE ‘Vendor saved successfully’ TYPE ‘I’.

*Implement Print program.

*Submit ZB20_PRINT _PROGRAM VIA SELECTION-SCREEN.


BY MR. BABU (OASIS TECHNOLOGIES)
 Click on Pretty Printer button.

Note: -- Make use of the parameters of an interface or function module to provide an


additional logic.

 Click on activate icon.

Note: -- The menu path EnvironmentInfo system (process)

In the T-Code FIBF can also be used to find BTE’s.

Steps to assign the custom interface or function Module to BTE:

1. Create Product:

 Execute T-Code FIBF.


 Click on setting menu item.
 Click on products.
 Click on ‘of a customer’.
 Click on new entries button.
 Provide the product details.

Product Text RFC Destination A


ZB20_PRD Product for BTE in 
Vendor Master
 Click on save icon.
 Create a customizing request to save the table entries of TBE24.
 By pressing create request icon.
 Click on yes button.
 Click on back icon.

2. Assign a custom interface or function module to BTE:

 Click on settings menu item in an initial screen of FIBF.


 Click on PS modules.
 Click on ‘of a customer’.
 Click on new entries button.
 Provide the required details.

Event Product CTR Appl Function module


00001420 ZB20_PRD ZB20_CUST_INTERFACE_00001420

 Click on save icon.


BY MR. BABU (OASIS TECHNOLOGIES)
 Create the customizing request to save the table contents of a table ‘TBE34’
by pressing create request icon.
 Click on yes button.
 Click on back.

3. Test the Scenario:

 Execute the required T-Code.


Ex: XK02
 Enter the document number or vendor/Customer no.
 Check the check box address in case of vendor.
 Press enter button.
 Change any data.
 Click on save icon or perform the required action.

ENHANCEMENT FRAME WORK:

 It is an advanced enhancements concept introduced from the version ECC6.


 It is used to attach or hook the source code plug-ins such as enhancements
section or enhancements points in the standard programs.
 Following are the different types of enhancements frame work.
1. Implicite Enhancement Section (or) point.
2. Explicit Enhancement Section (or) point.

1. Implicit Enchantement Section (or) point:

 They are provided implicitly at the particular locations by SAP.


 They are mostly presented at the beginning and end of the subroutines (FORM
…. ENDFORM), beginning and end of the function modules, beginning and end
of the programs etc.

2. Explicit Enchantement Section (or) point:

 They are pre coded by SAP and provided at the specific location in the standard
programs.
 There are two types of Explicit Enhancement.
1. ENHANCEMENT-SECTION.
2. ENHANCEMENT-POINTS.

1. ENHANCEMENT-SECTION:

 It is used to copy, change the existing standard source code and add additional
business logic to the standard program.
BY MR. BABU (OASIS TECHNOLOGIES)
 The ABAP statement ENHANCEMENT-SECTION is used to specific the
enhancement sections.

2. ENHANCEMENT-POINT:

 It is used add or plug-in the additional customer specific business logic to the
standard program.

Scenario on Implicit Frame work:

Make the physical file path name in the standard migration program.

RMDATIND – Migrates Material Master Data.

Steps to work with an Implicit Frame work:

 Once the standard program is in display mode.

Ex: RMDATIND/etc.

 Click on enhance icon (spiral icon).


 Click on edit menu item.
 Click on enhancement operations.
 Click on show implicit enhancement options.

Note:-- The system inserts the double coated lines (“ ” ” ”) in the certain locations
in the standard program.

 Right click on the system inserted double coated line at the required location
such as beginning of the program or end of the program or end or beginning of
the subroutine… etc.
 Click on enhancement implementation.
 Click on create.
 Click on create enhancement implementation icon (F8).
 Enter the enhancement implementation name.
 Enter short text.
 Click on yes button.
 Enter the package name.
 Click on save icon.
 Create TR by pressing create request icon.
 Click on yes button.
 Select the created enhancement name.
 Click on yes button.
 Implement the required customer specific additional business logic within the
system generated statement.
BY MR. BABU (OASIS TECHNOLOGIES)
 Ex: -- “”””””””””””””””””””””””””””””””””””””””””””””””
ENHANCEMENT <n> <ZB20_IMPLICIT_ENHANCEMENT>
*Implement customer specific additional business logic
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = “%%%_PHY”.
SCREEN-REQUIRED = ‘1’.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
ENDENHANCEMENT.
 Click on activate enhancement buttons.
 Press enter button.

Note:-- Test the scenario by executing the required T-Code or program.

Scenario on Explicit Enhancement Frame work:

 Change the default value for an input field “Transactions per commit unit from
500 to 1000” in the standard report (RMDATIND) material master data upload.
 Once the standard program is in display mode.
 Right click on the system provided explicit enhancement section or point.
 After an icon enhance is pressed.
 Click on enhancement implementation.
 Click on create.
 Click on create enhancement implementation (F8).
 Enter enhancement implementation name.(ZB20_EXPLICIT_ENHANCEMENT)
 Enter short description.
 Click on yes button.
 Click on save icon.
 Create the TR by pressing create request icon.
 Click on yes button.
 Select the created enhancement implementation name.
 Click on yes button.
 Implement the required customer specific additional business logic.
Note:-- Change the existing standard source code in case of enhancement
section.
BY MR. BABU (OASIS TECHNOLOGIES)
Sample:

ENHANCEMENT-POINT BMVDEF00_03 SPOTS ES_RMDATIND

“or ENHANCEMENT-SECTION

*$*$....start : BMVDEF00_03….

ENHANCEMENT 30 ZB20_EXPLICIT_ENHANCEMENT

*Implement additional logic

MAX_COMM = 1000.

ENDENHANCEMENT.

 Click on activate enhancement button.


 Press enter button.

Note:-- Test the scenario by executing the required T-Code or program.

Potrebbero piacerti anche