Skip to Content
-1

Why can't I receive an IMPORTING REF TO object?

What's wrong with this that it won't compile with '"LO_REF" is not type-compatible with formal parameter "EO_RESULT".'?

METHODS instantiate EXPORTING eo_result TYPE REF TO object.
DATA lo_ref TYPE REF TO /bobf/if_tra_service_manager.
lo_cut->instantiate( IMPORTING eo_result = lo_ref ).
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 26 at 01:28 PM

    Hello,

    You have to down cast the result of method instantiate:

    lo_cut->instantiate( importing eo_result = data(result) ).
    lo_ref ?= result.

    Best regards,

    Nicolas

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 26 at 03:37 PM
    Add comment
    10|10000 characters needed characters exceeded