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

Cannot read attribute of another context node in a context node

$
0
0

Hello Sap gurus,

 

such a long time that I do not post any issue. Now unfortunately time has come down.

My functional requirement is that whenever the status of an opportunity is changed from "Won" to "Booked", then I have to retrieve the Status reason previously marked for the status "Won" and paste into the attribute Status_Reason (CON_KEY) for status "Won".

 

In order to do that I need to read the context node BTADMINH or ZBTCUSTOMERH from the context node BTSUBJECT, in the method GET of attribute CON_KEY.

I have implemented the following code in the method GET_CONC_KEY of the context node BTSUBJECT.

 

  DATA:
          lr_entity TYPE REF TO cl_crm_bol_entity,
        lr_comp TYPE REF TO ZL_BT111H_O_DETAILS_IMPL,
         lv_ref_guid     TYPE        crmt_object_guid,
         lr_collection TYPE REF TO cl_crm_bol_bo_col,
         lr_bdc type ref to  if_crm_ui_data_context.

    TRY.
lr_entity ?= lr_comp->ZTYPED_CONTEXT->ZBTCUSTOMERH->collection_wrapper->get_current( ).
     lv_ref_guid = lr_entity->get_property_as_string( iv_attr_name = 'REF_GUID' ).
      CATCH cx_sy_ref_is_initial.

      ENDTRY.

 

Whenever I try to read the context node BTADMINH or ZBTCUSTOMERH from BTSUBJECT  I got always the same dump:

OBJECTS_OBJREF_NOT_ASSIGNED ZL_BT111H_O_DETAILS_CN06======CP CRM

 

Somethins is defitenely wrong and I am at the moment stuck with this code.

Please any help is really welcome.

 

Thanks in advance,

 

Andrea

 

 


Viewing all articles
Browse latest Browse all 4552

Trending Articles



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