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: 

find exit name

Former Member
0 Kudos
1,851

Hi experts

how to find the exit name of the particular function module in a transaction.

i found the function module thru "call customer-function", then i got CALL CUSTOMER-FUNCTION '003' like this, i had double click on that, then it taken me into the function module, but if i want to implement that function module i need to have enhancement name, so i want to find exit name.

please explain me, don't give links, plz explain how to find.

Thanks in advance

Priya Papana.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
385

Hi,

In SMOD. Utilities-->Find.

There u can give the Dev.Class/Short Description to find the exit.

or use this report to find the exit for the particular tcode.

REPORT ZV_FIND_EXIT NO STANDARD PAGE HEADING.

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.

Or

u can find out Enhancement name from the table MODSAP

<b>Reward points</b>

Regards

Regards

7 REPLIES 7

Former Member
0 Kudos
386

Hi,

In SMOD. Utilities-->Find.

There u can give the Dev.Class/Short Description to find the exit.

or use this report to find the exit for the particular tcode.

REPORT ZV_FIND_EXIT NO STANDARD PAGE HEADING.

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.

Or

u can find out Enhancement name from the table MODSAP

<b>Reward points</b>

Regards

Regards

amit_khare
Active Contributor
0 Kudos
385

If user exit then look for PERFORM USEREXIT in the include program.

If customer exit then look for CALL CUSTOMER in the main prg of the corresponding transction.

Once found you can easily find the name of the corresponding enhancement using the repository browser SE85.

Check this link too -

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-code-samples/userexits%20in%20a%20transaction.doc">Find Exit</a>

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

http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos
385

Hi Priya,

Just find out the package name of the call customer function '003' and goto the tcode SE84 and give that package name, then you will get all the enhancements available in that from there you can get the required one.

Hope this helps if yes reward some points.

Regards,

Suman

Former Member
0 Kudos
385

HI EXECUTE THIS PROGRAM

************************************************************************

  • 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.

*

************************************************************************

*----


  • TABLES DECLARATION

*----


TABLES : TSTC, "SAP Transaction Codes.

TADIR, "Directory of Repository Objects.

MODSAPT, "SAP Enhancements - Short Texts.

MODACT, "Modifications.

TRDIR, "System table TRDIR.

TFDIR, "Function Module.

ENLFDIR, "Additional Attributes for Function Modules

TSTCT. "Transaction Code Texts

*----


  • INTERNAL TABLE DECLARATIONS

*----


DATA : ITAB LIKE TADIR OCCURS 0 WITH HEADER LINE.

*----


  • DATA DECLARATIONS

*----


DATA : V_FIELD1(30).

DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.

*----


  • INPUT SCREEN DECLARATIONS

*----


PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.

*----


  • START OF SELECTION EVENT

*----


START-OF-SELECTION.

*--Read SAP Transaction Code from the given input.

SELECT SINGLE *

FROM TSTC

WHERE TCODE EQ P_TCODE.

IF SY-SUBRC EQ 0.

*--Get the Directory of Repository Objects for the

*---selected program name.

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.

*--Read System table TRDIR for the selected program name.

SELECT SINGLE *

FROM TRDIR

WHERE NAME = TSTC-PGMNA.

*--Get the function module name for the selected program name.

IF TRDIR-SUBC EQ 'F'.

SELECT SINGLE *

FROM TFDIR

WHERE PNAME = TSTC-PGMNA.

*--Get the function group for the selected program name.

SELECT SINGLE *

FROM ENLFDIR

WHERE FUNCNAME = TFDIR-FUNCNAME.

*--Read the development class for the corresponding function group.

SELECT SINGLE *

FROM TADIR

WHERE PGMID = 'R3TR' AND

OBJECT = 'FUGR' AND

OBJ_NAME EQ ENLFDIR-AREA.

MOVE : TADIR-DEVCLASS TO V_DEVCLASS.

ENDIF.

ENDIF.

*--Read all the entries into the internal table itab.

SELECT *

FROM TADIR

INTO TABLE ITAB

WHERE PGMID = 'R3TR' AND

OBJECT = 'SMOD' AND

DEVCLASS = V_DEVCLASS.

*--Read Transaction code information from the table tstct.

SELECT SINGLE *

FROM TSTCT

WHERE SPRSL EQ SY-LANGU AND

TCODE EQ P_TCODE.

*-- Column Headings

FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.

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

20(20) P_TCODE,

45(50) TSTCT-TTEXT.

SKIP.

IF NOT ITAB[] 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 ITAB.

*--Read SAP Enhancements short texts information.

SELECT SINGLE *

FROM MODSAPT

WHERE SPRSL = SY-LANGU AND

NAME = ITAB-OBJ_NAME.

FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

WRITE:/1 SY-VLINE,

2 ITAB-OBJ_NAME HOTSPOT ON,

21 SY-VLINE ,

22 MODSAPT-MODTEXT,

95 SY-VLINE.

ENDLOOP.

WRITE:/(95) SY-ULINE.

DESCRIBE TABLE ITAB.

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 EVENT

*----


AT LINE-SELECTION.

GET CURSOR FIELD V_FIELD1.

CHECK V_FIELD1(4) EQ 'ITAB'.

SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).

*-- call transation SMOD : Sap Enhancement.

CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

*---End of Program

YOU WILL FOUND EXITS OF THAT TRANSACTION

OTHER WISE SERACH FOR <u>CALL CUSTOMER FUNCTION</u>

REWARD IF USE FULL

REGARDS

NARESH

Former Member
0 Kudos
385

Thanks to all

Pirya Papana

0 Kudos
385

hi

u can use MODSAP table to find enhancement by giving the'Exit name'.

Former Member
0 Kudos
385

hi priya,

Try this program it will give u enhacement names, function modules, includes and description. pls try this program.

******FInding Desc. of enhacements*************

REPORT ZFIND_USERXTS NO STANDARD PAGE HEADING LINE-SIZE 200 MESSAGE-ID ZZ.

  • T A B L E D E C L A R A T I O N S *

TABLES: TFTIT,E071,E070.

  • S T R U C T U R E D E C L A R A T I O N S *

TYPES: BEGIN OF X_TSTC,

TCODE TYPE TCODE,

PGMNA TYPE PROGRAM_ID,

END OF X_TSTC.

TYPES: BEGIN OF X_TADIR,

OBJ_NAME TYPE SOBJ_NAME,

DEVCLASS TYPE DEVCLASS,

END OF X_TADIR.

TYPES: BEGIN OF X_SLOG,

OBJ_NAME TYPE SOBJ_NAME,

END OF X_SLOG.

TYPES: BEGIN OF X_FINAL,

NAME TYPE SMODNAME,

MEMBER TYPE MODMEMBER,

INCLUDE(15), "Include name

END OF X_FINAL.

  • I N T E R N A L T A B L E D E C L A R A T I O N S *

DATA: IT_TSTC TYPE STANDARD TABLE OF X_TSTC WITH HEADER LINE.

DATA: IT_TADIR TYPE STANDARD TABLE OF X_TADIR WITH HEADER LINE.

DATA: IT_JTAB TYPE STANDARD TABLE OF X_SLOG WITH HEADER LINE.

DATA: IT_FINAL TYPE STANDARD TABLE OF X_FINAL WITH HEADER LINE.

  • S E L E C T I O N S C R E E N *

SELECTION-SCREEN: BEGIN OF BLOCK BLK01 WITH FRAME TITLE TEXT-T01.

PARAMETERS: P_TCODE LIKE TSTC-TCODE OBLIGATORY.

SELECTION-SCREEN END OF BLOCK BLK01.

  • S t a r t o f S e l e c t i o n *

START-OF-SELECTION.

PERFORM GET_TCODES. "Get Tcodes

PERFORM GET_OBJECTS. "Get Objects

  • E n d o f S e l e c t i o n *

END-OF-SELECTION.

PERFORM DISPLAY_RESULTS. "Display Results

*& Form get_tcodes

FORM GET_TCODES.

SELECT TCODE PGMNA INTO TABLE IT_TSTC FROM TSTC WHERE TCODE = P_TCODE.

IF SY-SUBRC = 0.

SORT IT_TSTC BY TCODE.

ENDIF.

ENDFORM. " get_tcodes

*& Form get_objects

FORM GET_OBJECTS.

DATA: L_FNAME LIKE RS38L-NAME,

L_GROUP LIKE RS38L-AREA,

L_INCLUDE LIKE RS38L-INCLUDE,

L_NAMESPACE LIKE RS38L-NAMESPACE,

L_STR_AREA LIKE RS38L-STR_AREA.

DATA: V_INCLUDE LIKE RODIOBJ-IOBJNM.

DATA: E_T_INCLUDE TYPE STANDARD TABLE OF ABAPSOURCE WITH HEADER LINE.

DATA: L_LINE TYPE STRING,

L_TABIX LIKE SY-TABIX.

IF NOT IT_TSTC[] IS INITIAL.

SELECT OBJ_NAME DEVCLASS INTO TABLE IT_TADIR FROM TADIR FOR ALL ENTRIES IN IT_TSTC

WHERE PGMID = 'R3TR' AND OBJECT = 'PROG' AND OBJ_NAME = IT_TSTC-PGMNA.

IF SY-SUBRC = 0.

SORT IT_TADIR BY OBJ_NAME DEVCLASS.

SELECT OBJ_NAME INTO TABLE IT_JTAB FROM TADIR FOR ALL ENTRIES IN IT_TADIR

WHERE PGMID = 'R3TR' AND OBJECT = 'SMOD' AND DEVCLASS = IT_TADIR-DEVCLASS.

IF SY-SUBRC = 0.

SORT IT_JTAB BY OBJ_NAME.

ENDIF. ENDIF. ENDIF.

*- Get UserExit names

LOOP AT IT_JTAB.

SELECT NAME MEMBER INTO (IT_FINAL-NAME, IT_FINAL-MEMBER)

FROM MODSAP WHERE NAME = IT_JTAB-OBJ_NAME AND TYP = 'E'.

APPEND IT_FINAL.

CLEAR IT_FINAL.

ENDSELECT.

ENDLOOP.

*- Process it_final contents.

LOOP AT IT_FINAL.

L_TABIX = SY-TABIX.

CLEAR: L_FNAME, L_GROUP, L_INCLUDE, L_NAMESPACE, L_STR_AREA.

L_FNAME = IT_FINAL-MEMBER.

CALL FUNCTION 'FUNCTION_EXISTS'

EXPORTING

FUNCNAME = L_FNAME

IMPORTING

GROUP = L_GROUP

INCLUDE = L_INCLUDE

NAMESPACE = L_NAMESPACE

STR_AREA = L_STR_AREA

EXCEPTIONS

FUNCTION_NOT_EXIST = 1

OTHERS = 2.

IF SY-SUBRC = 0.

IF NOT L_INCLUDE IS INITIAL.

*- Get Source code of include.

CLEAR: V_INCLUDE, E_T_INCLUDE, E_T_INCLUDE[].

V_INCLUDE = L_INCLUDE.

CALL FUNCTION 'MU_INCLUDE_GET'

EXPORTING

I_INCLUDE = V_INCLUDE

TABLES

E_T_INCLUDE = E_T_INCLUDE.

IF SY-SUBRC = 0.

LOOP AT E_T_INCLUDE.

IF E_T_INCLUDE-LINE CS 'INCLUDE'.

CLEAR L_LINE.

L_LINE = E_T_INCLUDE-LINE.

CONDENSE L_LINE NO-GAPS.

TRANSLATE L_LINE USING '. '.

L_LINE = L_LINE+7(9).

IT_FINAL-INCLUDE = L_LINE.

MODIFY IT_FINAL INDEX L_TABIX TRANSPORTING INCLUDE.

ENDIF. ENDLOOP.

ENDIF.ENDIF.ENDIF.

ENDLOOP.

ENDFORM. " get_objects

*& Form display_results

FORM DISPLAY_RESULTS.

FORMAT COLOR COL_HEADING.

WRITE:/1(150) SY-ULINE.

WRITE:/ SY-VLINE,

2(23) 'Extension Name', 24 SY-VLINE,

25(39) 'Exit Name', 64 SY-VLINE,

65(74) 'Description', 140 SY-VLINE,

141(9) 'Include', 150 SY-VLINE.

WRITE:/1(150) SY-ULINE.

FORMAT RESET.

SORT IT_FINAL BY NAME MEMBER.

LOOP AT IT_FINAL.

CLEAR TFTIT.

SELECT SINGLE STEXT INTO TFTIT-STEXT FROM TFTIT WHERE SPRAS = 'EN' AND

FUNCNAME = IT_FINAL-MEMBER.

WRITE:/ SY-VLINE,

IT_FINAL-NAME COLOR COL_KEY, 24 SY-VLINE,

25 IT_FINAL-MEMBER, 64 SY-VLINE,

65 TFTIT-STEXT, 140 SY-VLINE,

141 IT_FINAL-INCLUDE, 150 SY-VLINE.

WRITE:/1(150) SY-ULINE.

ENDLOOP.

ENDFORM. " display_results