cancel
Showing results for 
Search instead for 
Did you mean: 

UI: SBO changing item number?

Former Member
0 Kudos

Hi all,

when adding a new button to an existing form via xml I am receiving a strange result. While the same xml used to add an item with item uid "XXX_TST", now I get an item with uid "1000001". Does anyone know what causes SAP to replace the uid I am passing via xml with an internal uid? As I said, it has been working before and now it is not.

TIA Lutz Morrien

I am using the following xml:

<?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="490" 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_TST">

<Specific caption="TEST" />

</Item>

</action>

</items>

</form>

</action>

</forms>

</Application>

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi all,

I finally figured out what went wrong.

I was using the batch load function to add items (buttons to an existing SAP form. What eventually happened was that the function was executed twice. This resulted in adding the buttons twice.

If an item is added to a form, which posesses the same uid that an existing item carries, the item added second will receive an id by SAP. This id seems to start with 10000 and is increased with every duplicate uid.

Since the buttons added with the second run were positioned exactly over the buttons coming with the first run, it was only possible to click on the buttons with the artificial id. After I made sure that the method was called only once, my buttons carried the id I gave them.

This results in: If an item receives another id than it should receive by script, look for an existing item with the same id.

HTH Lutz Morrien