Skip to Content

How will a collect statement work without primary key definitions?

Jul 30, 2017 at 04:01 AM


avatar image


Internal table has no primary keys in its declaration, but has one numeric, few currency fields and some char type field in it. A collect statement is called.

I would like to know whether this will aggregate columns per data type or wrt which fields would there be an aggregation.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Sandra Rossi Jul 30, 2017 at 07:18 AM

It's all explained in the ABAP documentation of COLLECT:

You didn't say, but I guess your internal table is standard, isn't it ? If so, if you have declared it with TYPE TABLE OF and without mention of WITH ... KEY, then it's using WITH NON-UNIQUE DEFAULT KEY (cf ABAP documentation of DATA - key). Refer to the documentation to know how SAP determines which fields are part of the default key.

k51vw.png (10.9 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Well i would have to test on it whatever I had understood. Thanks for sharing the info.