Mastering SAP ABAP: A Step-by-Step Guide to Database and Projection Views

 Hello everyone, we are back again and we will start with the practical implementation of database view and projection view.

Creation of Database View :-

  • Step 1:- Go to se11 and select view radio button and give a name { ZAR_DATABASE_VIU } and click on create button.

  • Step 2 :- Select the database view radio button and press enter.



  • Step 3 :- provide the short description.

Requirement :- We have to create a database view which include our created Order header and order item table and it consists of following fields :-

    


  • Step 4:- In tables column pass the name order header table and click on relationship button { It will show the table which has relationship with order header table }.



  • Step 5:- Select the radio button and click on copy, now the screen will look like this.



  • Step 6:- Click on view fields where select table fields button, then the screen will look like this.



  • Step 7:- Select the first table and select any number of fields that you want in your database view and click on copy.



  • Step 8:-now click on table fields and select the second table and choose the remaining fields from item table.





  • Step 9:- save and activate the view.





  • Step 10:- Now for displaying the contents of this view, click on contents button and click on execute.






Creation of Projection View :-

Note :- We can only pass only one table in projection view, this view is only created to filter out certain amount of fields from the table.

  • Step 1:- go to se11 , select the view radio button and give a name and press enter → select the projection view radio button and press enter.
  • Step 2:- Write the table name in the basis table.

Requirements :- Show Order number, order date, delivery number, delivery date from order header table.

    


  • Step 3:- Pass the ZAR_HEADER in the basis table and click on table fields and select the above fields and click on copy button.



  • Step 4:- Save and activate the projection view.

        


  • You can click on contents tab or { CTRL + SHIFT + F10 } and click on execute to display the data present in the projection view.



Q. In which scenario the database view becomes the projection view ?

Ans :- If we are creating database view for single table, then in that case database view will become the projection view.


Thanx for being a part of this journey.

Next :- We will be creating maintenance view and help view.

Comments

Popular posts from this blog

Understanding Different Types of SAP Function Modules: Normal, RFC, and Update

Unlocking SAP ABAP Secrets: Interactive Classical Reports with GET CURSOR, At User Command, and a Comparison of HIDE Statements

Mastering ABAP: A Step-by-Step Guide to Function Modules and Groups for Modularized Programming