赞
踩
获取表的长度
SELECT * FROM MARA INTO TABLE @DATA(LT_MARA) UP TO 10 ROWS.
"1.lines用法
data(line) = lines( LT_MARA ). "获取到line = 10 .内表的长度为10
"2.DESCRIBE TABLE 用法
data n1 type i.
DESCRIBE TABLE lt_mara LINES n1.
获取字段的长度和属性,这可厉害了
DATA :S1 TYPE STRING.
DATA :S2 TYPE STRING.
DATA :HLP TYPE STRING.READ TABLE LT_MARA ASSIGNING FIELD-SYMBOL(<FS_MARA>) INDEX 1.
DESCRIBE FIELD <FS_MARA>-MATNR TYPE S1 COMPONENTS S2 HELP-ID HLP."S1为字段类型CHAR类型,S2为下面几个子元素,因为咱们定义这个内表是根据数据字典定义的,可以获取到HLP为MARA-MATNR.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。