cancel
Showing results for 
Search instead for 
Did you mean: 

为什么说这种定义内表的方法是错的

Former Member
0 Kudos

DATA gt_itab TYPE TABLE OF <Table type>.

This would result in the definition of an internal table with rows that are themselves internal tables (of the specified table type)!

初级问题,请帮忙解释一下这句话什么意思?为什么说这种定义内表的方法是错的。谢谢~~~!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks , I know what you mean.

Would u please kindly translate "This would ..." into Chinese, then I could make it clear...

Former Member
0 Kudos

DATA gt_itab TYPE TABLE OF <Table type>.

This would result in the definition of an internal table with rows that are themselves internal tables (of the specified table type)!

意思是说这样的定义会变成嵌套表的结构, 就是你定义的内表的行本身就是个内表。

Answers (4)

Answers (4)

Former Member
0 Kudos

学习了,这种定义方式我也干过,哈哈

Former Member
0 Kudos

Thanks a lot.

Have a good day..

Former Member
0 Kudos

1. TYPE TABLE OF <TYPE>,<TYPE>指的是internal table的line type所以应该是structure

2. <table type> 就已经定义好了internal type的line type和iaccess type以及key,所以通过DATA it_tabe TYPE <table_type>就可以直接定义internal table

Former Member
0 Kudos

You can use either of the following ways to define the internal table.

DATA gt_itab TYPE <Table type>.

DATA gt_itab TYPE TABLE OF <Structure>.