Enhancing SAP Tables: Include and Append Structures, Domain Creation, and View Introduction
Hey, Welcome back everyone.
Today, We will continue with creating include and append structure and add it to our already created order header table.
So, basically we have to create the below domains and data elements first.
Requirements:-
-
Add Delivery number and Delivery date field to the Order Header Table with the help of include structure.
-
Add Delivery location to the order Header table with the help of Append structure.
-
Regenerate the table Maintenance Generator and insert the values of Delivery number, Delivery date and Delivery location.
-
Our header table should look like this :-
Creating the required data elements and domains :-
-
Step 1: Create domain and data element ZAR_DELIVERY_LOCATION of type char and length 3 and above mentioned value range.
-
Step 2:- Create domain and data element ZAR_DELIVERY_NUMBER of data type NUMC and length 12.
-
Step 3:- Create a domain and data element ZAR_DELIVERY_DATE with data type DATS.
Creating the include Structure and adding it into the Order header table:-
-
Step 1:- go to se11 and select radio button data type and give some name { ZAR_STRUCTURE } → click on create → select structure and press enter.
-
Step 2:- Enter delivery number and delivery location in the structure and activate the structure.
-
Step 3:- We have to insert the structure after order date, So go to se 11 and open ZAR_HEADER table in change mode → select the field payment mode.
-
Step 4:- Go to edit → include → click on insert.
-
Step 5:- give the structure name and press enter and table will look like this after that.
- Activate the table.
Creating a append Structure for delivery location field :-
-
Step 1 :- Open the table ZAR_HEADER in change mode.
-
Step 2 :- Click On append Structure and give the name and press enter.
-
Step 3 :- Enter the field and click on activate.
-
After this your table should look like this.
-
Step 4 :- Now go to TMG and delete the TMG and generate it again, so that the newly added fields get added otherwise you will not see them in SM30 and can be maintained from SM30.
-
After that go to SM30 and enter the above given data.
Views Introduction:-
- A view is a virtual table.
- A view is a logical database.
- It does not have any data.
Difference between table and view :-
- Table has data but view does not have any data.
- A table has a physical database but view does not have any database.
- View brings the data from the tables itself.
Types of Views :-
1. Database View :-
- It is a collection of one or more database tables.
- Pre-requisite :- Tables must have the relationship between them.
2. Projection View :-
- It is applicable to single tables.
- Select those fields which are required.
3. Maintenance View :-
- It’s purpose is to maintain multiple tables.
- Pre-requisite :- Tables should have the relationship between them.
- Take MANDT field in the maintenance view.
- Maintenance view can be used to maintain data in the tables.
4. Help View :-
- It is used in search helps.
- Pre-requisite :- Tables should have the relationship between them.
Note :-
- For maintenance view and help view, not more than one record should exist in the dependent/secondary table.
We will be creating all types of views in the next blog.
Comments
Post a Comment