You are on page 1of 22

Customization Tools:

User-Defined Tables
SAP Business One
Version 10.0

PUBLIC
Objectives

Objectives:
 Add a user-defined table (UDT) to the SAP Business One
database and make it accessible in a document or form

 Create a user-defined object (UDO) from a user-defined table


and make the object accessible from the main menu

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Business Scenario

 The company wants to assign a delivery driver to delivery documents. The delivery
drivers can be maintained in a user-defined table which is accessed from the delivery
document.
 The table can be maintained by users.

Incoming
Sales Order Delivery A\R Invoice Payment

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


User-Defined Tables

Tools → Customization Tools → User-Defined Tables - Setup

 User-defined tables (UDTs) store


related sets of data
 User tables have the prefix @
 Option to copy UDTs when creating
new company

@Drivers

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Object type for User-Defined Tables

Tools → Customization Tools → User-Defined Tables - Setup


 To set up table, enter name and description, and Object Type:
select object type To link table to user-defined field (UDF) in a
document or form, choose:
 No Object
 No Object with Auto. Increment

To link table to a user-defined object (UDO)


choose:
• Master Data
• Master Data Rows
• Document
• Document Rows

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Information about User-Defined Tables

 Information about new tables is stored in OUTB table

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Linking a User-Defined Table to a UDF
Accessing a New Table

Tools → User-Defined Windows

 Access new table from the Tools


menu
 Table initially contains two columns –
code and name

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


Entering Data in a New Table

 If object type No Object,


Code field is editable
 If object type No Object with
Auto Increment, Code field
not editable and is auto
incremented
 Code is primary key and
Name must be unique in
each row

Primary key Unique

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Adding Columns to a UDT

Tools → Customization Tools → User-Defined Fields - Management

 To add columns to table, select the table and


choose Add

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Viewing the Columns Added to a UDT

Additional Columns
Tools → User-Defined Windows

 To enter data in the additional


columns, or add new rows to the
table, open the table from the
Tools menu
 If new columns are not visible in
window, adjust width of columns

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Queries

 The user-defined table is not yet attached to a


form or document, but can be used in queries

 Table name starts with @

 Columns are UDFs so start with U_

 You can also import data into the table using the
Data Transfer Workbench.

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Linking the Table to a UDF

Tools → Customization Tools → User-Defined Fields - Management


 To make the table accessible to users, link it
to a UDF in a document or form
 UDF must be Alphanumeric type

Note: You can link the same user-defined table to


multiple user-defined fields.

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


Using the UDT in a Document

 To view and access all columns,


choose Define New

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


Selecting the Value from the UDT

Value selected in user-defined table is


stored in the user-defined field

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


Linking a UDT as a User-Defined Object
Adding Fields to User Table for UDO
Tools → Customization Tools → User-Defined Fields - Management
 To link a user table as a
user-defined object (UDO)
you create the table with
the object type Master Data
or Document.
 User-defined object (UDO)
consists of UDT and added
UDFs
 These fields will hold the
data for the new business
object
 To add user-defined fields
to user table, use the path
shown here or you can use
the DI API

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17


Registering the New Table as an Object

Tools → Customization Tools → Objects Registration Wizard

 Use the registration wizard to register user


tables as user-defined objects
 The registration is per company
 Enter a unique ID and select the table
 Select the services for the object, such as:
 Add
 Update
 Find
 Delete
 Optionally select child table as rows

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


Adding the Object to the Main Menu

 To add the object as a


menu item, select the
Menu Item checkbox,
then select the module
and position

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 19


Style of the New Table

Header Line Style

Matrix Style

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 20


User-Defined Tables: Key Points

Key points from this topic:


 You can add user-defined tables (UDTs) to the database to hold additional, related sets of
information
 User-defined tables have the prefix “@”
 To link a user-defined table to a user-defined field in a document or form:
 Select Object Type as No Object or No Object with Auto. Increment
 The table is initially created with two columns, code and name. Add user-defined
fields as additional columns in the table
 To make the table available in a document or form, link the table to a user-defined field
in the document or form (choose the Set Linked Table option).
 To use a table as a user-defined object:
 Select Object Type as Master Data or Document
 Add user-defined fields as columns
 Run the objects registration wizard to create the user-defined object, select the object
services, select child tables for rows, and add the object to the main menu.

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 21


© 2020 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components
of other software vendors. National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated
companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are
set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release
any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products,
and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The
information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various
risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements,
and they should not be relied upon in making purchasing decisions.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company)
in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.
See http://global.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.

You might also like