Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Per threads:

https://forums.sdn.sap.com/thread.jspa?messageID=7669764https://forums.sdn.sap.com/thread.jspa?messageID=7619188#7619188
https://forums.sdn.sap.com/thread.jspa?messageID=7335331

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
exporting
iv_attr_name = 'PROCESS_TYPE'
importing
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.