声明:原创作品,转载时请注明文章来自SAP师太技术博客:www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将追究法律责任!原文链接:http://www.cnblogs.com/jiangzhengjun/p/4292849.html
DATA: BEGIN OF struc2,
a TYPE d,
b TYPE t,
BEGIN OF struc3,
c TYPE f,
d(2) TYPE x,
END OF struc3,
e(4) TYPE x,
f(8) TYPE c,
END OF struc2.
上面的嵌套结构可以这样使用:
struc2-struc3-d = ‘AABB‘.
WRITE: struc2-struc3-d .
如果是使用TYPES定义的嵌套的结构也可以这样访问:
TYPES: BEGIN OF struc2,
a TYPE d,
b TYPE t,
BEGIN OF struc3,
c TYPE f,
d(2) TYPE x,
END OF struc3,
e(4) TYPE x,
f(8) TYPE c,
END OF struc2.
DATA: struc1 TYPE struc2.
struc1-struc3-d = ‘AABB‘.
WRITE: struc1-struc3-d .
时间: 2024-10-13 20:20:12