Skip to Content
author's profile photo Former Member
Former Member

UI => Change existing forms?

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

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2004 at 05:19 PM

    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 comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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>