The substructures are resolved in a table comprehension in the output. The inline declaration of the third SELECT statement creates an internal table with a non-nested row structure. The components of the row are determined directly using the columns specified in the SELECT list. ...
cl_demo_output=>display( lt_sight ). 运行结果: 声明和创建变量 内联声明(inline declaration ) 在上面的例子中还有一个INTO TABLE @DATA(lt_sight) 的语法,这就是内联声明,能根据查询的内容来创建本地变量。我们再来多看几个内联声明的例子。 ABAP 7.4 以前: DATA: lv_vehicle TYPE string. lv_vehicle =...
FINAL 关键字的另一半作用,和 ABAP 内联声明 - Inline Declaration 有关。 ABAP 内联声明是 ABAP 740 引入的一个新的语言特性。 在传统的 ABAP 类或者 Function Module 内部,常常可以在代码的起始位置,看到下图这种大段大段的使用 DATA 关键字开头的变量声明语句。 在SAP 官方文档中,这种传统的变量声明方式,称为...
"行内定义(inline declaration)变量 DATA itab TYPE TABLE OF scarr. SELECT * FROM scarr into TABLE itab. READ TABLE itab WITH KEY carrid = 'LH' INTO DATA(wa). "行内定义(inline declaration)变量 LOOP AT同理,注意行内定义的变量作用域和以前定义的是一样的。
Inline declaration of the full target area. The declaration operator DATA must be prefixed with the escape character @. The data type of the new data object is constructed in accordance with the structure of the results set defined after SELECT and the number of data sources specified after ...
SELECT * FROM scarr into TABLE itab. READ TABLE itab WITH KEY carrid = 'LH' INTO DATA(wa). "行内定义(inline declaration)变量 LOOP AT同理,注意行内定义的变量作用域和以前定义的是一样的。 又比如在方法中接收返回变量时: 原: DATA a1 TYPE... DATA...
Inline declaration of an internal table as a target field of a SELECT statement and inline declaration of a variable for the table transformed to HTML. The data type of the variable is determined by the return value of the method. SELECT * ...
Inline declaration of an internal table as a target field of a SELECT statement and inline declaration of a variable for the table transformed to HTML. The data type of the variable is determined by the return value of the method. SELECT * ...
SELECT*FROMscarrintoTABLEitab. READTABLEitabWITHKEYcarrid='LH'INTODATA(wa)."行内定义(inlinedeclaration)变量 LOOPAT同理,注意行内定义的变量作用域和以前定义的是一样的。 又比如在方法中接收返回变量时: 原: [plain]viewplaincopyprint? DATA a1 TYPE... DATA...
ABAP 7.40 新语法介绍系列之一 - ABAP 变量内联声明(Inline Declaration) ABAP 7.40 新语法介绍系列之二 - ABAP 类型转换操作符 CONV ABAP 7.40 新语法介绍系列之三 - ABAP Value 操作符 ABAP 7.40 新语法介绍系列之四 - ABAP Table Expression 内表表达式的用法 ...