当前位置:编程学习 > 网站相关 >>

ABAP--如何获取ABAP的程序的调用堆栈

REPORT demo_mod_tech_perform_int .

DATA: num1 TYPE i,
      num2 TYPE i,
      sum  TYPE i.

num1 = 2. num2 = 4.
PERFORM addit.

FORM addit.
  sum = num1 + num2.
  PERFORM out.
ENDFORM.                    "addit

FORM out.
  field-symbols: <fs> type any.
  data l_cstack_tab  type SYS_CALLST.

  WRITE: / Sum of, num1, and, num2, is, sum.
  CALL FUNCTION SYSTEM_CALLSTACK
    IMPORTING
      et_callstack = l_cstack_tab. " internal table
* l_cstack_tab 里就是abap的调用堆栈   
ENDFORM.                    "out

补充:综合编程 , 其他综合 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,