How to create tables in SAP system-II
Creation of Transaction data table with variable currencies and units of measure
Method: Top down approach
Structure:
PRID CHAR(4) key (Product ID)
PRQTY – QUAN (6) (Product Quantity)
UNITS – UNIT (3) (Units of measure)
H2BPRSALES – CURR (6) (H2B Product Sales)
H2BPROFIT – CURR (6) (H2B Profit)
CURRENCY – CUKY(5) (Currency key)
Procedure:
Step 1 Logon to SAP R/s ECC
Step 2 Create table
Enter tcode SE11
Select radio button ‘Database table’. Give a table name ‘ZH2BSALES’
Select ‘Create’.
Give a description of the table -‘How2BW Sales Transaction table’
Delivery class: ‘A’
Data browser/Table view maintenance: Choose ‘Display/Maintenance Allowed’
Select ‘Save’
Give a package and a TR
Step 2.1 Create table fields
Select ‘Fields’ tab
Give PRID as key field with initial value not allowed checked.
Give the data element as ZPRID_DE and double click on it.
Select ‘Yes’ and then select ‘Continue’
Give a description of the data element. Select Domain radio button and give a domain name as ‘ZPRID_DO’
Double click on the domain. Select ‘yes’.
Give a description of the domain and give data type as ‘CHAR’ and length as 4. Activate the domain.
Activate the data element.
Similarly give other fields of the table, create and activate the data element and domains for them.
Field: PRQTY
Data element: ZPRQTY_DE
Domain: ZPRQTY_DO
For the domain, select data type as ‘QUAN’ and give number of characters as 6.
QUAN is quantity field, it points to a unit field with format UNIT
Activate the domain and the data element.
Field: Units
Data element: ZUNITS_DE
Domain: ZUNITS_DO
Choose ‘UNIT’ as the data type of the domain. Give number of characters as 3.
Activate the domain and the data element.
Field: H2BPRSALES
Data element: ZH2BPRSALES_DE
Domain: ZH2BPRSALES_DO
Select data type as ‘CURR’ stored as DEC. Give number of characters as 6.
Activate the domain and the data element.
Field: H2BPROFIT
Data element: ZH2BPROFIT_DE
Domain: ZH2BPRSALES_DO
Select fields label. Give medium description as ‘Profit on sales’
Field: CURRENCY
Data element: ZCURRENCY_DE
Domain: ZCURRENCY_DO
Give data type of the domain as ‘CUKY’ and give number of characters as ‘5’.
Activate the domain and the data element.
Step 2.2 Maintain reference table and reference fields for the fields with data type QUAN and CURR
Select ‘Currency/Quantity fields’ tab
PRQTY: give reference table as ‘ZH2BSALES’ and reference field as ‘UNITS’
H2BPRSALES: Reference table as ‘ZH2BSALES’ and reference field as ‘CURRENCY’
PROFIT: Reference table as ‘ZH2BSALES’ and reference field as ‘CURRENCY’
Select Save.
Step 2.3 Maintain technical settings
Select ‘Technical Settings’
Data class: Select as ‘APPL1’ – Transaction data, transparent table
Size category: Choose ‘0’
Select ‘Save’. Then press F3.
Check the table.
A warning is displayed saying that the ‘Enhancement category for the table is missing’
Press F3.
Note: To resolve the warnings.
Go to the ‘Extras’ menu and select ‘Enhancement Category’
Select the option ‘Can be enhanced (Character type or numeric)’
Continue.
Save and check your table.
Message: ‘No inconsistencies found’
Activate your table.
The table is now created along with the meta data.
Step 2.4 Enter data manually
Select ‘Utilities’ menu and select ‘Create entries’
Give some sample entries and save them.