Introduction: Many times there is a need to add custom actions to the Contact listing inside the Account TI. We can’t add custom Action to Contact because the BusinessPartner is a non-ESP2 Businessobject.
And there is a workaround to this scenario. I have described it here in detail.
General solution is, we create a custom BO which can handle the actions, and we try to create a duplicate of the Contacts listing using an AdvancedListPane in an EC. But here we have no option to create a SADL query. Because to get the list of contacts for a given account ID, we cannot use queryByElements. This has no option to query on AccountID.
Now there is a workaround to do that:
- Create an EC that need to be binded to the Account TI, to create a View with the same name as Contacts.
- Create a new item as OWL screen, in which we can create a SADL query as per our need
- Now, create a Work centre View (WCV) and a Work centre (WC). Map the newly created WCV to the WC.
- Drag and drop the OWL screen inside the Pane Container of the EC we created.
- Provide access to the new WC: Go the Administrator > Business Users and grant access to some user. Now this will create a WC and a view like this.
- Now go to the Account – TI –> to see the new view of Contacts with the OWL.
The custom action can be added in the BusinessPartnerSolutionExtensions, and this has the BusinessPartner node, which can be used for the listing using the SADL query.
As a conclusion, this is a simplest way to enhance your UI with easy replication, I have seen multiple threads with this requirement, but none answered. Example – https://archive.sap.com/discussions/thread/3802322
So I took the initiative to share my knowledge. I hope this solution will help someone in future.
In case of any queries, please comment..