04-08-2008 2:08 PM
04-08-2008 2:11 PM
hi
User Exits:
The original purpose of user exits was to allow the user to avoid modification adjustment.
 A user exit is considered a modification, since technically objects in the SAP namespace are being modified.
The SAP developer creates a special include in a module pool. These includes contain one or more subroutines routines that satisfy the naming convention userexit_<name>.
 The calls for these subroutines have already been implemented in the R/3 program.
 Usually global variables are used.
After delivering them, SAP never alters includes created in this manner; if new user exits must be delivered in a new release, they are placed in a new include program.
User exits are actually empty subroutines that SAP developers provide for you. You can fill them with your own source code.
 The purpose behind this type of system is to keep all changes well away from program source code and store them in include programs instead.
 To this end, SAP developers create various includes that fulfill the naming conventions for programs and function groups.
 The last two letters in the name of the include refer to the include that the customer should use: "Z" is usually found here.
Example: Program SAPM45A
Include M45AFZB
This naming convention guarantees that SAP developers will not touch this include in the future. For this reason, includes of this nature are not adjusted during modification upgrade.
 The subroutine call is already implemented in the program. The interface is already defined.
 Normally, subroutines of this type only work with global data.
If any new user exits are delivered by SAP with a new release, then they are bundled into new includes that adhere to the same naming convention.
enhancements
it is used to enhance a sap object without actually modifying the object
customer exits The enhancement concept allows you to add your own functionality to SAPs standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. That is already SAP provided some space to write our own functionality that space is nothing but hooks.
If you want to enhance the functionality of your SAP System, you should take advantage of the exits available in standard applications.
advantages are
They do not affect standard SAP source code
When you add new functionality to your SAP System using SAPs 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 SAPs standard software package
They do not affect software updates
When you add new functionality to your SAP System using SAPs exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects names ensure that they will not be affected by any changes or new additions to the standard software package.
regards
prasanth
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 8, 2008 5:05 PM
04-08-2008 2:10 PM
hi,
Different types of enhancements
Enhancements using customer exits
Customers' potential requirements which are not included in the standard software are incorporated in the standard as empty modification 'shells'. Customers can then fill these with their own coding. Enhancements can relate to programs, menus and screens. Upward compatibility is assured. In other words, SAP guarantees that the jump from the standard software to the exit and the interface which call the exit will remain valid in future releases.
Enhancements to ABAP/4 Dictionary elements
These are ABAP/4 Dictionary enhancements (creation of table appends), text enhancements (customer-specific key words and documentation for data elements) and field exits (creation of additional coding for data elements).
advantages of enhancements
Do not affect standard SAP source code
Do not affect software upgrades
Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAPs standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
Various types of customer exits
Menu exits
Screen exits
Function module exits
Keyword exits
Menu exit
Adding items to the pulldown menus in standard R/3 applications .
Screen exit
Adding fields to the screens within R/3 applications. SAP creates screen exits by placing special subscreen areas within a standard R/3 screen and calling a customer subscreen from within the standard dynpro's flow logic.
Function module exit
Adding functionality to R/3 applications. Function module exits play a role in both menu and screen exits.
keyword exit
Add documentation to the data elements of key words defined in the ABAP/4 Dictionary. The system displays this documentation whenever a user presses F1 to get online help for a screen field
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 8, 2008 4:33 PM
04-08-2008 2:11 PM
hi,
User exit - A user exit is a three character code that instructs the system to access a program during system processing.
SXX: S is for standard exits that are delivered by SAP. XX represents the 2-digit exit number.
UXX: U is for user exits that are defined by the user. XX represents the 2-digit exit number
Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAPs standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
The program for transaction VA01 Create salesorder is SAPMV45A
If you search for CALL CUSTOMER-FUNCTION i program
SAPMV45A you will find ( Among other user exits):
CALL CUSTOMER-FUNCTION '003'
exporting
xvbak = vbak
xvbuk = vbuk
xkomk = tkomk
importing
lvf_subrc = lvf_subrc
tables
xvbfa = xvbfa
xvbap = xvbap
xvbup = xvbup.
The exit calls function module EXIT_SAPMV45A_003
Development
Creating a Project to include the enhancement
1. Go to transaction CMOD and create a project.
2. Enter a description for the project. Then, click on the pushbutton Enhancement Assignments in the Application Toolbar.
3. Enter the name of the enhancement and Save.
4. Go to Components.
Creating Custom Include for ANLU
The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.
Create the include structure with three new fields, as required. Then, save and activate it.
Develop the subscreen and the program
Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.
Create it as subscreen.
Then, go to the Layout of the screen and create three new fields from Database table ANLU.
Drag the fields in the screen body and place them.
Then, save and activate the screen and come back to screen flow editor.
Create the PAI module to add validation for field Location 2, as required .
Activate the whole function group and come out.
Write code in the Function Exits to synchronize the programs
Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.
Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:
Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.
Then, activate everything the whole project and come out.
Complete the configuration to link the subscreen
The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.
Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.
Here, the requirement is to create these three custom fields in the tab page General of asset master screen ( AS01/AS02/AS03/AS91).
Determine the Layout
To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class 1000 and click on folder General Assignment of Layout.
Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout SAP cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.
Create new tab layout
Go to transaction AOLA. Copy the tab layout SAP to create another layout, say, YSUB.
System will copy all the settings and will inform you about that.
Select your newly created layout and double-click on the folder Tab page titles.
You want to put your custom fields in the tab page General. So, select this tab page entry and double-click on the folder "Position of Groups".
Here, all the field groups currently residing in the tab-page General are shown. Add an entry for your newly created fields.
Select the group box from the list. An entry will come with U padded with the custom subscreen prepared by you.
Then, save and come out.
Assign the new Layout to Asset Class
Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.
Save and come out.
Test the Exit
Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to them save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not.
Enhancement consists of various components.
Function modules exits (user exits)
Function codes (menu options)
Screen areas (Subscreens)
Includes.
For example, an SAP enhancement may comprise a subscreen and the function exits for data transfer. Customers simply select the components they wish to edit, combine them together in enhancement projects, edit the components and activate the projects.
Check these threads for more details about user exits.
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
http://www.planetsap.com/userexit_main_page.htm
contains custom program which gives details about SAP enhancement projects specified by SAP for standard transactions.
Regards
04-08-2008 2:11 PM
hi
User Exits:
The original purpose of user exits was to allow the user to avoid modification adjustment.
 A user exit is considered a modification, since technically objects in the SAP namespace are being modified.
The SAP developer creates a special include in a module pool. These includes contain one or more subroutines routines that satisfy the naming convention userexit_<name>.
 The calls for these subroutines have already been implemented in the R/3 program.
 Usually global variables are used.
After delivering them, SAP never alters includes created in this manner; if new user exits must be delivered in a new release, they are placed in a new include program.
User exits are actually empty subroutines that SAP developers provide for you. You can fill them with your own source code.
 The purpose behind this type of system is to keep all changes well away from program source code and store them in include programs instead.
 To this end, SAP developers create various includes that fulfill the naming conventions for programs and function groups.
 The last two letters in the name of the include refer to the include that the customer should use: "Z" is usually found here.
Example: Program SAPM45A
Include M45AFZB
This naming convention guarantees that SAP developers will not touch this include in the future. For this reason, includes of this nature are not adjusted during modification upgrade.
 The subroutine call is already implemented in the program. The interface is already defined.
 Normally, subroutines of this type only work with global data.
If any new user exits are delivered by SAP with a new release, then they are bundled into new includes that adhere to the same naming convention.
enhancements
it is used to enhance a sap object without actually modifying the object
customer exits The enhancement concept allows you to add your own functionality to SAPs standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. That is already SAP provided some space to write our own functionality that space is nothing but hooks.
If you want to enhance the functionality of your SAP System, you should take advantage of the exits available in standard applications.
advantages are
They do not affect standard SAP source code
When you add new functionality to your SAP System using SAPs 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 SAPs standard software package
They do not affect software updates
When you add new functionality to your SAP System using SAPs exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects names ensure that they will not be affected by any changes or new additions to the standard software package.
regards
prasanth
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 8, 2008 5:05 PM
04-08-2008 2:13 PM
Hi,
Check out this article.
http://abapprogramming.blogspot.com/2008/03/sap-user-exits.html
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
<REMOVED BY MODERATOR>
Regards,
Ramya
Edited by: Alvaro Tejada Galindo on Apr 8, 2008 5:06 PM