Hi All,
Facing the below issue.,..
How to Get the Main Partner from the BTOrder.
I have used the below code ..
but its not giving me the main Partner..
Changed the Relationship to BTPartnerAll and then i got the employee responisbility..
Extracted Employee responsible but not main partner..
Kindly help
TRY.
lr_adminh = lr_order->get_related_entity( iv_relation_name = 'BTOrderHeader' ).
CATCH cx_crm_genil_model_error. " Error when Accessing Object Model
ENDTRY.
TRY.
lr_partner = lr_adminh->get_related_entity( iv_relation_name = 'BTHeaderPartnerSet' ).
CATCH cx_crm_genil_model_error. " Error when Accessing Object Model
ENDTRY.
TRY.
coll = lr_partner->get_related_entities(
iv_relation_name = 'BTPartner_PFT_0001_MAIN' "'BTPartnerAll'
).
CATCH cx_crm_genil_model_error. " Error when Accessing Object Model
ENDTRY.
current = coll->get_current( ).
IF current IS BOUND.
current->get_property_as_string(
EXPORTING
iv_attr_name = 'PARTNER_NO' " Component Name
* iv_use_iso_format = ABAP_FALSE
RECEIVING
rv_result = lv_partner
).