Show TOC

Modelling Normalized Data PersistenceLocate this document in the navigation structure

Sales order data can be distributed generally across multiple database tables: a table for the sales order (header data), a table for business partners, or for currency and status information. With the provision of normalized persistence, each individual database table serves for arranging data into logical groupings such that each one describes a small part of the whole. In the context of business applications, each table field corresponds to an attribute of the business object that is represented by the entire database table. Each table row represents a unique instance of that business object and must be different in some way from all other rows (that is, no duplicate rows are possible).

Starting Point and Prerequisites

To provide data persistence for our sample Sales Order scenario, we assume that you...

  • Have the standard developer authorization profile to create ABAP development objects with ABAP Development Tools.
  • Reuse the data elements from EPM sample data model (SNWD_*) when creating table fields for Sales Order (header) table.
  • Access related business data from associated views or tables that originate in EPM sample data model.
Procedure
  1. Choose Open SAP GUI for the relevant ABAP project by clicking the icon Open SAP GUI in the toolbar in ABAP Development Tools.

    Within the embedded SAP GUI, you are able to access the complete functionality of the classic ABAP Workbench.

  2. In the command field, enter the transaction code SE11.
  3. Create the database table ZTAB_SO with fields as they are listed below.
  4. On the Currency/Quantity Fields tab page, define the Reference field CURRENCYCODE and Reference table ZTAB_SO for the both fields GROSSAMOUNT and NETAMOUNT.
  5. Activate the table.

More on this:

Table 1: Database table ZTAB_SO
Field

Data Element

CLIENT (key)/(initial value)

MANDT

SALESORDER (key)/(initial value

SNWD_SO_ID

BUSINESSPARTNER

SNWD_PARTNER_ID

CURRENCYCODE

SNWD_CURR_CODE

GROSSAMOUNT

SNWD_TTL_GROSS_AMOUNT

NETAMOUNT

SNWD_TTL_NET_AMOUNT

BILLINGSTATUS

SNWD_SO_CF_STATUS_CODE

OVERALLSTATUS

SNWD_SO_OA_STATUS_CODE

.INCLUDE

/BOBF/S_LIB_ADMIN_DATA

Tip The standard administration data, such as the respective user or the time of creation, are included in the table by means of a predefined BOPF structure /bobf/s_lib_admin_data.
Results

Using the time-proven ABAP Dictionary tools, you created and activated a database table for Sales Orders (ZTAB_SO) as a part of normalized data persistence.

On the basis of the table ZTAB_SO we will generate a corresponding business object. Each table field corresponds to an attribute of the Sales Order business object (to be created) represented by the entire table.

Database table ZTAB_SO in SE11 transaction
Figure 1: Transparent table as persistence model – created in SE11