Skip to Content
-1

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

Apr 26 at 12:52 PM

61

avatar image
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 ).
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Nicolas VANDER AUWERA Apr 26 at 01:28 PM
2

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

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Apr 26 at 03:37 PM
0
Share
10 |10000 characters needed characters left characters exceeded