Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

user-exits

Former Member
0 Kudos
150

hi all..

Can anybody explain me about user exits..

Regards,

pandu.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
93

hi

ENHANCEMENTS

Enhancements are “hooks” provided by SAP within many standard programs, screens and menus on which customers may “hang” custom functionality to meet business requirements.

• Types

• Customer Exits

• User Exits

• BADI

USEREXIT

User exits allow us to add our own functionality to SAP standard program without modifying it . These are implemented in the form of subroutines and hence are also known as FORM EXITs. The user exits are generally collected in includes and attached to the standard program by the SAP.

All User exits start with the word USEREXIT_...

FORM USEREXIT_...

<User defined code>

ENDFORM.

e.g. USEREXIT_SAVE_DOCUMENT_PREPARE

Example :

1) ADDING OF NEW FIELDS IN PRICING

In Pricing in SD the fields on the basis of which pricing is done are derived from the FIELD CATALOG which is a structure KOMG .This structure is used to transfer transaction data to the pricing procedure in SD and is also known as communication structure. This structure KOMG consists of two tables KOMK for Header related fields and KOMP for item related fields.

The fields which are not in either of the two tables KOMK and KOMP

cannot be used in pricing .Sometimes a need arises when the pricing

is to be based on some other criteria which is not present in the form of fields in either of the two tables.

This problem can be solved by using USEREXITS which are provided for pricing in SD.

Pricing takes place both when the SALES ORDER (Transaction VA01) is created as well as when INVOICING (Transaction VF01) is done. Hence SAP provides 2 user exits ,one for sales order processing which is

USEREXIT_PRICING_PREPARE_TKOMP or

USEREXIT_PRICING_PREPARE_TKOMK

Depending upon which table (KOMK or KOMP) the new fields were inserted we use either of the above two user exits. These user exits are found in include MV45AFZZ of the standard SAP sales order creation program SAPMV45A.

In the case of user exit which will be called when invoicing is done, these are provided in the include RY60AFZZ which is in the standard SAP program SAPMV45A. The names of the user exits are same. i.e.

USEREXIT_PRICING_PREPARE_TKOMP or

USEREXIT_PRICING_PREPARE_TKOMK

These user exits are used for passing the data from the communication structure to the pricing procedure, for this we have to fill the newly created field in the communication structure KOMG for this we fill the code in the above user exit using the MOVE statement after the data that

has to be passed is taken from the database table by using the SELECT statement. The actual structure which is visible in these user exits and which is to be filled for that particular field is TKOMP or TKOMK.

Before the coding for these user exits is done, it is necessary to create a new field in either of the two tables KOMK or KOMP .For this purpose includes are provided in each of them .

To create the field in header data (KOMK) the include provided is KOMKAZ and to create the field in item data(KOMP) the include provided is KOMPAZ.

One possible example for the need of creating new fields can be e.g. Freight to be based upon transportation zone ,for this no field is available in field catalog and hence it can be created in KOMK and then above user exits can be used to fill the transportation data to it.

2) The other method of finding user exit is to find the word USEREXIT in the associated program of the transaction for which we want to determine user exit using SE38.

3) The other method of finding user exits is to find the include in case of SD/MM applications where the user exits are located ,this can be found in the SAP reference IMG generally in the subfolder under SYSTEM MODIFICATION.

Types of Customer Exits

1) MENU EXITS

2) FUNCTION EXITS

3) TABLE EXITS

4) SCREEN EXITS

5) KEYWORD EXITS

6) FIELD EXITS

1) MENU EXITS

Menu exits allow you to add your own functionality to menus. Menu exits are implemented by SAP, and are reserved menu entries in the GUI interface. The developer can add his/her own text and logic for the menu. Function codes for menu exits all start with "+".

Example: We want to create a new menu item in the Office menu. The text for the menu should be "Run ZTEST", and the menu will run report ZTEST.

1) Go to transaction SE43 Area Menu Maintenance.

2) In Area Menu Parameter type 'S000' (S triple Zero).

3) Select Change and ignore all the warning screens.

4) Expand the office menu. In the bottom of the office tree you will find a menu named "Customer function".

5) Double click on the text. In the pop-up screen change the text to "Run ZTEST". Note that the transaction code is +C01. Go to transaction SE93 and create transaction +C01 that calls report ZTEST.

Now you will se the menu displayed in the office tree. If you delete transaction +C01 again, the new menu will disappear.

2) FUNCTION EXITS

These are used to add functionality through ABAP code. These start from the word EXIT_programname_NNN ending in a 3 digit number. No access code is required to implement any type of exit including function exits. The function exits are called from the standard SAP program in the form of ABAP statement.

CALL CUSTOMER-FUNCTION 'NNN'

This is in contrast to USER Exits where PERFORM statement is used to call

the required user exit.

To implement the FUNCTION Exits first of all the project is created and a suitable enhancement package is selected and from its components the function exit to be implemented is selected and on double clicking it the exit code will appear in ABAP EDITOR (se38) where a Z include will be found and the customer code should be entered in this include.

3) SCREEN EXIT

After you have found one, do as directed in the documentation. Generally, the steps are as follows:

1. Create a project using CMOD including your enhancement.

2. Create the append structure with new fields.

3. Go to the desired function group and create a sub screen with the new fields. Write PBO and PAI for the sub screen, if required.

4. Use the function exits in the enhancement to link the PBO and PAI of the sub screen with that of the main SAP program supporting the SAP transaction.

5. Maintain necessary linkage between the sub screen area of standard SAP program with the custom sub screen developed along with the custom program name. This can be done in the project (developed by CMOD including the enhancement) or outside as a part of configuration.

6. Activate the project.

7. Test to ensure that required functionality is met.

4) FIELD EXITS: The field exits are managed, created, activated through program RSMODPRF. The field exit is associated with a data element existing in ABAP dictionary and hence to the screen field using that data element.

The format of field exit is:

FIELD_EXIT_dataelement_A-Z or 0-9

If a particular screen and program name is not specified than the field exit will affect all the screens containing that data element. The function module associated with field exit shows two parameters: INPUT and OUTPUT.

Input parameter contains the data passed to the field exit when the field exit was invoked by the R/3, we can write our own code to change the output parameter depending upon our requirements.

Before the field exit can have any effect the system profile parameter

ABAP/FIELDEXIT in all the application servers should be set to YES

ABAP/FIELDEXIT = YES.

<b>Finding Available Exit</b>

This is the foremost problem with most of us how to locate the appropriate exit as per our requirement. We may use any one of the following methods. But if we use the second method i.e. with a report program, our effort is reduced considerably as against going through the complete hierarchical structure.

Once we have determined our needs, we have to find a suitable exit for our requirement. There are two methods for the same.

1) Transaction SMOD

2) SAP Program in se38

First is by transaction SMOD. Here we have to navigate through the different functional areas and find the relative exit.

Hi

Find the available exits with the following program:::

&----


*& Report ZFINDUSEREXIT

*&

&----


*&

*&

&----


report zfinduserexit.

tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.

tables : tstct.

data : jtab like tadir occurs 0 with header line.

data : field1(30).

data : v_devclass like tadir-devclass.

parameters : p_tcode like tstc-tcode obligatory.

select single * from tstc where tcode eq p_tcode.

if sy-subrc eq 0.

select single * from tadir where pgmid = 'R3TR'

and object = 'PROG'

and obj_name = tstc-pgmna.

move : tadir-devclass to v_devclass.

if sy-subrc ne 0.

select single * from trdir where name = tstc-pgmna.

if trdir-subc eq 'F'.

select single * from tfdir where pname = tstc-pgmna.

select single * from enlfdir where funcname =

tfdir-funcname.

select single * from tadir where pgmid = 'R3TR'

and object = 'FUGR'

and obj_name eq enlfdir-area.

move : tadir-devclass to v_devclass.

endif.

endif.

select * from tadir into table jtab

where pgmid = 'R3TR'

and object = 'SMOD'

and devclass = v_devclass.

select single * from tstct where sprsl eq sy-langu and

tcode eq p_tcode.

format color col_positive intensified off.

write:/(19) 'Transaction Code - ',

20(20) p_tcode,

45(50) tstct-ttext.

skip.

if not jtab[] is initial.

write:/(95) sy-uline.

format color col_heading intensified on.

write:/1 sy-vline,

2 'Exit Name',

21 sy-vline ,

22 'Description',

95 sy-vline.

write:/(95) sy-uline.

loop at jtab.

select single * from modsapt

where sprsl = sy-langu and

name = jtab-obj_name.

format color col_normal intensified off.

write:/1 sy-vline,

2 jtab-obj_name hotspot on,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

endloop.

write:/(95) sy-uline.

describe table jtab.

skip.

format color col_total intensified on.

write:/ 'No of Exits:' , sy-tfill.

else.

format color col_negative intensified on.

write:/(95) 'No User Exit exists'.

endif.

else.

format color col_negative intensified on.

write:/(95) 'Transaction Code Does Not Exist'.

endif.

at line-selection.

get cursor field field1.

check field1(4) eq 'JTAB'.

set parameter id 'MON' field sy-lisel+1(10).

Execute the report, give the transaction you want to find user exit, and query.

<b>BADI</b>

To search for a badi, go to se 24 display <b>class cl_exithandler.</b>

double click on method get_instance, get a break point on case statement.

execute and start the required transaction in new session.

look for variable <b>exit_name.</b> It would show the available badi's.

BADI

http://www.allsaplinks.com/badi.html

http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm

http://support.sas.com/rnd/papers/sugi30/SAP.ppt

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm

http://members.aol.com/_ht_a/skarkada/sap/

http://www.ct-software.com/reportpool_frame.htm

http://www.saphelp.com/SAP_Technical.htm

http://www.kabai.com/abaps/q.htm

http://www.guidancetech.com/people/holland/sap/abap/

http://www.planetsap.com/download_abap_programs.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm

http://support.sas.com/rnd/papers/sugi30/SAP.ppt

http://support.sas.com/rnd/papers/sugi30/SAP.ppt

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm

http://members.aol.com/_ht_a/skarkada/sap/

http://www.ct-software.com/reportpool_frame.htm

http://www.saphelp.com/SAP_Technical.htm

http://www.kabai.com/abaps/q.htm

http://www.guidancetech.com/people/holland/sap/abap/

http://www.planetsap.com/download_abap_programs.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm.

http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm

http://support.sas.com/rnd/papers/sugi30/SAP.ppt

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm

http://members.aol.com/_ht_a/skarkada/sap/

http://www.ct-software.com/reportpool_frame.htm

http://www.saphelp.com/SAP_Technical.htm

http://www.kabai.com/abaps/q.htm

http://www.guidancetech.com/people/holland/sap/abap/

http://www.planetsap.com/download_abap_programs.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm

/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series

/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework

User Exit

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

http://www.sap-img.com/abap/what-is-user-exits.htm

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

http://www.easymarketplace.de/userexit.php

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sappoint.com/abap/userexit.pdfUser-Exit

http://www.planetsap.com/userexit_main_page.htm

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

http://www.sap-img.com/abap/what-is-user-exits.htm

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

http://www.easymarketplace.de/userexit.php

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sappoint.com/abap/userexit.pdfUser-Exit

Please do reward if useful

Regards

Swati

4 REPLIES 4

Former Member
0 Kudos
93

Hi,

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

http://www.sap-img.com/abap/what-is-user-exits.htm

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

http://www.erpgenie.com/sap/abap/code/abap26.htm

which gives the list of exits for a tcode

http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm

For information on Exits, check these links

http://www.easymarketplace.de/userexit.php

http://www.sappoint.com/abap/userexit.pdfUser-Exit

http://www.planetsap.com/userexit_main_page.htm

User-Exits

http://www.sap-img.com/ab038.htm

http://www.sap-basis-abap.com/sapab013.htm

http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283

These links will help you to learn more on user exits.

http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm

http://www.allsaplinks.com/user_exit.html

Also please check these threads for more details about user exits.

1. Document on UserExits in FI/CO

http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc

2. Finding User Exits...

http://sap.ionelburlacu.ro/abap/sap2/Other_Useful_Tips.html#Finding_User_Exits

3. List of all User Exits...

http://www.planetsap.com/userexit_main_page.htm

https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=312792

https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=1320078

https://forums.sdn.sap.com/click.jspa?searchID=672084&messageID=2669896

Regards,

Priyanka.

kiran_k8
Active Contributor
0 Kudos
93

Pandu,

In short, if you want to tweak the SAP standard transactions say VA01 according to the business process of the client then the same can be done using User Exits.

You can check the tables MODSAP,MODACT.

Run the following program to see all the available userexits of a transaction.

REPORT Zf9 .

tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.

tables : tstct.

data : jtab like tadir occurs 0 with header line.

data : field1(30).

data : v_devclass like tadir-devclass.

parameters : p_tcode like tstc-tcode obligatory.

select single * from tstc where tcode eq p_tcode.

if sy-subrc eq 0.

select single * from tadir where pgmid = 'R3TR'

and object = 'PROG'

and obj_name = tstc-pgmna.

move : tadir-devclass to v_devclass.

if sy-subrc ne 0.

select single * from trdir where name = tstc-pgmna.

if trdir-subc eq 'F'.

select single * from tfdir where pname = tstc-pgmna.

select single * from enlfdir where funcname =

tfdir-funcname.

select single * from tadir where pgmid = 'R3TR'

and object = 'FUGR'

and obj_name eq enlfdir-area.

move : tadir-devclass to v_devclass.

endif.

endif.

select * from tadir into table jtab

where pgmid = 'R3TR'

and object = 'SMOD'

and devclass = v_devclass.

select single * from tstct where sprsl eq sy-langu and

tcode eq p_tcode.

format color col_positive intensified off.

write:/(19) 'Transaction Code - ', "#EC NOTEXT

20(20) p_tcode,

45(50) tstct-ttext.

skip.

if not jtab[] is initial.

write:/(95) sy-uline.

format color col_heading intensified on.

write:/1 sy-vline,

2 'Exit Name', "#EC NOTEXT

21 sy-vline ,

22 'Description', "#EC NOTEXT

95 sy-vline.

write:/(95) sy-uline.

loop at jtab.

select single * from modsapt

where sprsl = sy-langu and

name = jtab-obj_name.

format color col_normal intensified off.

write:/1 sy-vline,

2 jtab-obj_name hotspot on,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

endloop.

write:/(95) sy-uline.

describe table jtab.

skip.

format color col_total intensified on.

write:/ 'No of Exits:' , sy-tfill. "#EC NOTEXT

else.

format color col_negative intensified on.

write:/(95) 'No User Exit exists'. "#EC NOTEXT

endif.

else.

format color col_negative intensified on.

write:/(95) 'Transaction Code Does Not Exist'. "#EC NOTEXT

endif.

at line-selection.

get cursor field field1.

check field1(4) eq 'JTAB'.

set parameter id 'MON' field sy-lisel+1(10).

call transaction 'SMOD' and skip first screen.

Say thnks to SDN.

K.Kiran.

Message was edited by:

Kiran K

Former Member
0 Kudos
94

hi

ENHANCEMENTS

Enhancements are “hooks” provided by SAP within many standard programs, screens and menus on which customers may “hang” custom functionality to meet business requirements.

• Types

• Customer Exits

• User Exits

• BADI

USEREXIT

User exits allow us to add our own functionality to SAP standard program without modifying it . These are implemented in the form of subroutines and hence are also known as FORM EXITs. The user exits are generally collected in includes and attached to the standard program by the SAP.

All User exits start with the word USEREXIT_...

FORM USEREXIT_...

<User defined code>

ENDFORM.

e.g. USEREXIT_SAVE_DOCUMENT_PREPARE

Example :

1) ADDING OF NEW FIELDS IN PRICING

In Pricing in SD the fields on the basis of which pricing is done are derived from the FIELD CATALOG which is a structure KOMG .This structure is used to transfer transaction data to the pricing procedure in SD and is also known as communication structure. This structure KOMG consists of two tables KOMK for Header related fields and KOMP for item related fields.

The fields which are not in either of the two tables KOMK and KOMP

cannot be used in pricing .Sometimes a need arises when the pricing

is to be based on some other criteria which is not present in the form of fields in either of the two tables.

This problem can be solved by using USEREXITS which are provided for pricing in SD.

Pricing takes place both when the SALES ORDER (Transaction VA01) is created as well as when INVOICING (Transaction VF01) is done. Hence SAP provides 2 user exits ,one for sales order processing which is

USEREXIT_PRICING_PREPARE_TKOMP or

USEREXIT_PRICING_PREPARE_TKOMK

Depending upon which table (KOMK or KOMP) the new fields were inserted we use either of the above two user exits. These user exits are found in include MV45AFZZ of the standard SAP sales order creation program SAPMV45A.

In the case of user exit which will be called when invoicing is done, these are provided in the include RY60AFZZ which is in the standard SAP program SAPMV45A. The names of the user exits are same. i.e.

USEREXIT_PRICING_PREPARE_TKOMP or

USEREXIT_PRICING_PREPARE_TKOMK

These user exits are used for passing the data from the communication structure to the pricing procedure, for this we have to fill the newly created field in the communication structure KOMG for this we fill the code in the above user exit using the MOVE statement after the data that

has to be passed is taken from the database table by using the SELECT statement. The actual structure which is visible in these user exits and which is to be filled for that particular field is TKOMP or TKOMK.

Before the coding for these user exits is done, it is necessary to create a new field in either of the two tables KOMK or KOMP .For this purpose includes are provided in each of them .

To create the field in header data (KOMK) the include provided is KOMKAZ and to create the field in item data(KOMP) the include provided is KOMPAZ.

One possible example for the need of creating new fields can be e.g. Freight to be based upon transportation zone ,for this no field is available in field catalog and hence it can be created in KOMK and then above user exits can be used to fill the transportation data to it.

2) The other method of finding user exit is to find the word USEREXIT in the associated program of the transaction for which we want to determine user exit using SE38.

3) The other method of finding user exits is to find the include in case of SD/MM applications where the user exits are located ,this can be found in the SAP reference IMG generally in the subfolder under SYSTEM MODIFICATION.

Types of Customer Exits

1) MENU EXITS

2) FUNCTION EXITS

3) TABLE EXITS

4) SCREEN EXITS

5) KEYWORD EXITS

6) FIELD EXITS

1) MENU EXITS

Menu exits allow you to add your own functionality to menus. Menu exits are implemented by SAP, and are reserved menu entries in the GUI interface. The developer can add his/her own text and logic for the menu. Function codes for menu exits all start with "+".

Example: We want to create a new menu item in the Office menu. The text for the menu should be "Run ZTEST", and the menu will run report ZTEST.

1) Go to transaction SE43 Area Menu Maintenance.

2) In Area Menu Parameter type 'S000' (S triple Zero).

3) Select Change and ignore all the warning screens.

4) Expand the office menu. In the bottom of the office tree you will find a menu named "Customer function".

5) Double click on the text. In the pop-up screen change the text to "Run ZTEST". Note that the transaction code is +C01. Go to transaction SE93 and create transaction +C01 that calls report ZTEST.

Now you will se the menu displayed in the office tree. If you delete transaction +C01 again, the new menu will disappear.

2) FUNCTION EXITS

These are used to add functionality through ABAP code. These start from the word EXIT_programname_NNN ending in a 3 digit number. No access code is required to implement any type of exit including function exits. The function exits are called from the standard SAP program in the form of ABAP statement.

CALL CUSTOMER-FUNCTION 'NNN'

This is in contrast to USER Exits where PERFORM statement is used to call

the required user exit.

To implement the FUNCTION Exits first of all the project is created and a suitable enhancement package is selected and from its components the function exit to be implemented is selected and on double clicking it the exit code will appear in ABAP EDITOR (se38) where a Z include will be found and the customer code should be entered in this include.

3) SCREEN EXIT

After you have found one, do as directed in the documentation. Generally, the steps are as follows:

1. Create a project using CMOD including your enhancement.

2. Create the append structure with new fields.

3. Go to the desired function group and create a sub screen with the new fields. Write PBO and PAI for the sub screen, if required.

4. Use the function exits in the enhancement to link the PBO and PAI of the sub screen with that of the main SAP program supporting the SAP transaction.

5. Maintain necessary linkage between the sub screen area of standard SAP program with the custom sub screen developed along with the custom program name. This can be done in the project (developed by CMOD including the enhancement) or outside as a part of configuration.

6. Activate the project.

7. Test to ensure that required functionality is met.

4) FIELD EXITS: The field exits are managed, created, activated through program RSMODPRF. The field exit is associated with a data element existing in ABAP dictionary and hence to the screen field using that data element.

The format of field exit is:

FIELD_EXIT_dataelement_A-Z or 0-9

If a particular screen and program name is not specified than the field exit will affect all the screens containing that data element. The function module associated with field exit shows two parameters: INPUT and OUTPUT.

Input parameter contains the data passed to the field exit when the field exit was invoked by the R/3, we can write our own code to change the output parameter depending upon our requirements.

Before the field exit can have any effect the system profile parameter

ABAP/FIELDEXIT in all the application servers should be set to YES

ABAP/FIELDEXIT = YES.

<b>Finding Available Exit</b>

This is the foremost problem with most of us how to locate the appropriate exit as per our requirement. We may use any one of the following methods. But if we use the second method i.e. with a report program, our effort is reduced considerably as against going through the complete hierarchical structure.

Once we have determined our needs, we have to find a suitable exit for our requirement. There are two methods for the same.

1) Transaction SMOD

2) SAP Program in se38

First is by transaction SMOD. Here we have to navigate through the different functional areas and find the relative exit.

Hi

Find the available exits with the following program:::

&----


*& Report ZFINDUSEREXIT

*&

&----


*&

*&

&----


report zfinduserexit.

tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.

tables : tstct.

data : jtab like tadir occurs 0 with header line.

data : field1(30).

data : v_devclass like tadir-devclass.

parameters : p_tcode like tstc-tcode obligatory.

select single * from tstc where tcode eq p_tcode.

if sy-subrc eq 0.

select single * from tadir where pgmid = 'R3TR'

and object = 'PROG'

and obj_name = tstc-pgmna.

move : tadir-devclass to v_devclass.

if sy-subrc ne 0.

select single * from trdir where name = tstc-pgmna.

if trdir-subc eq 'F'.

select single * from tfdir where pname = tstc-pgmna.

select single * from enlfdir where funcname =

tfdir-funcname.

select single * from tadir where pgmid = 'R3TR'

and object = 'FUGR'

and obj_name eq enlfdir-area.

move : tadir-devclass to v_devclass.

endif.

endif.

select * from tadir into table jtab

where pgmid = 'R3TR'

and object = 'SMOD'

and devclass = v_devclass.

select single * from tstct where sprsl eq sy-langu and

tcode eq p_tcode.

format color col_positive intensified off.

write:/(19) 'Transaction Code - ',

20(20) p_tcode,

45(50) tstct-ttext.

skip.

if not jtab[] is initial.

write:/(95) sy-uline.

format color col_heading intensified on.

write:/1 sy-vline,

2 'Exit Name',

21 sy-vline ,

22 'Description',

95 sy-vline.

write:/(95) sy-uline.

loop at jtab.

select single * from modsapt

where sprsl = sy-langu and

name = jtab-obj_name.

format color col_normal intensified off.

write:/1 sy-vline,

2 jtab-obj_name hotspot on,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

endloop.

write:/(95) sy-uline.

describe table jtab.

skip.

format color col_total intensified on.

write:/ 'No of Exits:' , sy-tfill.

else.

format color col_negative intensified on.

write:/(95) 'No User Exit exists'.

endif.

else.

format color col_negative intensified on.

write:/(95) 'Transaction Code Does Not Exist'.

endif.

at line-selection.

get cursor field field1.

check field1(4) eq 'JTAB'.

set parameter id 'MON' field sy-lisel+1(10).

Execute the report, give the transaction you want to find user exit, and query.

<b>BADI</b>

To search for a badi, go to se 24 display <b>class cl_exithandler.</b>

double click on method get_instance, get a break point on case statement.

execute and start the required transaction in new session.

look for variable <b>exit_name.</b> It would show the available badi's.

BADI

http://www.allsaplinks.com/badi.html

http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm

http://support.sas.com/rnd/papers/sugi30/SAP.ppt

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm

http://members.aol.com/_ht_a/skarkada/sap/

http://www.ct-software.com/reportpool_frame.htm

http://www.saphelp.com/SAP_Technical.htm

http://www.kabai.com/abaps/q.htm

http://www.guidancetech.com/people/holland/sap/abap/

http://www.planetsap.com/download_abap_programs.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm

http://support.sas.com/rnd/papers/sugi30/SAP.ppt

http://support.sas.com/rnd/papers/sugi30/SAP.ppt

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm

http://members.aol.com/_ht_a/skarkada/sap/

http://www.ct-software.com/reportpool_frame.htm

http://www.saphelp.com/SAP_Technical.htm

http://www.kabai.com/abaps/q.htm

http://www.guidancetech.com/people/holland/sap/abap/

http://www.planetsap.com/download_abap_programs.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm.

http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm

http://support.sas.com/rnd/papers/sugi30/SAP.ppt

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm

http://members.aol.com/_ht_a/skarkada/sap/

http://www.ct-software.com/reportpool_frame.htm

http://www.saphelp.com/SAP_Technical.htm

http://www.kabai.com/abaps/q.htm

http://www.guidancetech.com/people/holland/sap/abap/

http://www.planetsap.com/download_abap_programs.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm

/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series

/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework

User Exit

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

http://www.sap-img.com/abap/what-is-user-exits.htm

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

http://www.easymarketplace.de/userexit.php

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sappoint.com/abap/userexit.pdfUser-Exit

http://www.planetsap.com/userexit_main_page.htm

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

http://www.sap-img.com/abap/what-is-user-exits.htm

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

http://www.easymarketplace.de/userexit.php

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sappoint.com/abap/userexit.pdfUser-Exit

Please do reward if useful

Regards

Swati