|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Creating Database Views
By Pranshu Kukreti, Infosys
views are used to combine application data often distributed over several
tables. The structure of such views is defined by specifying the tables and
fields that are required. Fields which are not required can be hidden, thereby
minimizing the interfaces. A view can be used in ABAP programs for data
demo shows how to create database view for two database tables having foreign
be creating a database view for below shown tables YZ14_BANK &
YZ14_ACCOUNTS. Note that YZ14_ACCOUNTS is foreign key table (dependent table)
and YZ14_BANK is check table (referenced table) for field BRANCH_ID. It should
be kept in the mind that we can only include transparent tables in database
to transaction SE11 -> select radio button 'View' -> enter the name of the
view -> press 'Create'.
pop up screen will be displayed. Select 'Database View' and press
screen gets displayed, enter suitable short description.
'Tables' enter the name of the base tables which we want to include in our view.
In this case we will be entering tables as YZ14_BANK & YZ14_ACCOUNTS.
we need to link the entered tables by specifying the fields in join condition.
We can also derive the join conditions from existing foreign keys between the
base tables of the view. To do this, position the cursor on the table names and
at the bottom.
pop up comes wherein linked tables are present. Select the tables and press
clicking copy button, join condition will be derived from the base tables. In
our case, we have the below shown conditions.
the 'View Flds' tab, we need to enter all the fields, we want in our view from
the database tables. We can either enter the fields directly or we can copy them
from base tables. Later can be achieved by pressing
present in the tab 'View Flds'. We can also include complete table in a view by
entering * in 'View field' & table name in 'Table'. If fields are
inserted or deleted from this table, similar modification will be automatically
made in view structure.
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards