Hi experts
I need to create a new entity to add to collection...
i've used the following code:
Data:
lr_history_new TYPE REF TO cl_crm_bol_entity,
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_history TYPE REF TO cl_crm_bol_entity.
lr_collection = me->typed_context->product->collection_wrapper.
IF lr_collection IS BOUND.
lr_entity ?= lr_collection->get_first( ).
lr_entity->get_related_entity( EXPORTING iv_relation_name = 'ProductEventHistory' RECEIVING rv_result = lr_history ).
lr_history_new = lr_history->create_related_entity( iv_relation_name = 'ProductEventHistoryForeignRel' ).
ENDIF.
But the lr_history_new is not created...and it is initial..
Anybody can help me??
Best regards
Marco