Quantcast
Channel: SCN: Message List - ABAP Objects
Viewing all articles
Browse latest Browse all 159

How to use Widening Cast?

$
0
0

Hi,

 

I have 2 class: cl_crm_mktpl_cpg_fusg_coll and zcl_crm_mktpl_cpg_fusg_coll.

 

Class zcl_crm_mktpl_cpg_fusg_coll inherit from cl_crm_mktpl_cpg_fusg_coll.

 

I wannt to do Widening Cast, but i get casting exception.

 

    DATA: lr_fuh_coll   TYPE REF TO cl_crm_mktpl_cpg_fusg_coll, "Fund Usage Collection,
              lr_zfuh_coll  TYPE REF TO zcl_crm_mktpl_cpg_fusg_coll. "Fund Usage Collection

  lr_fuh_coll ?= ir_mktproject->get_assignment_collection( cl_crm_mktpl_constants=>asg_type_fusg ).

  lr_zfuh_coll ?= lr_fuh_coll. <---- Casting Exception Runtime.

 

Some idea?


Viewing all articles
Browse latest Browse all 159

Trending Articles



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