Hi Deepika, Summet, Ravi and Faisal;
Thanks for yours replies. I dont use prepare_empty_lines. I want to avoid this standar behaviour when I press the enter.
In my super->do_prepare_output i build the table:
typed_context->ZEXAMPLE->build_table( ).
This is the code on do_prepare_output:
CALL METHOD super->do_prepare_output
EXPORTING
iv_first_time = iv_first_time.
lr_coco ?= me->comp_controller.
IF lr_coco IS BOUND.
lr_btadmin_h ?= lr_coco->typed_context->btadminh->collection_wrapper->get_current( ).
ENDIF.
IF lr_btadmin_h IS BOUND.
TRY.
CALL METHOD lr_btadmin_h->get_related_entities
EXPORTING
iv_relation_name = 'ZBTexample'
RECEIVING
rv_result = lr_collection.
lv_coll_r = lr_collection->size( ).
CATCH cx_crm_genil_model_error .
ENDTRY.
IF lr_collection IS BOUND.
me->typed_context->ZEXAMPLE->collection_wrapper->set_collection( lr_collection ).
ENDIF.
ENDIF.
When i insert a new like with the button create, the collection is filled with an entity, but when I am editing the line inserting a value in a cell, the get_related_entities is returning an entity more,two in total. This entity is filled whitout guid, it means that is not created in my Zbtil class.
Thanks indded.
Mon