Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

MOVE_CAST_ERROR: to Object ?

$
0
0

Hi Experts,

 

I have a minor issue during my exceution program. The Cast of a reference < FS> of an object TYPE REF TO ZCL_FI_DA to an object TYPE REF TO ZCL_SC_FACTORY is not possible.

 

I have this code:

 

FIELD-SYMBOLS<fs_oclass> TYPE any                     .

ASSIGN (classname)         TO <fs_oclass>    .

CHECK  <fs_oclass>         IS ASSIGNED      .

   IF     <fs_oclass>            IS INITIAL        .

     CREATE OBJECT<fs_oclass> TYPE(classname) ." classname = ZCL_FI_DA

   ENDIF                                         .

   object ?= <fs_oclass>.      "==> DUMP !

 

And I have this issue:

 

Screenshot.jpg

 

Have your got any idea to solve it?

 

Best regards.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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