Skip to end of metadata
Go to start of metadata

Per threads:

Step 1: Identify the output method for the component.  Normally it will be in do_prepare_output or IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS method of the controller of the view you are enhancing.

Step 2:  Use the following code to get the transaction type

data lr_btadminh type ref to cl_crm_bol_entity.

lr_btadminh ?= typed_context->btadminh->collection_wrapper->get_current().

call method lr_btadminh->get_property_as_value
iv_attr_name = 'PROCESS_TYPE'
ev_result = LV_PROCESS_TYPE.

here process type is nothing but transaction type.

Step 3:  Adjust the button table based on a if/case statement using the LV_PROCESS_TYPE which corresponds to the transaction type.