Enhancements:
It allows us to add our own functionality to SAP’s standard business application 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 with Enhancements:
• They do not affect standard SAP source code.
• They do not affect software updates
NOTE: Customer enhancements may not be available for all programs and screens found in the SAP system. You can only use customer exits if they already exist in SAP System.
Enhancement Approaches:
Procedural
- Using Function Modules
- Are called Customer Exits
Object Oriented
- Using Classes and Methods
- Are called BADIs
Procedural, we have two types.
1 – Using Subroutines.
2 – Using Function Modules.
Customer Exits
Types of Exits
Entire SAP Product can be divided in to 3 parts:
- Screens (Front End)
- Programs
- Tables (Back End)
We use:
Screen and Menu Exits to enhance the Front End
Function Exits to enhance the programs
APPEND STRUCTURES/CI Includes to enhance Back End
Menu Exits add items to pull down menus in standard SAP applications. The menu items can be used to call up own screens or to trigger entire add-on applications.
These can be created by defining special menu items in Menu Painter.
Screen Exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer sub-screen from the standard screen’s flow logic.
Function Module Exits add functionality to R/3 applications. They play role in both menu and screen exits.
When new items are added to standard menu, function module exit is used to define the actions that should take place once menu is activated.
Function module ecits also control the data flow between standard programs and screen exit fields.
Note: We can take the advantage of the exits only when SAP provides it in the Standard Transactions.
To locate the exits for any transaction:
Ther are many way for locating the exits, we go through the commonly used ones:
1. Goto SE93 – find the program for the transaction – goto program and find the Package / Development Class bu going to –
GOTO – ATTRIBUTES.
Now, goto SMOD transaction, find out the enhancement for package / development class by pressing F4 on enhancement.
Enter the name of Development Class / Package of the standard program.
Enhancements will be displayed. Select individual enhancement (in case more than one enhancement are there).
Enter enhancement name, select component option and click on display.
Observe the function module exits.
2. Use a piece of code – redundantly available online to pass the transaction and it returns all the enhancements used in the transaction.
3. Open the program in display mode and find the string CALL_CUSTOMER
Double click on CALL CUSTOMER function module exit.
Link to Short Tutorial on User Exits
Showing posts with label architecture r/3 sap. Show all posts
Showing posts with label architecture r/3 sap. Show all posts
Thursday, January 15, 2009
Wednesday, January 7, 2009
Function Modules
FUNCTION MODULES
Repeatedly done piece of codes doing specific tasks can be put into global place.
Stored in R/3 repository.
Creating Function Module:
Requirement: Pass A, B values, get results.
For function modules, we must have function groups.
Creating Function groups
Goto SE 80
Function group contains function module(s) as wel as global data which is used by the function modules.
Global data is stored in TOP INCLUDE of function group.
Goto SE80
Open function group – double clock on it
Click on main program.
Double click on TOP INCLUDE.
Declare variables.
Goto SE37. Enter module name, click on create.
Enter function group name and short description.
Click on Attributes
NOTE: There are 3 types of function modules:
1. Normal – Used for modularization purpose.
2. Remote Enabled – Used to call function module from another server.
3. Update modules. Used to update the database by using the update work processes.
We should use update more often.
Click on IMPORT.
Enter the cariables which are used by the function modules and for which values will come from main program.
NOTE: We can not change input parameter value.
Click on EXPORT
Enter variables which will be passed to main program.
Click on changing
Changing parameters’ value can be changed.
Click on Tables
Here we pass the internal tables.
If more than one table is updating internal table, we can create a structure and define internal table of type structure.
Structure can be defined in source code or TOP INCLUDE.
Click on Source Code
Write the logic.
Callin function modules in the main program.
Create an executable program.
To call the function module: Place cursor where we want to call the function module, click on Pattern ( ctrl + F6)
Enter function module name.
Exception handling in function modules
Open function module in change mode, click on exceptions tab.
Enter exception name. ( eg – RAISE_EX 0)
Goto source code
IF b =0.
RAISE RAISE_EX 0.
Whenever we call the function module for the first time, the total function group will be loaded into the runtime environment along with the global variables.
Function module called twice will be loaded once and used again.
Above is the major difference between function modules and object oriented programming.
Otherwise, function module , like OOPs, also do encapsulation.
Analyzing Short Dump
GOTO tcode: ST22
Click on today or whatever time the error occurred.
Double click on source code extract and system will take us to the line where error has occurred.
Repeatedly done piece of codes doing specific tasks can be put into global place.
Stored in R/3 repository.
Creating Function Module:
Requirement: Pass A, B values, get results.
For function modules, we must have function groups.
Creating Function groups
Goto SE 80
Function group contains function module(s) as wel as global data which is used by the function modules.
Global data is stored in TOP INCLUDE of function group.
Goto SE80
Open function group – double clock on it
Click on main program.
Double click on TOP INCLUDE.
Declare variables.
Goto SE37. Enter module name, click on create.
Enter function group name and short description.
Click on Attributes
NOTE: There are 3 types of function modules:
1. Normal – Used for modularization purpose.
2. Remote Enabled – Used to call function module from another server.
3. Update modules. Used to update the database by using the update work processes.
We should use update more often.
Click on IMPORT.
Enter the cariables which are used by the function modules and for which values will come from main program.
NOTE: We can not change input parameter value.
Click on EXPORT
Enter variables which will be passed to main program.
Click on changing
Changing parameters’ value can be changed.
Click on Tables
Here we pass the internal tables.
If more than one table is updating internal table, we can create a structure and define internal table of type structure.
Structure can be defined in source code or TOP INCLUDE.
Click on Source Code
Write the logic.
Callin function modules in the main program.
Create an executable program.
To call the function module: Place cursor where we want to call the function module, click on Pattern ( ctrl + F6)
Enter function module name.
Exception handling in function modules
Open function module in change mode, click on exceptions tab.
Enter exception name. ( eg – RAISE_EX 0)
Goto source code
IF b =0.
RAISE RAISE_EX 0.
Whenever we call the function module for the first time, the total function group will be loaded into the runtime environment along with the global variables.
Function module called twice will be loaded once and used again.
Above is the major difference between function modules and object oriented programming.
Otherwise, function module , like OOPs, also do encapsulation.
Analyzing Short Dump
GOTO tcode: ST22
Click on today or whatever time the error occurred.
Double click on source code extract and system will take us to the line where error has occurred.
Wednesday, November 26, 2008
SAP architecture
A typical SAP system consists of various business modules, numerous sector and cross-sector solutions. A distributed system of this nature requires a common infrastructure, which is provided by SAP NetWeaver and in particular, by the SAP Web Application Server (WAS).
Major points to note and keep in mind would be:
• R/3
• Layers of WAS: presentation, application and database.
• The interfaces used between presentation and application, application and database.
• ICM – Internet Communication Manager
• Roll in / Roll out
• Work processes, Gateway and dispatcher.
If the above points are not clear kindly Google and try to find more about them or post your queries here. It would help you in connecting the dots ahead.
Major points to note and keep in mind would be:
• R/3
• Layers of WAS: presentation, application and database.
• The interfaces used between presentation and application, application and database.
• ICM – Internet Communication Manager
• Roll in / Roll out
• Work processes, Gateway and dispatcher.
If the above points are not clear kindly Google and try to find more about them or post your queries here. It would help you in connecting the dots ahead.
Subscribe to:
Posts (Atom)