Tuesday, January 6, 2009

Views

Views: They are virtual tables.

  1. Projection View (can make changes if the view contains a single table).
  2. Database View (one or more than one table) using inner join

When we create a database view on more than one table, we can not change the underlying table values by using the view.

  1. Maintenance View

- Uses outer join

- It allows changing values in the underlying tables.

  1. Help View

- Uses Outer Join

- Uses for F4 help

Creating Projection View:

  1. Go to TCODE SE11
  2. Select Radio Button
  3. Enter View Name
  4. Click Create
  5. Select Project View Radio Button
  6. Enter Short Description
  7. Enter Basis Table (Database Table)
  8. Click on Table Fields
  9. Select the required Fields
  10. Select Maintain Status Tab.
  11. Read and Change.

Creating Database View:

  1. Go to TCODE SE11
  2. Select Radio Button
  3. Enter View Name
  4. Click Create
  5. Select Database View Radio Button
  6. Enter Short Description
  7. Enter Basis Table (Database Table)
  8. Enter Table Name in tables column
  9. Click on relationship
  10. Select relationships and click on copy.

Between 2 tables can select only one relationship.

  1. Click on View fields
  2. Click on table fields
  3. Select a table and click choose
  4. Select fields of table and enter.
  5. Do same for other table.
  6. In select conditions tab: Enter condition based on which need to be displayed.
  7. Save, Check and Activate.

NOTE: Check Table is Foreign Key Table.

Maintenance View: Create same a database view. But after activating, we need to create table maintenance generator.

We can write selection query using common fields also ( foreign key fields are never mandatory).

HELP VIEW: Similar to database view.

No comments: