Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8430

Re: MOVE_CAST_ERROR: to Object ?

$
0
0

Hi Rachid,

 

As Suhas Saha was explaining you seem to have a simple cast error. In the following code obj1 class is a subclass of obj2. Casting like this won't be a problem. The precise inverse will:

 

   DATA: lo_obj1 TYPE REF TO lcl_sub_class.

   DATA: lo_obj2 TYPE REF TO lcl_parent_class.

   FIELD-SYMBOLS <ls_1> TYPE any.

 

   CREATE OBJECT lo_obj1.

   ASSIGN lo_obj1 to <ls_1>.

 

   lo_obj2 ?= <ls_1>.



regards,

Edgar


Viewing all articles
Browse latest Browse all 8430

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>