前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ABAP事务码SAT里的Gross time and net time

ABAP事务码SAT里的Gross time and net time

作者头像
Jerry Wang
发布2019-07-04 10:52:23
5690
发布2019-07-04 10:52:23
举报

Created by Jerry Wang, last modified on Oct 06, 2014

以一个简单的例子说明:

代码语言:javascript
复制
REPORT ztest22.
START-OF-SELECTION.
  PERFORM main.
  CALL FUNCTION 'ZTIME_SPENT'
    EXPORTING
      iv_time = 2.
  CALL FUNCTION 'ZTIME_SPENT'
    EXPORTING
      iv_time   = 1
      iv_nested = abap_true.
  WRITE:/ 'finish'.
FORM main.
  WAIT UP TO 1 SECONDS.
ENDFORM.

ZTIME_SPENT的实现:

代码语言:javascript
复制
CHECK iv_time > 0.

WAIT UP TO iv_time SECONDS.

IF iv_nested = abap_true.
   CALL FUNCTION 'ZTIME_SPENT2'
      EXPORTING
         iv_time = iv_time.
ENDIF.

ZTIME_SPENT2的实现:

代码语言:javascript
复制
CHECK iv_time > 0.

WAIT UP TO iv_time SECONDS.

总的gross time: 1 ( subroutine MAIN ) + 2 (ZTIME_SPENT call with iv_nested = abap_false ) + 1 ( time spent on ZTIME_SPENT itself) + 1 ( time spent on ZTIME_SPENT2, since iv_nested = abap_true)

image
image

第一次ZTIME_SPENT调用,其gross time = net time = 2 seconds 第二次ZTIME_SPENT调用, 其net time = 1 second ( WAIT UP TO 1 second), 其gross time 的另一个1 second是花费在另一个function module call ZTIME_SPENT2 上的,因此不能计算在其net time内。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019年07月02日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Created by Jerry Wang, last modified on Oct 06, 2014
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档