Hi Stefan,
it is possible to add controls to existing forms either by code or via xml.
See the existing SAP samples for detail (I can also post some code if you like me to).
Basically it is:
1. get SAP Form (either by count and type or by UID)
2. on Form_Load event, add your controls to form.items list
3. set properties of the new item
4. handle the events of the new control by code
Steps 1 to 3 can also be achieved using BatchLoad (using action="Update" in form tag)
The real problem is that adding controls to SAP forms collides with the stretching mechanism in these forms.
On some forms it is also difficult to find open space where a control could be placed. (i.e. invoice forms). In addition, if a control is placed in the remaining free space, this space might be used by SAP to add a SAP control in future versions of SBO. Which in turn will clash with the control your addon might have added.
For all these reasons SAP does not recommend adding controls. We have done it anyway, taking the SAP warnings into account.
Another option instead of using controls is creating new menu items (which, I guess, can not be overridden by SAP).
HTH, Lutz Morrien
Add a comment