zoukankan      html  css  js  c++  java
  • ABAP代码分析工具

    ABAP static analysis tool SQF is a static code analysis tool developed in package SUPPORT_QUERY_FRAMEWORK in software component SAP_BASIS.
    It contains lots of handy tool or short cut to other system utility tools. The most attractive function which is worthy to put it into my toolset is the static code analysis.

    (1) use tcode SQF, double click on “Source code Analysis”

    (2) Maintain the ABAP object which you would like to do static analysis.

    In this example it is function module CRM_PRODUCT_GETLIST2. Specify the object type as well, which could be found in table TADIR.
    The Analysis Depth 6 means: for example in the implementation of the FM, it calls another FM or subroutine, these delegated calls will also be analyzed by the tool. Say FM calls A and A calls B, B calls C, C calls D, D calls E, E calls F and F calls G, depth = 6 means any further calls starting from F calls G will be ignored.

    (3) Click save button and it is automatically navigated back to SQF main view. Click F8 to execute.

    The progress will be displayed in the bottom, the bigger size of depth specified, the more time the analysis will take.

    After execution, the color of icon changes from white to blue, which means the analysis result is available.

    (4) The analysis results are categorized into four groups:

    a. Call hierarchy, something like the one in SAT.

    b. the table read access in static call. Those table read access done via dynamic coding will be listed in group d.

    Compare with DB access list analyzed by runtime trace SAT, there are far more entries than the static one. This is not surprising, as in CRM product, the set type access is implemented in a highly dynamic way.

    c. interface call:

    d. Dynamic coding

    Further reading

    You could still achieve the same result but use different approach – use ABAP code inspector. For details please read this blog: A Small tip to get all transparent tables used in ABAP code . More detail about SQF could also be found from this wiki.

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

  • 相关阅读:
    Struct2_使用Ajax调用Action方法并返回值
    Eclipse使用maven创建struct2项目及遇到的各种坑
    IIS7.5 提示未在本地计算机上注册“Microsoft.Jet.OleDb.4.0”提供程序
    使用Canvas实现下雪功能
    基于脚本的动画的计时控制(“requestAnimationFrame”)(转)
    pointer-events属性
    chrome Provisional headers are shown错误提示
    Wcf资料收集
    Asp.Net WebApi 启用CORS跨域访问指定多个域名
    Cors 跨域Access-Control-Allow-Origin
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/13446760.html
Copyright © 2011-2022 走看看