ABAP Help Document(4):1.4 链式表达式

1.4 链式表达式

示例:

"Chained Statements
FORM f_chained_statements.
  "定义结构
  TYPES:BEGIN OF struc1,
          name TYPE C LENGTH 20,
          age TYPE I,
        END OF struc1.
  "完整表示
  TYPES:BEGIN OF struc2.
  TYPES: name TYPE C LENGTH 20.
  TYPES: age TYPE I.
  TYPES:END OF struc2.
  
  "链式调用方法传入参数
*  CALL FUNCTION func EXPORTING param = : '1','2','3'.
*  "相当于调用多次方法
*  CALL FUNCTION func EXPORTING param = '1'.
*  CALL FUNCTION func EXPORTING param = '2'.
*  CALL FUNCTION func EXPORTING param = '3'.
  
ENDFORM.

 

 

posted @ 2021-04-21 21:00  渔歌晚唱  阅读(111)  评论(0编辑  收藏  举报