Вы находитесь на странице: 1из 11

Creating Projection View

Projection View
We use projection view to mask unwanted fields and display only relevant fields in a
table. Basically View acts like a database table, only the difference is view will not occupy
storage space.
1. Creating Projection View

2. Choose Projection View in the pop up which appears when you click on create

3. Give Description & base Table name(In this example we have taken KNA1). After giving
table name click on Table fields button

4. Choose the fields which you want to be displayed in output and click copy

5. View should look like this now

6. Now Save, Activate & execute it, output will be

Summary
In standard sap tables we will have many fields, of which we will use only few fields.
whenever we go and view the data we have to come across unwanted data, to avoid this and get
display of field which relevant to scenario we use this projection view.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;;

By Gokul R, Iteanz Technologies


We use projection view to mask unwanted fields and display only relevant fields in a table. Basically View
acts like a database table only, the difference is view will not occupy storage space.
1. Creating Projection View

2. Choose Projection View in the pop up which appears when you click on create

3. Give Description & base Table name(In this example we have taken KNA1)

Click here to continue...


...Previous
4. After giving table name click on Table fields button

5. Choose the fields which you want to be displayed in output and click copy

6. Now Save, Activate & execute it, output will be

Summary
In standard SAP tables we will have many fields, of which we will use only few fields. whenever we go
and view the data we have to come across unwanted data, to avoid this and get display of field which
relevant to scenario we use this projection view.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::

Creating a Projection View

Enter the name of the view in the initial screen of the ABAP Dictionary, select object class Views and
choose Create. A dialog box appears in which you must choose the type of the view. Select the type
Projection view.
The maintenance screen for projection views appears. You will see an input field for the base table of the
projection view and an input area for view fields.
1. Enter a short explanatory text in the field Short text.
2. In the Base table field, enter the name of a table.
3. Select the fields of the base table which you want to include in the view.
You can enter the field names directly. If you do not know the field names, you can also copy
them from the tables. To do this, position the cursor on a table and choose TabFields. The fields
of the table are now displayed in a dialog box. You can copy fields from here by marking the first
column and choosing Copy.

4. Save your entries. You are requested to assign the view a development class. You can change
this development class later with Extras Object directory entry.

5. Activate the view with View Activate. A log is written during activation. You can display this with
Utilities Activation log. Errors or warnings occurring during the activation of the view are
displayed directly in the activation log.

6. Create the documentation for the view with Goto Documentation. This documentation is output
for example when you print the view with View Print.

Optional Settings
You can make the following optional settings:

Change data element of a view field:


Select the Mod column (modify) for the view field and choose Enter. The Data element field is
now ready for input. Enter the new data element there. This data element must refer to the same
domain as the original data element. With the F4 help key for the Data element field, you can
display all the data elements which refer to the domain of the field. If you want to assign the
original data element again, you only have to reset the Mod flag and choose Enter again.

Change maintenance status:


The maintenance status determines how you can access the view data from ABAP programs
(read only, read and change). Choose Extras Maintenance status. A dialog box appears in
which you can select the maintenance status for the view.

Display view data:


With Utilities Display data you can determine which data can be selected with the view.

Check functions:
With Extras Runtime object Check you can determine whether the definition of the view in
the ABAP Dictionary maintenance is identical to the specifications in the runtime object of the
view. With Extras Runtime object Display you can display the runtime object of the view.

Display foreign key of a view field:


If a foreign key which was automatically included in the view definition is defined for the field of
the base table, you can display it. To do so, position the cursor on the view field and choose
Extras Foreign keys.

See also:
Projection Views

Projection Views
Projection views are used to mask out certain fields of a table (projection), thus minimizing the number of
interfaces. This means that only the data that is actually required is exchanged when the database is
accessed.
A projection view can only refer to one table. Selection conditions cannot be specified for projection
views.
There is no corresponding object on the database for a projection view. Access to a projection view is
mapped by the R/3 System onto the corresponding access to its base table.
It is also possible to access pooled tables or cluster tables with a projection view.
In an INSERT with a projection view, the fields which were masked out are supplied with their initial
values, thus avoiding NULL values.
See also:
Creating a Projection View

Вам также может понравиться