Header Ads

Basics of CRM UI component programming .

Basic code for UI .
create an instance
DATA: lr_ent TYPE REF TO if_bol_bo_property_access,

check if the instance is bound .

IF lr_ent IS BOUND.
    me->typed_context->btpartnerset->on_new_focuslr_ent ).
* refresh the text (necessary after empty text!)
    me->typed_context->bttexth->on_new_focuslr_ent ).


for error handling  we use try - catch block . 


    TRY.
        lr_entity ?= lr_ent.
        lv_collection lr_entity->get_related_entities(
               iv_relation_name 'BTHeaderTextSet' ).
        lr_ent lv_collection->get_first).

        me->typed_context->bttext->on_new_focuslr_ent ).

      CATCH cx_crm_genil_model_error.
*       should never happen
        EXIT.
      CATCH cx_sy_ref_is_initial.
    ENDTRY.
Powered by Blogger.