0% found this document useful (0 votes)
12 views3 pages

SAP Custom Table and View Creation Guide

The document outlines the process for creating custom tables, data elements, domains, and database views in SAP using transaction code SE11. It details the steps for defining table fields, implementing check tables for data validation, and creating database views to combine data from multiple tables. Key considerations include ensuring proper naming conventions and establishing relationships through common fields.

Uploaded by

ajit
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

SAP Custom Table and View Creation Guide

The document outlines the process for creating custom tables, data elements, domains, and database views in SAP using transaction code SE11. It details the steps for defining table fields, implementing check tables for data validation, and creating database views to combine data from multiple tables. Key considerations include ensuring proper naming conventions and establishing relationships through common fields.

Uploaded by

ajit
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SAP Table Creation, Data Elements, Domains,

and Database Views


Table Creation
Custom tables in SAP are created when standard tables do not meet business requirements.
Custom table names must begin with either z or y.
Transaction Code: SE11 (ABAP Dictionary) is used to create database tables (data dictionary
tables).

Steps to Create a Table


1. Access SE11: Enter the transaction code SE11 in the SAP system.
2. Enter Table Name: Provide a name for the custom table, starting with z or y.
3. Click Create: Select the "Database table" radio button and click the "Create" button.
4. Description: Enter a description for the table (e.g., "Employee data table").
5. Delivery and Maintenance Tab:

Delivery Class: Choose a delivery class.


A: Application table (Master data and transaction data). Used for transporting data
between systems (Development -> Quality -> Production).
Data Browser/Table View Editing:

1. Fields Tab: Define the fields for the table.


"Display/Maintenance Allowed": Allows displaying and maintaining data in the table.
"Display/Maintenance Not Allowed": Allows displaying the table but prevents direct data
maintenance.

Key Fields
MANDT: Represents the client. It is a common field across all tables and is client-specific.
Client-specific data ensures data is relevant only to that client.

Field Definition
Field Name: Enter the name of the field.
Key: Check this box to indicate if the field is a key field.
Data Element: Used to link a field to a specific data type and length.
Predefined Data Type: Allows directly assigning a data type (e.g., CHAR, NUMC, INT4, DATS,
TIMS) to the field along with its length.

Data Elements and Domains


Data Element
Contains metadata about a field, including its data type, length, and description.

Domain
Defines the technical characteristics of a field, such as data type and length.
Data elements are linked to domains.

Relationship

Table Field -> Data Element -> Domain -> Data Type and Length

Creating Data Elements and Domains


1. From Table Creation (SE11):

In the "Fields" tab, enter a field name and a data element name (starting with z or y).
Double-click the data element to create it.
Enter a description for the data element.
Specify a domain or create a new one by entering a domain name and double-clicking it.
In the domain, define the data type and length.

1. Directly from SE11 (Initial Screen):

Select the "Domain" radio button.


Enter a domain name (starting with z or y) and click "Create".
Enter a description, data type, and length.

Fixed Values
Used to restrict the values that can be entered into a field.
Maintain fixed values in the domain's "Value Range" tab.
Can specify single values, interval values, or a value table.

Check Tables
A check table is used to validate the values entered in a field against the values in another
table.
This ensures data consistency and integrity.

Steps to Implement a Check Table


1. Foreign Keys: In the "Fields" tab of SE11, select the field for which you want to implement a
check table.
2. Foreign Key Option: Click on the "Foreign Key" button.
3. Check Table: The system will prompt you to create a foreign key. Select the table you want to
use as the check table. It should be a standard table.
4. Save and Activate: Save the table and activate it.

Database Views
Used to combine data from multiple tables into a single, virtual table.
Data is not physically stored; it's retrieved dynamically when the view is accessed.
Transaction Code: SE11 is used to create database views.

Types of Views
Database View: Used to fetch data from multiple tables.
Projection View
Maintenance View
Help View

Steps to Create a Database View


1. Access SE11: Enter the transaction code SE11 in the SAP system.
2. Select View: Select the "View" radio button.
3. Enter View Name: Provide a name for the database view (starting with z or y).
4. Click Create: Click the "Create" button.
5. Select View Type: Choose "Database View" and click "Continue".
6. Tables Tab:

Enter the tables you want to combine.


Specify the join conditions (common fields) between the tables.

1. View Fields Tab:

Select the fields you want to include in the view from each table.

1. Save and Activate: Save the view and activate it.

Important Considerations
When creating a database view, you should combine tables, not other database views.
Identify common fields between tables to establish relationships.

You might also like