cancel
Showing results for 
Search instead for 
Did you mean: 

USER EXIT - Sample Program or Material

Former Member
0 Kudos

Hai,

I don't know User Exit Programs.So, If anybody have Sample Program or Material, please send them to me...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Easiest way to find a user-exit for a given transaction. Execute this program and type in the t-code.

&---------------------------------------------------------------------
*& Report ZUSEREXIT
*&
&---------------------------------------------------------------------
*&
*&
&---------------------------------------------------------------------

REPORT ZUSEREXIT.


Finding the user-exits of a SAP transaction code 
*

Enter the transaction code in which you are looking for the user-exit 
and it will list you the list of user-exits in the transaction code. 
Also a drill down is possible which will help you to branch to SMOD. 
*

Written by : SAP Basis, ABAP Programming and Other IMG Stuff 
http://www.sap-img.com/* 

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).
call transaction 'SMOD' and skip first screen.

Answers (1)

Answers (1)

Former Member
0 Kudos

Finding the User Exit:

Code SE18 is used to Identify the BADI available.

Look for the string 'CL_EXITHANDLER' in the standard program. This is a class which has a method 'GET_INSTANCE' which is used to trigger BADI's from the Standard Program. The interface parameter for this static method 'EXIT_NAME' is used to pass the BADI to the method.

Open Standard Program and do a global search 'CL_EXITHANDLER'.

SE18 > give the BADI name found through above search.

CUSTOMER_ADD_DATA > which has a method SAVE_DATA.

T.Code SE19 is used to Implement BADI.

SE19 > give the implementation name > Give the Definition name as CUSTOMER_ADD_DATA and the Short Text.

User Exit

Exits are basically the hooks whcih SAP has provided to add your own code. There are two types of Exits:

1. Customer exits: Implemented as Function Modules within z includes. Anybody can change it and no access key is required.

2. User Exit: Implemented as subroutines within includes (any include except y or z includes). You need access for the specific include and then you can any subroutine (user exit) within that Include.

BADIs are the enhanced version of user exits where the same logic is implemented via classes and object (OOP)

Enchancement point is the latest once introduces with ECC6.0 . Not very sure about that but you can change it without any access key.

Please go through the following link which will help you understand the exits in a much better way:

http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec07a25db911d295ae0000e82de14a/content.htm

http://www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm

http://sap.niraj.tripod.com/id21.html

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

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

User Exits.

-


http://www.erpgenie.com/sap/abap/code/abap26.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

customer exits

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662...

Menu Exit.

http://www.sappoint.com/abap/spmp.pdf

http://www.sappoint.com/abap/userexit.pdf

http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm

http://www.sapdevelopment.co.uk/enhance/enhancehome.htm

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.sap-img.com/ab038.htm

http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm

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

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

http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html

Field Exit

If you are in 4.7 and up follow this

1. Run report RSMODPRF

2. Run on the selection screen

3. In list Field Exit > Create

4. Give your data element

5.System will generate the FM FIELD_EXIT_XXXXX

6. Activate it.

7. Select your field exit and assign to your program and screen

8. Select again .. Field exit > Activate

If you are in version below 4.7

1. CMOD

2. Go to >Text enhancment > Field exit

then follow the same step from 3 onwards as given above.

Menu Exit

Procedure for Creating MENU Exits.

1) To get into Area Menu Maintenance Screen Type SE43 T.Code in Command

Line.

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

3) Then Press Change Icon in Application Tool Bar. Then It may ask for

Access Key or it may display "Specify Processing mode" window. If it ask

for the Access Key Check for the availability of OSS Note and apply to open

Standard SAP Menu to include MENU Exits. Otherwise, if it display "Specify

Processing mode" window with Three Push Button. In which select "Change" and

proceed further.

4) Then it will display "Information" window with the following information

"Caution : The Original Language of the structure is German (editing lang. :

English) ". Then press "Enter Key to proceed further.

5) Then you will get into "Edit Area Menu S000".

6) for eg:- Expand Tools Menu.

7) Then Press ABAP Workbench <Icon>.

😎 Then you will get into ABAP Workbench Menu Tree.

9) Then Expand Utilities Menu.

10) In the last line you will find one MENU EXIT Provision to include your

own menu. "Node Text Not Found" This text can be change by double Clicking

that. There you can find the T.Code. Here for Eg:- "+DW4".

11) for eg: - Here change the Text to "Sample Menu Exit" and then note down

the T.Code "+DW4".

12) Then Save with Change Request Number and come out of Transaction SE43.

13) Then Goto Transaction SE93.

14) Then type T.Code "+DW4" and press Create.

15) Then proceed further to create transaction called "+DW4".

I hope this could help you in Creating Menu Exit...

Creating menu exits

http://help.sap.com/saphelp_nw04/helpdata/en/c8/19762743b111d1896f0000e8322d00/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/83/7a18cbde6e11d195460000e82de14a/frameset.htm

Regards,