专栏首页Jerry的SAP技术分享一个小技巧,快速找出一段ABAP代码里访问到的所有透明表

一个小技巧,快速找出一段ABAP代码里访问到的所有透明表

If you need a list of all transparent tables used in a given ABAP class ( or function module, objects which belong to a given transport request, etc ) for analysis usage, you could follow the tips below, it is very simple but efficient.

Suppose you need to scan ABAP class CL_CRM_OPPORTUNITY_IMPL to find out all transparent tables used by this class.

(1) use tcode SCI, create a new check variant:

Enable “Table Names from SELECT statements” and save variant.

(2) create a new inspection:

Specify the class to be scanned, and load the check variant created in step one, then execute the inspection.

(3) Once inspection is done, you see a green light and could get the inspection result by clicking button below:

All accessed tables are listed there:

Double click on each entry and the ABAP code will automatically be opened. Quite easy, isn’t it?

Summary

As we know that the code inspection is done statically by scanning source code so any other tables which are accessed dynamically by dynamic SQL in the runtime will not appear in the scan result of code inspector. If you need to get the COMPLETE list of the tables involved within a given part of ABAP codes, it is recommended to use transaction code ST05, ST12 or SAT to trace the scenario in the runtime.

Further reading

(1) ABAP Code inspector is far more than a static code scanner but in my opinion a powerful weapon which is for every ABAPer worth adding it to your toolbox. For more extensive usage on it to make your life easier, please read this document Useful tips regarding ABAP code inspector that you may not know.

(2) Besides the approach to get accessed table list introduced in this blog, there is another approach using transaction code SQF, which is also done based on static code scan. For details please read ABAP static analysis tool SQF.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 如何通过Chrome直接创建Opportunity的文本

    Since we need to use HTTP post for note creation, it is necessary to get a CSRF ...

    Jerry Wang
  • 如何通过Chrome直接创建Opportunity的文本

    Since we need to use HTTP post for note creation, it is necessary to get a CSRF ...

    Jerry Wang
  • 干了SAP开发这么多年,我都积累了哪些程序调试技巧

    One of my new colleague is asking me whether I have some best practice which cou...

    Jerry Wang
  • Simulate a Windows Service using ASP.NET to run scheduled jobs

    Introduction How to run scheduled jobs from ASP.NET without requiring a Windows ...

    阿新
  • Hack the box: Bastion

    In conclusion, Bastion is not a medium box. But it would be easier to solve this...

    madneal
  • SAP Enterprise Commerce调试环境搭建

    This blog is written to demonstrate how to setup debug environment for Hybris EC...

    Jerry Wang
  • GPIOs and Go

    Recently, I decided that I needed a small heads up display for import things I k...

    李海彬
  • 用.NET Framework 2.0创建 Form设计器[翻译]

        这两天赶鸭子上驾,学习Form设计器,下面这篇在Msdn Magazine的文章可谓是经典,这两天学习了感觉还是做个翻译出来,更能够加强理解。对各位同...

    张善友
  • 如何把一个ABAP视图添加到SAP GUI的收藏夹里

    The idea comes from Sougata Chatterjee’s anwser in this thread:

    Jerry Wang
  • linux到3.0了

    Yay! Let the bikeshed painting discussions about version numbering begin (or at...

    用户3765803

扫码关注云+社区

领取腾讯云代金券