2022 Feb 07 7:06 AM
hi.
Need suggestions. I have created one FM. this is called by External system.
Some how, the output is not giving... it is having some condition inside..
Exactly where it is stopping not able to find. but this is run by Technical user. User type B system not dialog
so, even though if i put external break point with this user. I cannot debug it.
I try to check St12. I think by using St12 also. only normal user we can do the trace.
But i want to need to debug of Technical user. is there any way to do debug it.
2022 Feb 07 8:46 AM
Hello newb
The tool that I like to use in situations like yours is the FBGENDAT report. It's described in the note 517767 - Generate test data for function modulesYou need to implement two changes in your function module to use it:
Then you need to activate the test data generation by setting user parameter FBGENDAT to X. It needs to be set for the user with which the function is called.
Next, activate the generation for the function with FBGENDAT report. Those are the two fist points of the 517767 note.
When you activate like this, during next function call all the input data will be recorded in the test data directory of the function. So then, you can go to SE37, test your function and get the data with "Test data directory" button.
I've found this approach very useful and it helped me several times.
Best regards
Dominik Tylczynski
2022 Feb 07 9:16 AM
2022 Feb 07 9:31 AM
I'm not aware of any SAP official recommendations here. But I can see no reason why that approach could not be used in production. Of course the test data generation should be deactivated when not needed, the test data should be deleted afterwards as it might be confidential etc. I have used that in production to pin point issues with interfaces.
2022 Feb 07 9:15 AM
Do you know the parameters by which the FM is being called?
2022 Feb 07 9:28 AM
yes.. i know the inputs... if i pass same inputs in se37 it's working fine...
did not find any issue...
2022 Feb 07 9:36 AM
2022 Feb 07 4:45 PM
or copy technical user to new temporary user TEMP, change to dialog type, connect with it, start external debug /HEXT ... (note 1919888), and debug with your own user (in case TEMP has no authorization to debug), and delete TEMP when you're done.
2022 Feb 08 5:51 AM
Some how got little bit progress.. added infinity loop at the beginning. then ask user to trigger the fm. then Sm50 i can able to see the fm calling , i debugged it. It is having conditions.. this condition is not met. this is the reason. Now got the problem... But.. biggest wonder. is. sm50..if i login.. i did not see the log of the z fm..but one of my colleague if he able to see sm50 he can able to see it. i did not understood. I took his credentials.. then open sm50 same from my system. issue. not able to see the log of z fm in sm50. How this happened i did not see. there is alv grid.. there is no filters also. System wise how differently behaving.. Anybody having What is the exact issue. Su53 also i opened in the next session. did not see any missing authorizations. I can able to see other users and technical useres logs. but one specific user(that z fm is calling that technical user i am not able to see) .Still no clarity.. Need answer. just for testing.. from my system. i called zfm. now fm having infinity loop. if i see sm50 i can able to see. but if somebody called from third party system. only to me. not able to see sm50 log. my colleague able to see it with his user credentials and with his system.
2022 Feb 08 12:22 PM
If you do not see the same SM50 as your colleague then your system most likely has more than one application server and you are on a different one from your colleague.
You can use SM51 to switch application servers and check them all.
To trace authorisations don't use SU53, use ST01, setting the filter to be the RFC userid. You need to do this on each application server.
2022 Feb 08 2:29 PM
You can add an external breakpoint on the user's username and ask her to do the call so you can debug on the fly the code as she's running it.
2022 Feb 08 3:30 PM
this is running by technical user.Even if u try also.. it will accept.. it won't accept. I tried to put but. not taking..
2022 Feb 08 4:21 PM