cancel
Showing results for 
Search instead for 
Did you mean: 

how to add/update data in UDT with pure SAP UI code

Former Member
0 Kudos

Hi Experts,

Does anyone know how to add or modify a record in UDT using the SAP UI code.

I more preferred the UI not the DI.

Thanks in Advance,

Jim

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185682
Active Contributor
0 Kudos

Hi Jim,

The correct way to achieve this is using DI API.

But to achieve this with UI API you need do this, when your SAP B1 is open:

1. Open your form.

2. Define the value to the fields in screen with something like this:

SAPbouiCOM.Item oItem = null;

oItem = oForm.Items.Item(5);

oItem.Specific.value = "Test";

3. Simulate click in the Add/update button

SAPbouiCOM.Item oItem = null;

oItem = oForm.Items.Item("1"); //1 is id of Add/update button

oItem.Click();

Regards,

Diego