‎2006 Jul 13 5:10 AM
Hi,
Is there a Exit for starting a transaction code? When starting a transaction code, some ABAP statements should be executed.
Thanks
RT
‎2006 Jul 13 5:48 AM
Hi Rob,
Normally user exits are used for the validations or some extra functionality depending upon the user input.
Hence, It is difficult to find a exit at the start of any transaction.
The user exits are provided only after some user input.
Try to find if any exit is available before SAVE action.
If you want to find the Exit for a particular transaction,
open that tcode in SE93 and start Object Browser.
Under function groups, locate the function groups which start with 'X'. These are normally the exits.
Hope it helps.
Regards,
Shashank
‎2006 Jul 13 5:17 AM
Hi ROB ,
u can use Authorization Objects .
call function 'AUTHORITY_CHECK_TCODE'
exporting
tcode = 'YSCC'
exceptions
ok = 0
not_ok = 2.
if sy-subrc eq 2.
message e077(s#) with 'YSCC'. " No authorization to transaction
else.
call transaction 'YSCC'.
endif.Regards
Prabhu
‎2006 Jul 13 5:30 AM
Hi Prabhu,
I am thinking of clearing the data content of a transparent table when a user starts a transaction code. How ould I do this when using this call? I am not seeing it here? Wher would I put the code to clear the data content of a table?
Thanks,
RT
‎2006 Jul 13 5:39 AM
Hello Rob,
Find out the Exit for that transaction. Put your code to delete the contents of the table.
Regards,
Naimesh Patle
‎2006 Jul 13 5:42 AM
Hi ROB ,
can u explain us ? whats the Business Requirement ? Tables means Y or Z tables ? this is for all Standard Tcodes or for Y Tcodes only.
regards
Prabhu
‎2006 Jul 13 5:47 AM
Hi Naimesh Patel
How would I find out the Exit for that transaction?
Thanks,
RT
‎2006 Jul 13 5:49 AM
Hello Rob,
Find out the program name of the transaction. GO to table MODSAP. Give member = EXIT_progname*. You will have list of the exits which are used that transaction.
Regards,
Naimesh
‎2006 Jul 13 5:38 AM
HI
GOOD
NO NEED TO GO FOR ANY EXIT YOU CAN DO IT LIKE THIS
1- OPEN THE ABAP WORKBENCH SCREEN
2-CREATE A REPORT AND CREATE A TCODE USING SE93 TO EXECUTE THAT REPORT
3-GO TO FAVOURITES->INSERT TRANSACTION
4- GIVE THE TRANSACTION CODE THERE THAT YOU HAVE CREATED TO RUN YOUR REPORT.
5-NOW WHEN YOU START YOUR ABAP WORKBENCH THIS THE TCODE THAT YOU HAD GIVN LL RUN AND IT LL EXECUTE THE ABAP CODE FOR WHICH YOU HAD CREATED THE TCODE.
THANKS
MRUTYUN
‎2006 Jul 13 5:43 AM
Hi MRUTYUN,
I am referring to a SAP standard transaction code. What you have described is for a Z transaciton code.
Thanks,
RT
Message was edited by: Rob Thomas
‎2006 Jul 13 5:46 AM
Hi Prabhu,
I am actually working BW and the transaciton code is RSA1, for example.
Thanks,
RT
‎2006 Jul 13 5:48 AM
Hi Rob,
Normally user exits are used for the validations or some extra functionality depending upon the user input.
Hence, It is difficult to find a exit at the start of any transaction.
The user exits are provided only after some user input.
Try to find if any exit is available before SAVE action.
If you want to find the Exit for a particular transaction,
open that tcode in SE93 and start Object Browser.
Under function groups, locate the function groups which start with 'X'. These are normally the exits.
Hope it helps.
Regards,
Shashank
‎2006 Jul 13 5:52 AM
Thank you to all. I rewarded all points. I will try all your recommendations.
RT
Message was edited by: Rob Thomas
‎2006 Jul 13 5:59 AM
Hi Rob,
Just copy and paste below code in a report and execute.
You will get the user exit for the given tcode.
Regards,
Shashank
-
Code----
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