Skip to Content
0
Former Member
Oct 08, 2010 at 11:19 AM

How can I refresh a different view?

38 Views

Hi all,

we have a requirement that whenever one special partner in a serviceticket in the view ICCMP_BTPARTNER/PartnerTable is changed the status in the view ICCMP_BTPARTNER/PartnerTable should be changed too. I have realized that already.

Here is the code:

METHOD set_status_forwarded.

DATA: lr_gdc TYPE REF TO if_crm_ui_data_context.

DATA: lr_serviceticket TYPE REF TO if_bol_bo_property_access.

DATA: lr_entity TYPE REF TO cl_crm_bol_entity.

CLEAR: lr_gdc.

TRY.

lr_gdc ?= cl_crm_ui_data_context_srv=>get_instance( iv_controller = me ).

CATCH cx_root.

ENDTRY.

CHECK lr_gdc IS BOUND.

CALL METHOD lr_gdc->get_entity

EXPORTING

name = if_iccmp_global_data_cont_con=>gdc_currentserviceticket

RECEIVING

value = lr_serviceticket.

CHECK lr_serviceticket IS BOUND.

CLEAR: lr_entity.

lr_entity ?= lr_serviceticket.

CHECK lr_entity IS BOUND.

TRY.

lr_entity = lr_entity->get_related_entity( 'BTOrderHeader' ).

CHECK lr_entity IS BOUND.

lr_entity = lr_entity->get_related_entity( iv_relation_name = 'BTHeaderStatusSet' ).

CHECK lr_entity IS BOUND.

lr_entity = lr_entity->get_related_entity( iv_relation_name = 'BTStatusHCurrent' ).

CHECK lr_entity IS BOUND.

lr_entity->switch_to_change_mode( ).

CALL METHOD lr_entity->set_property

EXPORTING

iv_attr_name = 'ACT_STATUS'

iv_value = 'E0004'.

CATCH cx_crm_genil_model_error cx_root.

ENDTRY.

ENDMETHOD.

So, the status is changed the way I want it but the view is not going to be refresh so far. Only the view ICCMP_BTPARTNER/PartnerTable is refreshed because the change happens there.

The question is, how can I refresh ICCMP_BTPARTNER/PartnerTable as well?

Thank you for your help.

Best regards.

Ben