Projection view

   1. Projection view

        *  If you want to display the part of data from single database table, it's better to create projection view.

        *  Projection view is always involving single database table.

        *  Fetching the data from view is faster than fetching the data from database table.

        Steps to create projection view.

            * Execute SE11.

            *  Select the radio button view. 

            * Provide the projection view name. 

            * Click on create. 

            * Select the radio button projection view. 

            * Enter. Provide short description.

            *  Provide the basis table. 

            * Click on table fields button. 

            * Select the required fields check box. Enter. Save, check, activate.

            




Code 

REPORT ZRP_PROJ_VIEW.
TABLES:zajay_zstu.
datait_zstu type table of zajay_zstu,
      wa_zstu type zajay_zstu.

select zst_id
        zst_name
        zst_dept
        zst_fee
        from ZPV_STUDENT  " projection view
        into table it_zstu.
LOOP AT it_zstu into wa_zstu.
  write / wa_zstu-zst_id under 'Student Id',
          wa_zstu-zst_name UNDER 'Student Name',
          wa_zstu-zst_dept UNDER 'Student Dept',
          wa_zstu-zst_fee UNDER 'Student fee'.

ENDLOOP.


Output





Comments

Popular posts from this blog

Pf status and user command in factory method - OOPS ALV in ABAP

fetch the data from table and send an email in ABAP

Enhancements in abap