简体   繁体   English

可以在 RFC 用户下调试吗?

[英]Debugging under RFC user possible?

I have written an ABAP function module, which works fine if I execute it with my developer account.我写了一个 ABAP 功能模块,如果我用我的开发者帐户执行它,它可以正常工作。

If another user executes it, he gets an empty result.如果另一个用户执行它,他会得到一个空的结果。 The other user is an RFC-account which cannot log in with the SAP GUI.另一个用户是无法使用 SAP GUI 登录的 RFC 帐户。

I am clueless how to debug this.我不知道如何调试它。 How can I execute/debug a function module and pretend to be a different user?我如何执行/调试功能模块并假装成不同的用户?

I am using the Windows-native SAP GUI and transaction code SE80 .我使用的是 Windows 原生 SAP GUI 和事务代码SE80

If the SAP user is defined as type "Dialog" or "Service" (transaction code SU01 ) then it's technically feasible to use the SAP GUI (log in with that user and debug).如果 SAP 用户被定义为“对话”或“服务”类型(事务代码SU01 ),那么使用 SAP GUI(使用该用户登录并调试)在技术上是可行的。

If the SAP user is defined as type "Communication" or "System" then it's not possible at all.如果 SAP 用户被定义为“通信”或“系统”类型,则根本不可能。

You can see that as a security measure: if you have a Web Service which runs under a given SAP user, it should not be possible that this user is used for direct SAP GUI usage, to limit possible attacks.您可以将其视为一种安全措施:如果您有一个在给定 SAP 用户下运行的 Web 服务,则该用户不可能用于直接使用 SAP GUI,以限制可能的攻击。

So, I think the only reasonable solution is to use temporarily another SAP user of type "Service" for instance, or change the type of the SAP user, for the duration of the debug.因此,我认为唯一合理的解决方案是在调试期间临时使用另一个“服务”类型的 SAP 用户,或者更改 SAP 用户的类型。

It's possible to debug another user by selecting the user to debug, either via Eclipse ADT debug properties, or via the ABAP Workbench ABAP Debug Settings, depending on the Integrated Development Environment you are using.可以通过选择要调试的用户来调试另一个用户,方法是通过 Eclipse ADT 调试属性,或通过 ABAP Workbench ABAP 调试设置,具体取决于您使用的集成开发环境。

Another solution is, if you have the possibility to change your code temporarily, to add an endless loop ( DO. ENDDO. ), debug the running program via the transaction SM50 , menu Administration -> Program -> Debugging, which should open a debug dialog which points at the loop, place the cursor on the line after the loop and press F12 to continue from there.另一种解决方案是,如果您有可能临时更改代码,添加一个无限循环( DO.ENDDO DO. ENDDO. ),通过事务SM50调试正在运行的程序,菜单 Administration -> Program -> Debugging,这应该打开一个调试指向循环的对话框,将光标放在循环之后的行上,然后按 F12 从那里继续。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM