Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: AET Generated field values are not saved.

$
0
0

there should be a context node at your view level. Please check ON NEW FOCUS method is implemented or not.

 

If not, you can implement that method with below code.

 

 

 

    DATA: lv_collection TYPE REF TO if_bol_bo_col,

          entity        TYPE REF TO cl_crm_bol_entity.



*   get collection of dependent nodes

    entity ?= focus_bo.

    TRY.

        lv_collection = entity->get_related_entities(

               iv_relation_name = 'BTHeaderCustExt' ).



        IF lv_collection IS NOT BOUND or lv_collection->size( ) = 0.

          IF entity->is_changeable( ) = ABAP_TRUE.

            TRY.

                entity = entity->create_related_entity(

                 iv_relation_name = 'BTHeaderCustExt' ).

              CATCH cx_crm_genil_model_error cx_crm_genil_duplicate_rel.

*               should never happen

            ENDTRY.

            IF entity IS BOUND.

              CREATE OBJECT lv_collection TYPE cl_crm_bol_bo_col.

              lv_collection->add( entity ).

            ENDIF.

          ENDIF.

        ENDIF.



      CATCH cx_crm_genil_model_error.

*       should never happen

        EXIT.

      CATCH cx_sy_ref_is_initial.

    ENDTRY.

    me->set_collection( lv_collection ).


Viewing all articles
Browse latest Browse all 7775

Trending Articles



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