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: 

To find an user exit from a FM

Former Member
0 Kudos

Hi All,

Suppose I have a function module , which corresponds to a particular exit(which I do not know). How do I back trace the user exit from the FM ?

Plz help.

3 REPLIES 3

Former Member
0 Kudos

Hi Pradipta,

One way is that you can use where used list. Then the system will show you the program where it is called.

Thanks and Regards,

Bharat Kumar Reddy.V

peter_atkin
Active Contributor

Go to TCode SMOD, select F4, enter the FM name in the selection criteria (you need to press a button at the bottom of the pop-up to expand the fields)

Former Member
0 Kudos

Hi Pradipta,

Please check this code.

REPORT  y_rtest                                 .

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





DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : v_devclass LIKE tadir-devclass.



SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.

SELECTION-SCREEN SKIP.

PARAMETERS : p_funam LIKE enlfdir-funcname OBLIGATORY.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN END OF BLOCK a01.

SELECT SINGLE * FROM enlfdir

WHERE funcname = p_funam.



SELECT SINGLE * FROM tadir

WHERE pgmid = 'R3TR'

AND object = 'FUGS'

AND obj_name = enlfdir-area.



MOVE : tadir-devclass TO v_devclass.

* Find SAP Modifactions

SELECT * FROM tadir

INTO TABLE jtab

WHERE pgmid = 'R3TR'

AND object = 'SMOD'

AND devclass = v_devclass.


BREAK-POINT.


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.

* Take the user to SMOD for the Exit that was selected.

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.

Regards ,

Ranjit Thakur.

Please Mark the Helpful Answer.

Message was edited by: Ranjit Thakur

Message was edited by: Ranjit Thakur