UDT Handler


Previous  Next |  Direct link to this topic

The UDT Handler is designed to make it easier to use User-defined tables in SAP Business One.





Form Title

Title of the window showing.

Form Width

Initial width of the window in pixels. The minimum width is 425, if you go lower than that, the "Search line" label will cut out.

Form Height

Initial height of the window in pixels

Form State

Initial state of the window (Normal, Minimized, Maximized)

User-Defined Table

The table that you want to create a UDT Handler window for.

When selecting the table it will load all fields in the table in the grid.


Note. If any changes are made to the UDF settings afterward, SAP client needs to be restarted for these changes to take effect.


Please note this feature is only for UserTable of type "No Object" or "No Object - AutoIncrement". For UDTs of the "Master Data" or "Document Data" you should use SAP's built in features

Fixed col. count

This option allows you to have x of the first columns fixed so you can see them even if you do horizontal scroll

Show line numbers

With this option you can define if there should be shown a line number on each row

Banded row color

With this option you can define if every second row should have color

Allow update

If enabled the user is able to update the data in the window

Allow add row

Controls if the the user add new rows to the window

Allow remove row

Controls if the user is allowed to remove rows from the window

Auto code/name

If enabled the user will need to supply the code/name values manually. If disabled B1UP will auto generate the code/name values.


This field can be used to enable/disable the use of the SAP DI-API.


If enabled, the UDT Handler window will use the SAP DI-API to insert, update and delete records. This will trigger the DI-API data validation and will call the SBO Notification stored procedures.


If disabled, the UDT Handler window will do direct insert, update and delete SQL statements against the database. This will not trigger DI-API data validation and the SBO stored procedures will not be called.


Disabling the use of the SAP DI-API will allow faster insert, update and delete operations. This will make the windows faster when working with the data.


Please note that if SAP DI-API is disabled, you have a field of type date, and you do not enter a value in the field, UDT handler will insert the value 01/01/1753 in the record for that field.

The field value is set to this  in order to ensure the UDT handler will be able to work if you turn on Use DI-API at some point in the future

Use Change Tracking

This field can be used to enable/disable the use of Change Tracking


If enabled, the UDT Handler window will keep track of which rows have changes and only update these, resulting in a much better Update Performance.


WARNING: While this can dramatically improve the performance it has the limitation of being unable to track changes made by an UF Macro (SDK Limitation) that can in worst case scenario result in that data is not updated if every change on a row was made via a macro.


We recommend you turn this feature on if you have many rows and are not manipulating the screen using UF - Macro.

If you turn it on anyway we will try our best to still track the changes but cannot 100% guarentee all scenarios work, so please test before you turn this on


In this grid you define how each field in the table should be handled.




Field name defined in SAP

Foreign key

This field can be used to define a relation between data in SAP and the records in the window.
The foreign key is used to filter what data is shown when the window is open.

You can use the dynamic syntax and SQL: in this field.


Should the field be visible in the window


Should the field be editable in the window


Here you can overwrite the default caption

You have the option to move the fields up and down to define the order in the window.


Warning: Please note that, due to SAP SDK Limitation, UDFs of type 'Link' and type 'Image' is only partially support as in fields of these types can be viewed raw, but the Select/Display/Remove features can't be used

WARNING: If your Field is linked to a User Defined Table, That table needs to be visible in Tools > User-Defined Windows in order to work


Via the advanced button you can control the ORDER BY of the UTD Handler Result (if you as an example want to see the record ordered by a specific field (example a Date or Number))



Formtype suffix

This field can be used to ensure unique formtypes for each UDT Handler window.

This allow you to add unique function buttons and other settings per window (or a group of reports if you give them same suffix).

It is recommended to always have a suffix but for legacy reasons you can leave it blank.

NB: Suffix will suggest the same as your code but due to people that wish to group reports and technical reason the prefix can max be 6 chars so if you write a code that is over 6 chars it will not reflect on the suffix.


Warning: If you want to create Custom SAP Authorizations on the Screen you should max use a 2 char suffix as SAP's Authorization system can max handle 20 char FormTypes and our prefix takes up 18 of these chars.

After configuring the UDT Handler you can now launch it like a normal Universal Function. The UDT Handler will then display a window where the user can modify the data in the table.

The window will automatically format the columns based on the field type in the database.
Depending on the settings it is possible to add/remove rows and update the data.

The following things will also be inherited from the field definition in SAP:


Default value

Valid values

It does not inherit the SAP validation rules. We recommend using the B1 Validation system instead.

The normal B1UP features like Function Buttons, B1 Validation, Mandatory fields etc. can be applied to the window.

Item Placement Tool is not supported by this window.

Scripting the UDT Handler

A limitation when scripting the UDT Handler is that the form doesn't go into "Update" mode automatically, after the table data has been modified. More details on this, and how to resolve this issue can be found in the following article: https://support.boyum-it.com/hc/en-us/articles/5126198567197

NB! You cannot script the UDT Handler if you have "Use Change Tracking" switched on, as that will have the effect that only field that are manually updated will actually be updated on pressing the "update" button.