2007 Jul 18 5:58 PM
cam any one help me out in ,,,,
what r user exits, and do we have types in them and what r the advantages of using them,,,
and where v can find those...
thank you
praveen
2007 Jul 19 4:57 AM
Hi,
Following are some links for user-exits:
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sap-img.com/ab038.htm
http://www.planetsap.com/userexit_main_page.htm
i. Learn user exits :
http://www.sapgenie.com/links/abap.htm
ii. finding user exits :
http://www.sapgenie.com/abap/code/abap26.htm
iii. A short tutorial on user exits :
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
iv. Introduction to user exits with examples :
http://www.sap-img.com/abap/what-is-user-exits.htm
Regards,
Priyanka.
2007 Jul 18 6:11 PM
Enhancements
This transaction consists of various components (including function exits, menu options and subscreens). 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.
Creating a project
First, you must give the project a name. In order to be able to locate projects easily, you are recommended to choose names which contain the name of the transaction or module pool. When you press the function key Create, you go to an attributes screen where you can enter a short description of the project. If you choose a project name that already exists, you get an error message. If you enter * as the project name, you get a list of all projects created so far. When you save with F11, you have to enter a correction number (see Corrections/Transport).
Assigning SAP enhancements to a project
On the initial screen, select SAP enhancements and then Change (or Goto -> Components on the attributes screen). On the next screen, you can specify SAP enhancements by name. By selecting SAP enhancements -> Find enhancements (and, if required, after restricting selection in the next dialog box, or with components), you can display a list of existing SAP enhancements you want to include in the project. When you choose enhancements from this list to assign to a project, they cannot be used by other projects.
Editing enhancement components
To edit SAP enhancement components, select Enhancement components and then Change. If you place the cursor on a function exit, you go into the ABAP/4 Editor where you can enter the appropriate code. If the cursor is on a menu enhancement, you can change the menu text. If it is on a screen enhancement and you press the Edit component key, you can create and design the screen (subscreen) you want to include. To find out what you can do with each component, refer to the SAP documentation.
When editing function exits and screen enhancements, you should be aware of the following:
Although you can create screens, text elements and such like for the main program SAPLXyyy, you cannot change the program itself, since it is created by SAP. The program contains the includes LXyyyTOP, LXyyyUXX, LXyyyUnn and LXyyyXXX, which also cannot be modified, as well as the include ZXyyyZZZ, which is created and edited by the customer. The includes LXyyyTOP and LXyyyUnn contain the includes ZXyyyTOP and ZXyyyUnn; these are also created and edited by the customer and do not exist for SAP. Since you have to define the message ID in the FUNCTION-POOL statement in the include LXyyyTOP, you must specify it when outputting a message:
MESSAGE E000(ID).
The include LXyyyUnn contains the function exit source code, which you can only display. It also contains the include ZXyyyUnn. If you double-click on the include name, you can display the source code of ZXyyyUnn and then use a pushbutton to switch to change mode and enter code. Of course, you can edit these includes "directly" using Transaction SE38. Since they appear within a function modules, they cannot contain events (subroutines, modules...).
If you want to define global data, the include LXyyyTOP contains the include ZXyyyTOP, which you can use to make data declarations. When you create global data while navigating through the transaction, it is automatically defined in the include ZXyyyTOP. You may require global data when editing the screen areas: if the function exit interfaces for data transfer are not global, then the fields required must firstly be copied to global fields, in order to make them known to the complete function group.
When creating your own includes, ensure that you observe the naming convention properly (the first 5 characters are ZXyyy) and that you store them in the include ZXyyyXXX, not in the main program SAPLXyyy. This is automatic if you are navigating through the transaction.
Sometimes example code from SAP is included with function modules. If desired, this can be incorporated into the include ZXyyyUnn belonging to the function module using CMOD (Change enhancement components --> move cursor to function module --> function ???). If this file already contains customer code, the SAP code is added at the end of the file. The function group can also contain subroutines written by SAP, which can be called if required. The customer cannot make changes to these subroutines. Refer to the SAP documentation for information on whether example code or subroutines exist, and how they may be used.
In the case of screen areas, note that when the relevant screen is created the screen type "subscreen" is selected in the screen attributes.
Since a project is generally inactive during editing, the SAP transactions affected are not changed.
Activating a project
When you activate a project, all its components are activated and the project status is set to "active". At the same time, all the programs, screens and menu interfaces associated with the project are regenerated (in the case of programs, only when they are started). When you start the enhanced transactions, you see the enhancements. If you use the Deactivate function to reverse activation of a project, the status is reset to "inactive". If the (de)activation process terminates, the project status does not change but may contain both active and inactive components. To restore the project to a consistent state, restart the (de)activation process.
Corrections/transports
When you create/change a project, you must create a correction. This correction contains only the attributes and the SAP enhancements associated with a project, as well as a program that is automatically started with the transport and activates the project in the target system. Corrections for individual components are created only when you edit the relevant component. This allows several users to edit different components from the same project at the same time without the use of a network. Since activating a project affects all components, you should transport all components associated with a project at the same time, in other words with the same transport request. To ensure that the project is activated automatically in the target system, the correction that contains the program concerned must also be in the same transport request. If this is not the case, or the project has not been activated in the target system for other reaons, you can also activate it by manually starting the program (RSMODACT).
Check out these links
http://sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://sap-img.com/abap/what-is-user-exits.htm
http://sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm
http://sapbrain.com/TUTORIALS/TECHNICAL/user_exits_tutorial.html
http://erp.ittoolbox.com/groups/technical-functional/sap-r3-dev/573131
http://www.sapinsideronline.com/searchspi/search.htm?page=article&query_text=base&key=43244
http://www.easymarketplace.de/userexit.php
Please refer the links,
http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
Reward Points if it is helpful
Thanks
Seshu
2007 Jul 19 4:15 AM
<b>What is User Exits and Customer Exits?</b>
Difference between user exits & customer exits:
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. *-- Mani
<b>The following document is about exits in SAP :-</b>
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 user 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.
<b>Types of Exits </b>
There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.
<b>Menu Exits</b>
Menu exits add items to the pulldown 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 creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu items text when activating the item in an add-on project.
<b>Screen Exits</b>
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 subscreen from the standard screens flow logic.
<b>Function Module Exits </b>
Function module exits add functions 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. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs.
<b>These calls have the following syntax: </b>
<b>CALL CUSTOMER-FUNCTION 001.</b>
<b>Field Exits</b>
Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field. Example: The data element BBBNR identifies a companys international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100.
The field exit concept lets you create a special function module that contains this logic.
You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number.
In 4.6c, you can use "RSMODPRF" program to create field exits.
An example of a user exits :-
MODULE user_exit_0001 INPUT
CASE okcode.
WHEN 'BACK OR EXIT'.
CASE sy-dynnr.
WHEN '100'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN '200'.
******************************************************************************
**** Note that you can write any code that satisfy youer needs ****
**** But in this case, this was wrote as a sample code for ref. ****
**** And you can test ****
******************************************************************************
SET SCREEN 100.
LEAVE SCREEN.
ENDCASE.
ENDCASE.
Reward points if useful else getbk,
Aleem.
2007 Jul 19 4:35 AM
Hi Praveen,
.
FUNCTION field_exit_bstnr.*"----
""Local interface:" IMPORTING" REFERENCE(INPUT)" EXPORTING" REFERENCE(OUTPUT)*"----
-
create field symbol FIELD-SYMBOLS: <status>.* Assign value of variable from calling prog to field symbol ASSIGN ('(SAPMM06E)RM06E-BSART') TO <status>.* Display value retrieved in message* Note: Messages of type i and w are not allowed IF sy-subrc = 0. MESSAGE e003(zr) WITH <status> 'kkk'. ENDIF.ENDFUNCTION.
Adding fields to standard Infotype
Implementing Business Add-Ins (BADI)
Reward pts if found usefull:)
regards
Sathish
2007 Jul 19 4:57 AM
Hi,
Following are some links for user-exits:
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sap-img.com/ab038.htm
http://www.planetsap.com/userexit_main_page.htm
i. Learn user exits :
http://www.sapgenie.com/links/abap.htm
ii. finding user exits :
http://www.sapgenie.com/abap/code/abap26.htm
iii. A short tutorial on user exits :
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
iv. Introduction to user exits with examples :
http://www.sap-img.com/abap/what-is-user-exits.htm
Regards,
Priyanka.