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

Code not working since upgrading from CRM 5.0 to 7.0

$
0
0

Hi experts,

 

we've recently upgraded from CRM 5.0 to 7.0 and since doing so there is funtionality with a BAdi implementation (definition CRM_IM_ADD_DATA_BADI) we have that no longer works as expected.

 

The code below is what we currently have in place to essentially retreive the GUID so we can call the function "CRM_ORDERADM_H_GET_OB" however, LR_CTRL is not getting bound and therefore no GUID is retreived. Is the below code now obsolete for CRM 7.0? Is there another way we could retreive the GUID?

 

  DATA: lr_ctrl TYPE REF TO cl_crm_ic_contextareaview_impl,
        lr_bdc TYPE REF TO cl_crm_ic_cucobdc_impl,
        lr_collection_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
        lr_irentity TYPE REF TO cl_crm_bol_entity,
        ls_guid TYPE string.

  TRY.

* get the web ic context
      lr_ctrl = cl_crm_ic_services=>contextarea_contr.
      CHECK lr_ctrl IS BOUND.

* get the current interaction
      lr_bdc ?= lr_ctrl->get_custom_controller( 'CuCoBDC' ).
      CHECK lr_bdc IS BOUND.

      lr_collection_wrapper ?= lr_bdc->typed_context->currentinteractionrecord->get_collection_wrapper( ).
      CHECK lr_collection_wrapper IS BOUND.

      lr_irentity ?= lr_collection_wrapper->get_current( ).

      IF lr_irentity IS BOUND.

* get the guid
        ls_guid  = lr_bdc->get_xpath_property_as_string( iv_xpath = '//currentOneOrder/CRM_GUID' ).
      ENDIF.
    CATCH cx_root.
  ENDTRY.

 

Thanks in advance,

Chris


Viewing all articles
Browse latest Browse all 4552

Trending Articles



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