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.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
文摘归档
- 2021年01月(8)
- 2020年10月(10)
- 2020年09月(13)
- 2020年05月(35)
- 2019年04月(2)
- 2019年03月(6)
- 2019年02月(29)
- 2019年01月(61)
- 2018年12月(14)
阅读排行榜
- 如何把某个网站的SSL Server certificate链导入到ABAP Netweaver系统里 (534)
- SAP C/4HANA Sales Cloud使用OData服务和第三方系统集成的一个具体例子 (519)
- 基于SAP Kyma的订单编排增强介绍 (474)
- 浅谈SAP Cloud for Sales 自动化 (451)
- 一个SAP开发人员的2018年终总结 (376)
- 使用函数BAPISDORDER_GETDETAILEDLIST读取S/4HANA中Sales Order行项目数据 (362)
- 容器,Docker, Kubernetes和Kyma,以及Kyma对SAP的意义 (350)
- SAP C/4HANA与人工智能和增强现实(AR)技术结合的又一个创新案例 (341)
- SAP成都研究院2018年总共87篇技术文章合集 (337)
- 一些SAP Partners能够通过二次开发实现打通C/4HANA和S/4HANA的方法介绍 (334)