05-07-2006 6:40 AM
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.
05-07-2006 7:01 AM
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
05-07-2006 8:44 AM
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)
05-08-2006 9:56 AM
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