Skip to Content
avatar image
Former Member

changing field properties base on business roles

Hi,

I am looking for a solution to solve the following problem.

I need to change a standard field in bp_head the properties base on the role.

1. for business role A, I need the field use a input field with search help, and I need to disable some other fields when data is returned from the ui.

2. for business role B, he will only see the input field with no search help.

What will be the best approach to achieve this ?

KR/Benjamin

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 09, 2015 at 05:03 AM

    Hi Jerome

    This would not be accomplished via any standard configuration.

    You should build a new SM30 Table to manage which roles can use the Search Help (alternatively custom authorisations), from my side the SM30 solution can be delivered much faster.

    Then you'll need a developer to build in the relevant logic into the relevant UI View.

    Hope this helps.

    Regards

    Arden

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2015 at 05:06 AM

    Hi Jerome,

    1. To show search help based on business role use the following code in GET_V_XXX method of that field.

    DATA: lr_profile TYPE REF TO if_crm_ui_profile,

               lv_role type TPARA-PARTEXT.

         lr_profile = cl_crm_ui_profile=>get_instance( ).

         lv_role = lr_profile->get_profile( ).

    if lv_role = 'A'.

    ""code to attach search help.

    endif.

    Now for Business role A , you will see the search help.

    2. To disable some fields based on business role, fetch business role (like in above code) on GET_I_XXX method of that field and set  rv_disabled to true for Business role A.

    Thanks,

    Ritu

    Add comment
    10|10000 characters needed characters exceeded