Skip to Content

How to disable a button on SAP SRM UI Addon?

I have a requirement where we want to disable a button as shown below when page opens up in SAP SRM UI Add on.

In following screen , we want to disable "Approver" button .

New to UI5, So Please explain with steps.

Thanks,

Vimal

Button.JPG (25.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Oct 30, 2015 at 01:52 PM

    Hello,

    please, have a look at file name "Extensibility-Customer_CookBook_SP07.pdf" attached to OSS note 1830075 - User-defined fields: Preparation and use and more precisely to paragraph 2.2.3

    Regards.

    Laurent.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 28, 2015 at 01:36 PM

    Hi Vimal,


    You can check in SPRO settings Extension and Field Control --> Control Action --> Configure Control Action on Header/Item level if you have header/Item level buttons.


    PDO action type :- Action name (button u want to disable)
    Process mode :- EDIT/DISPLAY mode

    object type : Document object type (BUS2121/BUS2201)

    Transcation type : SHC/EC

    PDO Action enable/disable : X

    If u have condition basis disabling the Button add the custom dynamic method.

    Hope this helps.


    Best Regards,

    Siddappa

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 23, 2015 at 05:22 AM

    Hi,


    Following is the solution :

    /srmnxp/bd_Change_data - To disable the entities on UI.

    /srmnxp/if_enhance_data_prov~change_data

    IF iv_entity_name = 'Approval'.

    FIELD-SYMBOLS<ls_ui_header> TYPE /srmnxp/s_approval.

    FIELD-SYMBOLS<lt__header_ui> type any table.

    ASSIGN cr_entity->* to <ls_ui_header>.

    IF <ls_ui_header> is assigned.

    <ls_ui_header>-add_approver_a_e = ' '.

    ENDIF.

    ASSIGN cr_entity_set->* to <lt_header_ui>.

    IF <lt_header_ui> is assigned.

    LOOP AT <lt_header_ui> is assigned.

    <ls_ui_header>-add_approver_a_e = ' '.

    ENDLOOP.

    ENDIF.

    ENDIF.

    IF iv_reviewer = 'Reviewer'.

    FIELD-SYMBOLS<ls_ui_review> type /srmnxp/s_reviewer.

    FIELD-SYMBOLS<lt_ui_review> type any table.

    ASSIGN cr_entity->* to <ls_ui_review>.

    IF <ls_ui_review> is assigned.

    <ls_ui_review>-add_reviewer_a_e = ' '.

    ENDIF.

    ASSIGN cr_entity_set->* to <lt_ui_review>.

    IF <lt_ui_review> is ASSIGNED.

    LOOP AT <lt_ui_review> ASSIGNED <ls_ui_review>.

    <ls_ui_review>-add_reviewer_a_e = ' '.

    ENDLOOP.

    ENDIF.

    ENDIF.

    Add comment
    10|10000 characters needed characters exceeded