Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Collect statement on structure and table

Former Member
0 Likes
955

Hi All,

There is an issue in upgradation 4.7 to 6.0.

In 4.7 there is collect statement for a table. and in 6.0 the same table is called in to a structure by include statement. now in 6.0 the same collect statement on structure but, it is not working.

Please clarify regarding this issue.

2 REPLIES 2
Read only

Former Member
0 Likes
627

hi,

collect statement is used on an internal table and not on a structure.

Read only

Former Member
0 Likes
627

HI Mythili

As Per my knowledge you are talking about the collect statement to append diffrent values and update existing values in the table.

in 4.7 we use this statement, But as you said a table is included in a structure using include statement,

This is actually, that table is a structure not a table

example.

Data: begin of itab occurs 0.

include structure mara.

data: end of itab.

Here you can see after include there is a structure which Identifies that we are including the structure mara not the table, because in SAP mara is a table as well as a structure.

but you cannot write like:

data: begin of itab occurs 0.

include table mara.

data: end of itab.

becasue here we are trying to include a table which is not possible,

and the COLLECT statement is always used on an internal table.

Thanks

Lalit Gupta