08-01-2005 8:14 AM
Please advice, how do I search for USER EXITS being modified by ABAPer's.
Regards
Venkat
08-01-2005 8:19 AM
Hi Venkat,
Go to CMOD and SMOD. You can find it there. Else best place is IMG.
Cheers,
Sam
08-01-2005 8:31 AM
you have this excelent piece of code that i found on SDN. Just put your TCODE or main program and run:
REPORT z_find_user_exit NO STANDARD PAGE HEADING MESSAGE-ID zmessages.
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.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
PARAMETERS : p_tcode LIKE tstc-tcode.
PARAMETERS : p_prog LIKE tstc-pgmna.
SELECTION-SCREEN END OF BLOCK bl1.
IF p_tcode IS INITIAL
AND p_prog IS INITIAL.
MESSAGE e213.
ELSEIF NOT p_tcode IS INITIAL
AND NOT p_prog IS INITIAL.
MESSAGE e213.
ENDIF.
IF NOT p_tcode IS INITIAL.
SELECT SINGLE *
FROM tstc
WHERE tcode EQ p_tcode.
ELSE.
tstc-pgmna = p_prog.
ENDIF.
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 = 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.
IF NOT p_tcode IS INITIAL.
SELECT SINGLE *
FROM tstct
WHERE sprsl = sy-langu
AND tcode = p_tcode.
ELSE.
tstct-ttext = p_prog.
ENDIF.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
IF NOT p_tcode IS INITIAL.
WRITE:/(19) 'Transaction Code - '.
ELSE.
WRITE:/(19) 'Program Name - '.
ENDIF.
WRITE: 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.
08-01-2005 9:18 AM
08-01-2005 9:28 AM
Hi,
Here is the piece of code to find the USER EXIT for a transaction code.
*&---------------------------------------------------------------------*
*& Report YUSEREXIT *
*& *
*&---------------------------------------------------------------------*
*& Gives a list of user exits for a particular T-Code. *
*& *
*&---------------------------------------------------------------------*
REPORT yuserexit 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.
*---End of Program.
But u have to create a SCREEN for this.
Regs,
Venkat
08-01-2005 10:13 AM
Hi,
User exit is a functionality provided by SAP to add custom validation or enhancements to existing SAP transaction. Every module pool has customer function FORM in PBO and PAI. This form is basically a function that has an INCLUDE object that starts with 'zx'.
So check for the includes that start with zx and created/edited by ABAP user login. Then find the project to which project the user exit belongs to.
Regards
Dhanapal
08-02-2005 4:08 AM
There are three tables which will help you to find the Exits in a project.
MODACT -> Active modifications (Project to enhancement link)
MODATTR -> Projects created
MODSAP -> Enhancements (Enhancement to Exit link)
Moreover if you know the project name, you may call the function MOD_KUN_MEMBERSCRN to get the list of Enhancements included in it.
~Juwin.
08-02-2005 9:25 AM
Hi
Use FM
EXIT_SAPLRPIN_001.
In that dbl click on ZXP02U01, it will create a new include program.
In that include write or use FM
POPUP_TO_CONFIRM_STEP
I think it works fine.
Regards,
Prasad.
08-02-2005 1:27 PM
well. sometimes you can also find them quickly searching for 'call customer' in the program globally.
but the programs mentioned above look nicer. I have to admit.
e.g. enter bapi_po_create1 in SE37 and then enter the string call customer. it should reveal this here:
CALL CUSTOMER-FUNCTION '001'
TABLES
poitem = poitem
poitemx = poitemx
poaddrdelivery = poaddrdelivery
poschedule = poschedule
poschedulex = poschedulex
poaccount = poaccount
poaccountprofitsegment = poaccountprofitsegment
poaccountx = poaccountx
pocond = pocond
etc.
Message was edited by: robert veit