cancel
Showing results for 
Search instead for 
Did you mean: 

UI => Change existing forms?

Former Member
0 Kudos

How can we change existing original SBO-forms? is it possible to add for example a button, or how could we handle such things?

thx for help!

Stefan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Lutz,

thank you for answering! I will try it next week and report the result

Former Member
0 Kudos

Lutz,

Could you send me an example of the code. I have a VB project now that is modifiying the layout of a Delivery Note to work more effeciently for our business. However today is the first day of coding in SDK. We just received the product last week. I would like to see some reference examples.

Thanks in advance

Eli Lawson

eli.lawson@adsdish.com

Former Member
0 Kudos

Hi Eli,

xml for adding a button to the delivery note is:

Catch the form load event of each form of type 140,

get the form, get the form uid of the form you got,

replace the uid in the xml with this uid and finally

run Batchload with xml.

HTH Lutz Morrien

<?xml version="1.0" encoding="utf-8" ?>

<Application>

<forms>

<action type="update">

<form uid="">

<datasources>

<dbdatasources>

</dbdatasources>

</datasources>

<items>

<action type="add">

<Item type="4"

left="360"

width="60"

top="80"

height="19"

visible="1"

enabled="1"

form_pane="0"

to_pane="0"

disp_desc="1"

right_just="0"

description=""

uid="XXX_BUTTON1">

<Specific caption="Button1" />

</Item>

</action>

</items>

</form>

</action>

</forms>

</Application>