cancel
Showing results for 
Search instead for 
Did you mean: 

How do I add a button to an existing form

Former Member
0 Kudos

I have seen a few questions similar to this, but I am a total novice to customizing SBO. This is the procedure as I understand it, please tell me if I am correct.

I have to have some application running (call it MyApp). MyApp contains the code to catch the load event for the form I am intersted in, and add the button then let the form load. Is that correct? Then what do I need to do to capture the event caused by pressing the new button? Ultimately, this exercise will add a button to the Activity form and then cause the screen to refresh when the button is pressed.

I am NOT asking for someone to do this for me, but I see "pieces" of what I think I want to do in the examples and help, I just want to be sure I am heading in the right direction before getting mired down.

TIA

Accepted Solutions (1)

Accepted Solutions (1)

former_member201110
Active Contributor
0 Kudos

Hi Steve,

For adding your button to a system form, your approach is correct (ie capture the load event of the form your want to customise and add the button using the UI API or by loading via XML). There is an example of customising a system form in the UI API samples from the SDK. There is also an article on how to use XML to load new controls that can be found here:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ebe72e9e-0301-0010-979e-d37dcd71...

For capturing the event of the user clicking on your new button, what you need to do is trap the Item Pressed event for that form. I also recommend you look at filtering the events that your addon captures. This is good practice as a lack of event filtering can cause significant performance issues.

Kind Regards,

Owen

Answers (0)