SAP CORRESPONDING CONSTR DUPL



Get Example source ABAP code based on a different SAP table
  


• DISCARDING DUPLICATES CORRESPONDING

CORRESPONDING, duplicates

ABAP_SYNTAX
... DISCARDING DUPLICATES ...

What does it do?
Addition for handling duplicate lines in the component operator CORRESPONDING. The addition DISCARDING DUPLICATES can be specified:
After a tabular parameter itab in the basic form.
After mapping relationships t1 = s1, t2 = s2, ... for tabular components.
The addition DISCARDING DUPLICATES prevents an exception when duplicate entries occur with respect to a unique primary or secondary table key in assignments to a target table. In the basic form, this also applies to the lines that exist in an internal table specified after BASE.
By default, the addition DISCARDING DUPLICATES affects the source table after which it is specified. That is, either to itab of the basic form or tos1, s2, ... of mapping relationships. If DISCARDING DUPLICATES is specified with the addition DEEP after itab in the basic form, it also affects the statements of nested internal tables.
The addition DISCARDING DUPLICATES specifies that, when lines of a source table are inserted sequentially into a target table, the lines that are already in the target table with the same unique primary or secondary table key are ignored in the source table and do not raise an exception.
If the addition DISCARDING DUPLICATES is specified for an operand for which a unique table key is not known statically, the syntax check produces a warning.

ABAP_EXAMPLE_VX5
Use of DISCARDING DUPLICATES in the executable example. ... CORRESPONDING itab2( itab1 DISCARDING DUPLICATES
MAPPING y1 = x1
y2 = x2 DISCARDING DUPLICATES ) ...
ABAP_EXAMPLE_END

ABAP_EXAMPLE_ABEXA
Handling Duplicates
ABAP_EXAMPLE_END