Help View in SAP ABAP

by | Apr 21, 2018 | ABAP Beginner

Home » SAP » ABAP » ABAP Beginner » Help View in SAP ABAP

Preface – This post is part of the ABAP Beginner series.

Help View in SAP ABAP

As the name suggest, A Help View in SAP ABAP is a view that is used as a selection method in Search Help. A search help takes either tables or views as input. The views can be Database View, Projection View or Help Views, based upon requirement.
A Database view uses inner join and hence provides only those data that has relational entries in all table. In case you need all data, irrespective of any condition from given tables, you need to use outer join i.e. a view that uses outer join i.e. Help View.

Definition

A Help View in SAP ABAP is a view that combines multiple tables into a single view using outer join and is mainly used as an input to Search Help.

*NOTE: The Join Conditions can be only chosen via tab. Relationship Tab Image  It means you need to create foreign key relationship in advance. To know how to create a Foreign Key Relationship click here.

For basics of Views Click Here.

Help View in SAP ABAP

Creation of Help View in SAP ABAP:

Step 01: Open SE11, select Views radio button, and enter a name for your view e.g. ZBARRY_HELP_VIEWS and click CREATE. Choose Help Views from radio buttons.

Step 02: Write an explanatory short text e.g. Help View for Employee ID.

Step 03: Write all your primary table names you want in your view in column Tables.

*NOTE: Only tables linked with Primary table (via Foreign Key Relationship) can be included in the view.

Table 01 Image
*NOTE:
Only the Relationship made with N:1 cardinality will be available. To know more about Help View Restrictions CLICK HERE.

Step 04: Now you need to provide Join Conditions. Select your Primary Table and click Relationship Tab Image; it will fetch the foreign key relationship. Choose and copy the Relationship. The Join Condition derived from the relationship will be displayed as shown below. [To know more about Foreign Keys CLICK HERE].

Table View
Step 05:
Click View Fields and then click Table fields, Select the fields from each table that you want to be visible in your View.To know more about Joins CLICK HERE.

*NOTE: By default all the fields of Primary Table that you have provided in Step 03 will be chosen (as it is an outer join).

Step 06: Save it, check for Errors and click Activate.

 *NOTE: There are more functions and additional options of Help View, we will update it soon.

Advantages of Help Views

  1. Help View fetches required data from Multiple Tables and hence faster than selecting data from these tables individually.
  2. Help Views utilizes Outer Join and hence all data from Primary table is displayed irrespective of their presence in other secondary tables.

This feature can be understood via an example that we have a view that displays an employee name with First name and Last name that are being fetched from two different tables on basis of Employee ID.

Table 1:

Emp ID First Name
001John
002Ron

 

Table 2:

Emp ID Last Name
001Cena

 

Inner Join Output:

Emp ID First Name Last Name
001JohnCena

 

Outer Join Output:

Emp ID First Name Last Name
001JohnCena
002Ron

 

Author

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Author