zoukankan      html  css  js  c++  java
  • 一个小技巧,快速找出一段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.

    要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  • 相关阅读:
    poj 3667 Hotel
    codevs 1380 没有上司的舞会
    bzoj 4033 树上染色
    bzoj 1179 [APIO 2009]Atm(APIO水题)
    poj 1741 Tree
    bzoj 3600 没有人的算术
    poj 3233 Matrix Power Series
    hdu 2256 Problem of Precision -矩阵快速幂
    [矩阵十题第七题]vijos 1067 Warcraft III 守望者的烦恼 -矩阵快速幂
    main函数递归
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/13631489.html
Copyright © 2011-2022 走看看