10-05-2005 12:01 PM
Hi,
I wanted to find out how may user exits in a particular
package are assigned to a project i.e how many exits are active for that system in a particular package / dev class.
Is there any standard report / function module for this or there is any transaction for finding out so.
Any suggestions will be highly appreciated !
Regards,
Hitanshu
10-05-2005 12:54 PM
Hi Hitanshu ,
You can use following code to find active exits in your system .
<b>TABLES : MODATTR, MODACT, MODSAP.
DATA : ITAB_MODATTR LIKE MODATTR OCCURS 0 WITH HEADER LINE.
DATA : ITAB_MODACT LIKE MODACT OCCURS 0 WITH HEADER LINE.
DATA : ITAB_MODSAP LIKE MODSAP OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF ITAB_MODACT1 OCCURS 0,
NAME LIKE MODACT-NAME,
MEMBER(8),
END OF ITAB_MODACT1.
DATA : BEGIN OF ITAB OCCURS 0,
NAME LIKE MODATTR-NAME,
STATUS LIKE MODATTR-STATUS,
MEMBER LIKE MODACT-MEMBER,
COMP LIKE MODSAP-MEMBER,
TYP LIKE MODSAP-TYP,
ACT_COMP, "Whether component is active.
END OF ITAB.
SELECT * FROM MODATTR INTO TABLE ITAB_MODATTR
WHERE STATUS = 'A'.
CHECK SY-SUBRC = 0.
SELECT * FROM MODACT INTO TABLE ITAB_MODACT FOR ALL ENTRIES IN
ITAB_MODATTR WHERE NAME = ITAB_MODATTR-NAME AND MEMBER NE ' '.
LOOP AT ITAB_MODACT.
ITAB_MODACT1-NAME = ITAB_MODACT-NAME.
ITAB_MODACT1-MEMBER = ITAB_MODACT-MEMBER+0(8).
APPEND ITAB_MODACT1.
ENDLOOP.
CHECK SY-SUBRC = 0.
SELECT * FROM MODSAP INTO TABLE ITAB_MODSAP FOR ALL ENTRIES IN
ITAB_MODACT1 WHERE NAME = ITAB_MODACT1-MEMBER AND MEMBER NE ' '.
LOOP AT ITAB_MODATTR.
ITAB-NAME = ITAB_MODATTR-NAME.
ITAB-STATUS = ITAB_MODATTR-STATUS.
LOOP AT ITAB_MODACT1
WHERE NAME = ITAB_MODATTR-NAME .
ITAB-MEMBER = ITAB_MODACT1-MEMBER.
LOOP AT ITAB_MODSAP WHERE NAME = ITAB-MEMBER .
ITAB-COMP = ITAB_MODSAP-MEMBER.
ITAB-TYP = ITAB_MODSAP-TYP.
PERFORM CHECK_COMP_ACTIVE.
APPEND ITAB.
CLEAR : ITAB_MODSAP.
ENDLOOP.
CLEAR : ITAB_MODACT1.
ENDLOOP.
CLEAR : ITAB_MODATTR.
ENDLOOP.
FORMAT COLOR COL_HEADING.
ULINE.
write : / SY-VLINE,
(10) 'PROJECT', sy-vline,
(6) 'STATUS', sy-vline,
(20) 'SAP ENHANCEMENT', sy-vline,
(30) 'COMPONENT',sy-vline,
(4) 'TYPE', SY-VLINE,
(11) 'IMPLEMENTED',SY-VLINE.
ULINE.
FORMAT RESET.
LOOP AT ITAB.
WRITE : / SY-VLINE,
(10) ITAB-NAME,SY-VLINE,
(6) ITAB-STATUS CENTERED,SY-VLINE,
(20) ITAB-MEMBER,SY-VLINE,
(30) ITAB-COMP,SY-VLINE,
(4) ITAB-TYP,SY-VLINE,
(11) ITAB-ACT_COMP CENTERED, SY-VLINE.
ENDLOOP.
ULINE.
&----
*& Form CHECK_COMP_ACTIVE
&----
text
----
--> p1 text
<-- p2 text
----
FORM CHECK_COMP_ACTIVE.
TABLES : TFDIR, TRDIR.
DATA INAME LIKE TRDIR-NAME.
CLEAR ITAB-ACT_COMP.
SELECT SINGLE * FROM TFDIR WHERE FUNCNAME = ITAB-COMP.
IF SY-SUBRC NE 0.
ITAB-ACT_COMP = 'X'.
EXIT.
ENDIF.
CONCATENATE 'Z' TFDIR-PNAME+4(4) 'U' TFDIR-INCLUDE INTO INAME.
CONDENSE INAME.
SELECT SINGLE * FROM TRDIR WHERE NAME = INAME.
IF SY-SUBRC EQ 0.
ITAB-ACT_COMP = 'Y'.
ELSE.
ITAB-ACT_COMP = 'N'.
ENDIF.
ENDFORM. " CHECK_COMP_ACTIVE</b>
The above will give project + Enhancement + Function Module. You can also use standard report RSMODDEL_INACT_EXIT_INCLUDE to get the active exit includes and functions ( this will not give the project info ). If you are on WAS 640 then you have a standard report SNIF which will give all info. If you want to find all active projects in a dev class , you can do an F4 in CMOD ( information system ) and put in the dev class . In any case you will have to do a combination of above methods to get your desired output.
Cheers
10-05-2005 12:07 PM
Hi,
If you goto the SAP Application hierachy (SE81)you can go down into individual modules.
Select the area you are interested. (It should turn yellow).
Choose Information System button.
Select Environment->Exit Techniques>Customer Exits--->Enhancements.
You should now belooking at a selection screen with the DEV classes filled in from the Application hierachy.
If you hit Execute you will get the exits for the selected part of the hierachy!
Try it out.
Regards
Abhishek
10-05-2005 12:09 PM
Hi,
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.
report zuserexit 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
Hope it helps u.
Kindly reward points if u find it useful
Thanks&Regards,
Ruthra
10-05-2005 12:15 PM
Thanks Ruthra.
I am conversant in finding the user exits but the situation here is that i need to find out the active user exits for a package in my system. If say for a package QV ,I have 10 exits, I need to find out the active user exits ( i.e exits for which some code is written inside the 'z' include )for my system.
Hope i have been able to explain the situation here.
Regards,
Hitanshu
10-05-2005 12:20 PM
Hi,
If you want to make a rough calculation goto the Tcode <b>SMOD</b>.In the Enhancement field search for some particular exits.
For ex, some of the exits available for PS type PS and press F4 and this will give you some list of exits meant for PS module. Similarly try out for other modules.
Please reward points if this explanation is useful.
Regards,
Siva
10-05-2005 12:54 PM
Hi Hitanshu ,
You can use following code to find active exits in your system .
<b>TABLES : MODATTR, MODACT, MODSAP.
DATA : ITAB_MODATTR LIKE MODATTR OCCURS 0 WITH HEADER LINE.
DATA : ITAB_MODACT LIKE MODACT OCCURS 0 WITH HEADER LINE.
DATA : ITAB_MODSAP LIKE MODSAP OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF ITAB_MODACT1 OCCURS 0,
NAME LIKE MODACT-NAME,
MEMBER(8),
END OF ITAB_MODACT1.
DATA : BEGIN OF ITAB OCCURS 0,
NAME LIKE MODATTR-NAME,
STATUS LIKE MODATTR-STATUS,
MEMBER LIKE MODACT-MEMBER,
COMP LIKE MODSAP-MEMBER,
TYP LIKE MODSAP-TYP,
ACT_COMP, "Whether component is active.
END OF ITAB.
SELECT * FROM MODATTR INTO TABLE ITAB_MODATTR
WHERE STATUS = 'A'.
CHECK SY-SUBRC = 0.
SELECT * FROM MODACT INTO TABLE ITAB_MODACT FOR ALL ENTRIES IN
ITAB_MODATTR WHERE NAME = ITAB_MODATTR-NAME AND MEMBER NE ' '.
LOOP AT ITAB_MODACT.
ITAB_MODACT1-NAME = ITAB_MODACT-NAME.
ITAB_MODACT1-MEMBER = ITAB_MODACT-MEMBER+0(8).
APPEND ITAB_MODACT1.
ENDLOOP.
CHECK SY-SUBRC = 0.
SELECT * FROM MODSAP INTO TABLE ITAB_MODSAP FOR ALL ENTRIES IN
ITAB_MODACT1 WHERE NAME = ITAB_MODACT1-MEMBER AND MEMBER NE ' '.
LOOP AT ITAB_MODATTR.
ITAB-NAME = ITAB_MODATTR-NAME.
ITAB-STATUS = ITAB_MODATTR-STATUS.
LOOP AT ITAB_MODACT1
WHERE NAME = ITAB_MODATTR-NAME .
ITAB-MEMBER = ITAB_MODACT1-MEMBER.
LOOP AT ITAB_MODSAP WHERE NAME = ITAB-MEMBER .
ITAB-COMP = ITAB_MODSAP-MEMBER.
ITAB-TYP = ITAB_MODSAP-TYP.
PERFORM CHECK_COMP_ACTIVE.
APPEND ITAB.
CLEAR : ITAB_MODSAP.
ENDLOOP.
CLEAR : ITAB_MODACT1.
ENDLOOP.
CLEAR : ITAB_MODATTR.
ENDLOOP.
FORMAT COLOR COL_HEADING.
ULINE.
write : / SY-VLINE,
(10) 'PROJECT', sy-vline,
(6) 'STATUS', sy-vline,
(20) 'SAP ENHANCEMENT', sy-vline,
(30) 'COMPONENT',sy-vline,
(4) 'TYPE', SY-VLINE,
(11) 'IMPLEMENTED',SY-VLINE.
ULINE.
FORMAT RESET.
LOOP AT ITAB.
WRITE : / SY-VLINE,
(10) ITAB-NAME,SY-VLINE,
(6) ITAB-STATUS CENTERED,SY-VLINE,
(20) ITAB-MEMBER,SY-VLINE,
(30) ITAB-COMP,SY-VLINE,
(4) ITAB-TYP,SY-VLINE,
(11) ITAB-ACT_COMP CENTERED, SY-VLINE.
ENDLOOP.
ULINE.
&----
*& Form CHECK_COMP_ACTIVE
&----
text
----
--> p1 text
<-- p2 text
----
FORM CHECK_COMP_ACTIVE.
TABLES : TFDIR, TRDIR.
DATA INAME LIKE TRDIR-NAME.
CLEAR ITAB-ACT_COMP.
SELECT SINGLE * FROM TFDIR WHERE FUNCNAME = ITAB-COMP.
IF SY-SUBRC NE 0.
ITAB-ACT_COMP = 'X'.
EXIT.
ENDIF.
CONCATENATE 'Z' TFDIR-PNAME+4(4) 'U' TFDIR-INCLUDE INTO INAME.
CONDENSE INAME.
SELECT SINGLE * FROM TRDIR WHERE NAME = INAME.
IF SY-SUBRC EQ 0.
ITAB-ACT_COMP = 'Y'.
ELSE.
ITAB-ACT_COMP = 'N'.
ENDIF.
ENDFORM. " CHECK_COMP_ACTIVE</b>
The above will give project + Enhancement + Function Module. You can also use standard report RSMODDEL_INACT_EXIT_INCLUDE to get the active exit includes and functions ( this will not give the project info ). If you are on WAS 640 then you have a standard report SNIF which will give all info. If you want to find all active projects in a dev class , you can do an F4 in CMOD ( information system ) and put in the dev class . In any case you will have to do a combination of above methods to get your desired output.
Cheers
10-05-2005 1:06 PM
Thanks Sanjay,
I really appreciate ur inputs regarding this issue.
Regards,
Hitanshu
10-05-2005 1:12 PM
Hi Sanjay,
It has solved my problem here.
thanks once agin.
Regards,
Hitanshu
10-05-2005 1:22 PM
Hi Hitanshu,
Dont forget to reward points if answers were helpful.
Cheers