简体   繁体   English

如何无限制地阅读源代码?

[英]How to read the source code without restrictions?

There is a task reading the source codes of ABAP reports.有一个任务是阅读 ABAP 报告的源代码。 I usually use the function: RFC_READ_DEVELOPMENT_OBJECT or RFC_READ_REPORT.我通常使用函数:RFC_READ_DEVELOPMENT_OBJECT 或 RFC_READ_REPORT。 But these functions have some limits: in the line should not exceed 72 characters (if more then error).但是这些函数有一些限制:在行中不能超过 72 个字符(如果超过则错误)。 72 characters because table QTAB = 72 characters on line 72 个字符,因为表 QTAB = 72 个字符在线

As vwegert suggests in his comment, you could write your own remote-enabled function module.正如 vwegert 在他的评论中所建议的那样,您可以编写自己的远程启用功能模块。 It is very easy.这很容易。 Refer to the following blog post for a suggestion: http://ceronio.net/2009/06/improved-abap-source-code-search/请参阅以下博客文章以获取建议: http : //ceronio.net/2009/06/improved-abap-source-code-search/

The function makes use of the READ REPORT statement to read source code of a program.该函数使用READ REPORT语句来读取程序的源代码。

DATA: itab TYPE TABLE OF string,
      prog TYPE syrepid.

prog = 'SAPMSSY0'.

READ REPORT prog INTO itab.

IF sy-subrc = 0.
  " source code unit is read successfully into "itab"
ENDIF.

The only drawback is if you don't have a developer key.唯一的缺点是如果您没有开发人员密钥。

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

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