Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9369

Bol entity is not getting created successfully as a table row

$
0
0

Hi Experts,

 

I have requirement to enhance standard UI component PRDIOOV to add a custom assignment block for Business agreement object (  CObjRelPSCBA dependent object of product ). I added the bellow assignment block.

 

ba.PNG

 

Now on click of insert button a new entity should get create as a new table row and user should fill data on that.It was working fine when I had not added the one click action button ( "view" ).

 

But after adding one click action button in that node. insert is not working property. I am not getting all field as editable. its just behaving like the edit button functionality.

I have written the bellow code on click of insert button event.

 

METHOD eh_oninsert.

     DATA :lr_entity  TYPE REF TO if_bol_bo_property_access, "cl_crm_bol_entity,

           lr_product TYPE REF TO cl_crm_bol_entity.

 

 

     TRY.

         lr_product ?= typed_context->product->collection_wrapper->get_current( ).

         lr_entity ?= lr_product->create_related_entity( 'CObjectRelPSCBA' ).

         lr_product->lock( ).

         IF lr_product->lock( ) = abap_true.

           me->view_group_context->set_view_editable( me ).

           typed_context->cobjrelpscba->collection_wrapper->add( EXPORTING  iv_entity = lr_entity iv_set_focus = 'X').

         ENDIF.

       CATCH cx_root.

     ENDTRY.

   ENDMETHOD.


Please help me with a suitable solution.


Thanks & Regards


Chhanda


Viewing all articles
Browse latest Browse all 9369

Trending Articles