Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: Automatically Populate role and relationship based on security role

$
0
0

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

 

  1. 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)
      1. UserID and employee # is already determined in the account creation process as it is used to add the employee responsible relationship.
      2. 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


    Viewing all articles
    Browse latest Browse all 7775

    Trending Articles



    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>