Hi Ravi,
I have added role via code send by you by doing some modification:-
TRY .
lr_acc_det_impl ?= cr_me.
lr_entity_props = lr_acc_det_impl->typed_context->header->collection_wrapper->get_current( ).
CALL METHOD lr_entity_props->set_property_as_string
EXPORTING
iv_attr_name = 'BP_ROLE'
iv_value = 'ZEDECU' ."lv_role'.
CATCH cx_sy_conversion_error .
CATCH cx_sy_move_cast_error.
CATCH cx_root.
*
ENDTRY.
But Now I want to add relationship
- Automatically add Relationship = ZXXX with a relationship to the Disti Group account associated with the userid.
a. The Disti Group account associated with the userid will be derived as follows:
- Using the employee vendor number, find the relationship of (employee responsible) to an account with the role of ZXXXX(Disti Group)
- UserID and employee # is already determined in the account creation process as it is used to add the employee responsible relationship.
- BAPI_BUPA_RELATIONSHIPS_GET may be used
- The first account found with in step i will be used as the relationship partner for the ZXXXX(Disti Group)relationship
- If no account is found in step i, do not add the ZXXXX(Disti Group)relationship
Please suggest
Rgds
Ankesh