Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 4552

CL_BUIL_ABSTR inheritance

$
0
0

Hello all,

 

I have created a relationship, class, and a component with view which displays a custom table related to a particular business partner.

This is a custom table with a key to the business partner. It has 1 to many relatinship.

I have redefined the read, modify and execute_with_save methods and everything is fine and working.

 

Now, about the problem:

I need to create a new entry in the displayed table from the inherited and overridden "modify" method from CL_BUIL_ABSTR class.

 

I'm creating the new entry with the following lines:

             TRY.

             lr_rel_obj_new = lr_rel_obj->copy_self_with_structure(

                                         is_object_key = ls_key_structure ).

             lr_rel_obj_new->set_attributes( ls_attributes ).

           CATCH cx_crm_genil_model_error.               "#EC NO_HANDLER

           CATCH cx_crm_cic_duplicate_entry.             "#EC NO_HANDLER


lr_rel_obj - is what I get as an importing parameter from the "modify" method.


After that I'm adding the the newly created object to the list of changed objects:

 

      lv_changed_instance-object_name = me->object_name.

     lv_changed_instance-object_id = cl_crm_genil_container_tools=>build_object_id( ls_key_structure ).

     APPEND lv_changed_instance TO ct_changed_objects.

 

And after adding this two parts of code, I was expecting that this will trigger back the read method and I will be able to read and display the new entry. But as you can guess I didn't succeeded  

 

I even tried to put in the "ct_changed_objects" the parent of my entity, which is triggering the "read" method without a specific key, so I'm trying to load all the content I have, but again I didn't managed to load the newly created data.

 

If someone can help me with this I will be really thankfull.

Anton


Viewing all articles
Browse latest Browse all 4552

Trending Articles



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