Skip to Content
-1

How will a collect statement work without primary key definitions?

Hii

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.

Regards

Diganto

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    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.

    Add comment
    10|10000 characters needed characters exceeded