2016 Jan 22 5:50 AM
Hi abapers ,
I have developed BTE For tcode : f.27 to trigger mail but this bte being called to another print programs also , how can i can restrict my BTE for Perticular Tcode : F.27. Please give some idea plzzzzzzzzz.
2016 Jan 22 6:05 AM
Hi Balaji,
In sample function module which gets created when u click on sample function module and put codition there like below .
If sy-tcode <> 'FB50' " Use the tcode which u want to restrict in place of FB50
* Your code .
Endif.
I hope it may help you.
Best Regards.
2016 Jan 22 6:16 AM
my tcode is F.27 so can we writer like below
If sy-tcode = 'F.27'
code
endif.
2016 Jan 22 6:20 AM
2016 Jan 22 7:35 AM
Look at F.27 definition with SE93, you will note that F.27 is a Parameter Transaction so actual value of SY-TCODE is SA39, so you cannot use this test.
There are other solutions thay you should try
If that doesn't solve the problem, which BTE do you call, is it executed during transaction, during update task?
Regards,
Raymond
2016 Jan 22 8:32 AM
Hi Reymond,
As you told i gone thru program RFKORK00. how to find call stack and do the coding .please help ;me .
2016 Jan 22 8:41 AM
Hello Balaji
The call stack is visible in debugger. Put a break point in your BTE and when the program stops the below mentioned screen shot will highlight the call stack. Use the above mentioned functions module to get the call stack. This will be different for the call of same exit via different transaction. Code your logic based on this. else use the class and method as mentioned by Raymond.
thanks
Nabheet
2016 Jan 22 11:02 AM
Hi Nabheet ,
I am unable to find any call stack in that scree shot. Can you please elaborate .
2016 Jan 22 11:06 AM
As nabheet madan wrote you can look at the call stack in debug, I already provided you the FM to call in your BTE implementation code to do it programmatically (call the FM and READ/LOOP AT TABLE for the report name)
Regards,
Raymond
2016 Jan 22 11:47 AM
Hi Raymond ,
Can we use code like below
if SY-CPROG = ZFKORD11
bte code
endif. to restrict bte for Particular program.
2016 Jan 22 12:08 PM
2016 Jan 25 6:49 AM
2016 Jan 25 7:12 AM
Hi Balaji,
Debug the BTE and check the values of syst variables and use them to restrict BTE code.
Regards,
Raghav