Skip to Content
7
Feb 02, 2022 at 03:47 PM

Type "REF TO" is incompatible with type "REF TO ..."

1058 Views

Hi there!

I experienced a strange problem with references:

see the following program

TYPES t_t000 TYPE STANDARD TABLE OF t000 WITH NON-UNIQUE DEFAULT KEY.

DATA b TYPE REF TO t_t000.
DATA BEGIN OF a OCCURS 0.
INCLUDE STRUCTURE t000.
DATA END OF a.

b = REF #( a[] ).

The "source" data is defined with DATA ... OCCURS. Yes, I know, it's outdated and should not be used anymore. tell this to the persons maintaining SAPMV45A... ��

the report can not be activated due to the error

Type "REF TO " is incompatible with type "REF TO T_T000".

Is there any chance to define an internal table with exactly the same technical conditions so that it can be referenced?I tried various definitions:
  • WITH EMPTY KEY
  • INITITAL SIZE 0
  • WITHOUT FURTHER SECONDARY KEYS

I also know that there is a workaround: Use TYPE REF TO DATA and use Field-Symbols to access.