Exploring User-Defined Fields, Tables, Objects, and Values

Objective

After completing this lesson, you will be able to outline the capabilities for customizing fields in SAP Business One, Web client.

User-Defined Elements

User-defined elements are customizable components within SAP Business One, Web client that allow you to tailor the system to your specific needs. These elements include:

  • User-defined fields (UDFs)
  • User-defined tables (UDTs)
  • User-defined objects (UDOs)
  • User-defined values (UDVs)

The usability of these elements is simple and does not require coding. This makes it easy for you to customize the SAP Business One environment without needing advanced technical skills. Additionally, these elements allow you to extend the database, providing even more flexibility and customization options.

User-Defined Fields (UDF)

User-defined fields (UDFs) enable you to add fields to existing tables to keep track of additional information. For example, you can add a field called CarNumber to the Employee Master Data table to keep track of the license plate number for each employee.

The following are some facts about UDFs:

  • You can add new fields to most business categories, including business partner, item master data, and marketing documents.
  • These fields are stored in the database and table of the business category. They can be quickly identified in the table, since they have the prefix "U_".
  • Only authorized users can add UDFs.
  • You can add fields to both the title level and to the rows of marketing documents.
  • When you add a UDF to the marketing documents category, the new field is added to all logistics document types. These document types include all sales and purchasing document types, and some inventory documents such as Goods Receipt and Goods Issue.
  • When you add UDFs at the title level, the new fields appear in a separate tab, as shown in the following image. This image also shows an alphanumeric UDF, Website, that was added to the database. The UDF appears in the User-Defined Fields tab in all marketing documents, allowing the user to enter a URL relevant to this document. Sales Quotation in SAP Business One, Web client highlighting the User-Defined Fields tab.
  • When using the Copy To/ Copy From function to generate a new document from a base document, the value of a UDF is transferred to the target document.
  • When you add a field at the row level, the system adds this field as an additional column in the table. The field is visible and active by default. In the following image, the UDF, Color, was added to the items table, allowing the user to document the item color offered to the customer. The user-defined field, Color, was added to the items table.
  • When you create a UDF, you can select a Type and optionally a Structure for each UDF.
  • The Structure is dependent on the Type, and influences the format of the field:
    TypeStructure
    Alphanumeric
    • Regular (maximum length: 254)
    • Address
    • Telephone No.
    • Text (maximum length: 2GB header / 255KB row)
    Numeric-
    Date/Time
    • Date
    • Hour
    Units and Totals
    • Rate
    • Amount
    • Price
    • Quantity
    • Percents
    • Measure
    General
    • Link
    • Image
  • You can optionally add a list of valid values to a UDF, link it to a system object, define rules for validating data entry in the field, set a default value, or make it mandatory. You can also link the user-defined field to a user-defined table or user-defined object.

To learn more, refer to Creating User-Defined Fields | SAP Help Portal.

User-Defined Tables (UDT)

In addition to UDFs, you can add new tables to the database. For example, if a company wants to assign a delivery driver to deliver documents, you can maintain the delivery drivers’ details in a user-defined table (UDT) which will be linked to the marketing documents from a UDF.

When creating or updating a delivery document, the warehouse dispatcher will use the UDF in the delivery document to choose a driver from the UDT.

Note

  • The UDT becomes part of the company database. The system identifies UDTs by the ‘@’ prefix so you can easily distinguish them from system tables.
  • Information about new tables is stored in the OUTB table.

The following video demonstrates how to define a UDT in the system using the delivery driver scenario.

The video showed you how to define a UDT in the system using the delivery driver scenario. The following is a summary of the steps demonstrated in that video.

First, define the UDT.

  1. Define the table
    • Enter the table name and description, which was Delivery Drivers in this example.
    • Select the table object type.
      • If you wish to link this table to a UDF in a document or form, choose the object type No Object or No Object with Auto Increment. You can link the same UDT to multiple UDFs in different categories, at both the title and the row level.
      • To link the table to a user-defined object (UDO) choose the object type: Master Data, Master Data Rows, Document and Document Rows.
  2. Add columns to the table. Each column is added as a UDF. In this example, it is Driver Name and Shift Worked.
  3. Review the table you are going to add.
  4. Enter data to the table rows – browse to the created table and add a new row for each record. In this example, add a row for each driver and enter the driver's name and shift.

Next, add a UDF to marketing documents at the title level, then link the newly created UDT to this field.

  1. Enter field title and description, such as Drivers.
  2. Choose the field type. To link a UDT, the UDF must be an Alphanumeric type, and its structure as Regular.
  3. Check the Link to Entity option, then choose the User-Defined Tables tab. Select the Drivers UDT.

When issuing a delivery document, the warehouse dispatcher can now choose a driver from the Drivers UDT using the Driver UDF.

To learn more, refer to User-Defined Tables | SAP Help Portal.

User-Defined Objects (UDO)

User-defined objects (UDO) allow you to add new business logic to SAP Business One, Web client. These objects are created with the help of existing Web client functionality like UDTs and UDFs.

  • UDO type can be master data or document.
  • UDO must contain one table with the object type master data or document.
  • UDO can optionally have a child table, that will appear as rows in the master data or document object.

    Child tables are created by selecting the object type as Document Rows or Master Data Rows.

  • UDOs have additional services like Cancel, Log and Year Transfer.

The following video shows you how to create a UDO to, for example, manage the company cars and their periodical treatments.

The video showed you how to create a UDO using the company cars scenario. The following is a summary of the steps demonstrated in that video.

  • Create two UDTs:
    1. Name the UDT as Company Cars. Set the Table Type to Master Data. To define the table columns, add UDFs to this table, which are Car Brand, Registration No. and Maintenance Date, in this example.
    2. Name the second UDT as Car Treatments. Set the Table Type to Master Data Rows. Add UDFs to define the table columns, which are Treatment Type and Treatment Date, in this example.
  • Create a UDO of Master Data type:
    1. In the General step, name the UDO as Company Cars Master Data, set the Type to Master Data, and select the Company Cars master data UDT.
    2. In the Setting Services step, select the services you want to add for the object, such as Delete, Cancel and Log.

    3. In the Setting Fields step, select the fields to be displayed in the master data parent table (title fields), such as Brand, Registration and Maintenance.
    4. In the Link Child Tables step, you have the option to link a child table if needed. In the demo, the Car Treatments master data rows UDT was linked.
    5. In the Setting Fields for Child Tables step, select the fields to be displayed in the master data rows, such as Treatment Type and Treatment Date.
    6. In the last step, review the result and choose Finish.

Result

In the User-Defined Objects menu, there is a new master data that functions as any other master data view in the system, allowing you to add rows to record the treatments of your company car fleet. You can also analyze this list view as any other view in SAP Business One, Web client.

User-Defined Values (UDV)

User-defined values (UDV) allow users to customize field values and automate field inputs. This eliminates the need for manual input by automating the process. You can add UDVs to system fields and user-defined fields in forms and documents, to assist and expedite data entry by end users.

UDV in SAP Business One, Web client deals with simple solutions while maximizing their potential and reducing the necessity of complex queries. With use cases such as Filtered List and Mathematical, or Logical Formulas, any user can create simple and intuitive solutions without using an SQL query

Note

Only authorized users can define user-defined values.

In the following lessons, you’ll see UDV feature use cases and how it allows customizing values for a variety of fields. These fields include the detailed views of both open and closed sales and purchasing documents, including UDFs:

Filtered List

Enables tailoring the visible values for a field with a dropdown list of extensive predefined options, ensuring the user does not accidentally choose irrelevant values.

A list of different item colors on the left, and a narrowed list of item colors on the right.

Mathematical Formula on a Header Field

A mathematical formula is a simple way to calculate a value that is based on variables (fields in the current UI) and arithmetic operators ( +, -, *, /) as well as API for Date and Time.

A sales order showing the Delivery Date field set to one week after the Posting Date.

Mathematical Formula on a Table Field

A mathematical formula on a table is a simple way to calculate a value that is based on variables (fields in the current UI) and arithmetic operators ( +, -, *, /) as well as API for Date and Time. In case the variable is from the table field, it is taken from the same table line where the UDV field is defined.

Coupon field set to ten percent. The Price with Coupon field shows 54 which is the price of the unit with the coupon applied.

Mathematical Formula with a Database Field

A mathematical formula with a database field is a simple way to calculate a value that is based on UI variables (fields in the current UI) and database variables (fields of other objects in the database)

A mathematical formula that pulls the customer’s account balance from the database so that the balance displays in the Remarks in the Customer Details section.

Defining a Logical Formula on a Checkbox

A logical formula is a simple way to calculate a Boolean value (true or false) that is based on variables (fields in the current UI) and database variables and logical operators (<,>,AND, OR, NOT,EQUAL) as well as API for Date and Time.

U_GoldCustomer UDF unchecked if the customer’s balance is less than 100,000 and checked if greater than 100,000.

To start working with UDVs you first need to:

  • Activate User-Defined Values
  • Show Indicator

Refer to Activating User-Defined Values and Showing Indicator | SAP Help Portal for more details.

Log in to track your progress & complete quizzes