1. From your Development Class, choose the Create button, then choose Dictionary objects from the following dialog box.
2. From the Dictionary objects list, choose View, then type in a name for the view. Finally, click on the Create button.
3. Choose a View Type. If the desired fields are from multiple tables, choose DATABASE as the view type. If the desired fields are from a single table, choose PROJECTION as the view type.
4. DATABASE views may require additional tables.
5. Click off each field you wish to include in your view, then click the copy button.
6. The following screen appears, showing the selected fields.
7. Choose the desired secondary table. Click Copy button.
8. The first table listed is automatically considered as the other primary table. List any desired secondary tables immediately after the primary table.
9. Check off each field you wish to include in your view, then click the copy button. You can also choose to include all the fields of a table in one entry by saying View Field = *, Table = Table Name, and Field Name = *. Then if you want to exclude a field, say View Field = -, Table = Table Name, Field Name = Field Name.
Repeat steps 6-9 for as many secondary tables you wish to include in your view.
After you have activated the view, you can now use it in your code.
12. Code Example of using a view.
13. Print out.
ASCENT - Strategic Initiative (SAP Development ABAP) Step-by-step Example: Views
SAP R/3 Release 3.x
1.Appendix 1.1 Version 2.0
Choose Dictionary objects.
Finally, click on the Create button.
Specify a name for your View Object.
Enter descriptive text for the view.
Click TABFIELDS button to choose your desired fields.
Enter primary table name.
Click this button to see a list of all secondary tables that already have a Foreign Key relationship built into the primary table.
Display shows Foreign Key relationship.
Click Tab Fields button to choose fields for secondary table
Enter secondary table name.
Display shows all fields included in the view.
Activate the view.