cancel
Showing results for 
Search instead for 
Did you mean: 

Need status from other Context-Node

0 Kudos

Hello,

I need the status "STRUCT.ACT_STATUS" from context-node "BTSTATUS" to fill the value help of a new field "STRUCT.ZZORDERADM_H0121" in context-node "BTADMINH" in method "GET_V_ZZORDERADM_H0121". I don't know how to do this.

Component: BT111H_OPPT

View: BT111H_OPPT/Details

Any ideas?

Thank you,

Ole.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

see the example code here:


data: lr_adminh type ref to cl_crm_bol_entity,
      lr_currentstatus type ref to cl_crm_bol_entity,
      lr_btstatush type ref to cl_crm_bol_entity,
      lv_status type string.
        
     try.
        lr_adminh ?= collection_wrapper->get_current( ).
        lr_btstatush ?= lr_adminh->get_related_entity( 'BTHeaderStatusSet' ).
        lr_currentstatus ?= lr_btstatush->get_related_entity( 'BTStatusHCurrent' ).
        if lr_currentstatus is bound.
          lv_status = lr_currentstatus->get_property_as_string( 'ACT_STATUS' ).
        endif.
     catch cx_sy_ref_is_initial cx_sy_move_cast_error cx_crm_genil_model_error.
      endtry.

regards

Ismail

Answers (1)

Answers (1)

0 Kudos

Hello Ismail,

thank you very much for your help! It works!

Ole.

Edited by: Ole Müßigbrodt on Oct 5, 2009 9:34 AM