AS ABAP Release 758, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP - Programming Language → Processing Internal Data → Assignments → Lossless Assignments → Lossless Assignments, Rules →Checking Internal Tables
The operator EXACT checks a table specified as an argument line-by-line against the tabular target type:
The table category and the table key are ignored by the check.
If the check raises an exception due to an invalid value or loss of values, the target table is filled with all lines assigned up to that point.
Hints
Example
The first seven lines of the internal table itab are assigned to the internal table jtab. When the eighth line is assigned, the exception CX_SY_CONVERSION_NO_DATE occurs.
DATA itab TYPE STANDARD TABLE OF d
WITH EMPTY KEY.
itab = VALUE #( ( CONV d( '20160101' ) )
( CONV d( '20160201' ) )
( CONV d( '20160301' ) )
( CONV d( '20160401' ) )
( CONV d( '20160501' ) )
( CONV d( '20160601' ) )
( CONV d( '20160701' ) )
( CONV d( '20160ß01' ) )
( CONV d( '20160901' ) )
( CONV d( '20161001' ) )
( CONV d( '20161101' ) )
( CONV d( '20161201' ) ) ).
DATA jtab TYPE SORTED TABLE OF string
WITH UNIQUE KEY table_line.
TRY.
jtab = EXACT #( itab ).
CATCH cx_sy_conversion_no_date.
ENDTRY.
cl_demo_output=>display( jtab ).