Skip to Content

A generic reference cannot be dereferenced (->) in the current statement.

Hello,

I am currently on SAP_BASIS 7.50 and I have this issue.

When I do a table expression in a ASSIGN statement and try to de-reference data in the same statement I get this error:

A generic reference cannot be de-referenced (->) in the current statement.

This is a rough construct of what I am trying to do:

TYPES: BEGIN OF t_test,
       key Type string,
       r_data TYPE REF TO data,
       END OF t_test.

DATA: lt_test TYPE TABLE OF t_test.

FIELD-SYMBOLS: <l_test> TYPE any.


ASSIGN lt_test[ key = '123123' ]-r_data->* TO <l_test>.

(It does also not work if the table is filled)

Did anyone run into the same error?

I also saw a Comment in this post from Horst Keller.

Amadeus Grabmayer had a different issue while trying the same thing.

It also says in my F1-Help that it should work. Am I doing something wrong syntax-wise?

I am looking forward to your answers.

Kind regards,

Kai

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 18 at 09:42 AM

    Looks like a kernel bug for me because this two step approach works:

    DATA(ls_test) = lt_test[ key = '123123' ].
    ASSIGN ls_test-r_data->* TO <l_test>.
    
    Add comment
    10|10000 characters needed characters exceeded