Hi Nicol,
sorry for the late reply..
just fallow the naresh instruction in that you will get partner collection..
if your not getting then go the relation method..
ex:
data : lr_entity TYPE REF TO CL_CRM_BOL_ENTITY.
constants: lc_foreign_rel type crmt_relation_name value 'BTIbase'
.
lr_entity ?= me->typed_context-> BTAdminH-> collection_wrapper->get_current( ).
if lr_entity is bound.
lr_entity ?= lr_ent->get_related_entity( iv_relation_name = 'BTHeaderBOSSet' ).
lr_entity ?= lr_ent->get_related_entity( iv_relation_name = 'BTRefObjSet_A' ).
lr_entity ?= lr_ent->get_related_entity( iv_relation_name = 'BTRefObjectSingle' ).
check lr_entity is bound.
try.
lr_entity = lr_ent-> create_related_entity( iv_relation_name = lc_foreign_rel ).
catch cx_crm_genil_model_error.
return.
endtry.
* Generating Guid.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_16 = guid.
lr_entity->get_properties( IMPORTING es_attributes = lv_ibase ). ( declare attr structue for ibase.)
fill your data into that sturcure.
lr_entity->set_properties( EXPORTING is_attributes = lv_ibase).
lr_core->modify.
lr_tx = lr_entity-> get_transaction( ).
IF lr_tx->save( ) = abap_true.
lr_tx->commit( ).
ELSE.
lr_tx->rollback( ).
ENDIF.
Try this and let me know..
Thanks & Regards,
Srinivas.