Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to create a view?

Former Member
0 Likes
14,123

HI friends,

Can any one help me out in creation of view i am suceeded in creation but while display it is showing no records

i think i am going wrong in selection conditions....can anyone give me clear steps to create a view.?

HI friends,

Can any one help me out in creation of view i am suceeded in creation but while display it is showing no records

i think i am going wrong in selection conditions....can anyone give me clear steps to create a view.?

6 REPLIES 6
Read only

Former Member
0 Likes
8,579

Hi,

If you want to create a View for creating a Generic Data Source, then

1. Go to SE11. Choose 'views' option and click create.

2. Choose DB View

3. Save it in a Development class

4. In the Table column, enter the Table name on which you want to create view.

5. In the 'View Fileds' tab, enter the Table name and field nams in the respective columns and then save the view.

6. Check it and then generate the View.

7. Select 'Display Data' option from the Utilities menu and check whether the data has been loaded or not.

Hope this helps. Don't forget to reward us by assigning points for our hardwork by clicking on the Yellow star to the right end of the question.

Thanks.

Vasanth

Read only

0 Likes
8,579

i did the procedure you stated but i am not getting i am once again mentioning i am going wrong in selection conditions please do help me in that.

Read only

0 Likes
8,579

1. Enter an explanatory short text in the field Short text.

You can for example find the view at a later time using this short text.

2. Define the tables to be included in the view in the Tables field of the Tables/Join conditions tab page. Keep in mind that you can only include transparent tables in a database view.

3. Link the tables with join conditions. If there are suitable foreign keys between the tables, you should copy the join conditions from these foreign keys Place the cursor on a table name and choose Relationships. All foreign keys to other tables defined for this table are displayed. Select the foreign keys and choose Copy. The join condition is now derived from the definitions in the foreign key.

If you only want to see the foreign key relationship existing between two tables, you must first select these two tables (click on the first column of the input area Tables) and then choose Relationships.

4. On the View fields tab page, select the fields that you want to copy to the view. Choose Table fields. All the tables contained in the view are displayed in a dialog box. Select a table. All the fields contained in this table are displayed. You can copy fields by selecting them in the first column and choosing Copy.You can also include an entire table in the view .

5. On the Selection conditions tab page, you can (optionally) formulate restrictions for the data records to be displayed with the view .

The selection conditions define the data records that can be selected with the view.

6. With Goto à Technical settings, you can (optionally) maintain the technical settings of the database view.

You can define whether and how the database view should be buffered here. Proceed as for the technical settings of a table .Note that only the settings for buffering can be maintained for database views.

7. On the Maintenance status tab page, select the maintenance status of the database view.

If the view contains more than one table, the maintenance status read only cannot be altered.

8. Save your entries. You are asked to assign the view a development class. You can change this development class later with Goto àObject directory entry.

9. ACTIVATE VIEW.

PLZ REWARD IF USEFUL

VIVEK

Edited by: Vivek Gaur on Feb 25, 2008 1:26 PM

Read only

Former Member
0 Likes
8,579

Hi,

The followings are different types of views:

- Database View (SE11)

Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.

In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.

- Help View ( SE54)

Help views are used to output additional information when the online help system is called.

When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.

Go thru this link plzz

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm

- Projection View

Projection views are used to suppress or mask certain fields in 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 draw upon only one table. Selection conditions cannot be specified for projection views.

- Maintenance View ( SE54 )

Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.

Please have a look at below link. It will help you.

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm

for more detailed info look on:

http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm

&

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&;

1.Go to se11

2. select view radiobutton and give a name

3. Create

4. select type of view you want to create. Such as database view.

5. give short description

6. give a table name such as mara

7. press the pushbutton relationship. here you will find all the tables which are allowed to create view with mara.

8. select one or mane tables.

8 copy

9.save , check and activate.

cheers,

vasavi

kindly reward if helpful

Read only

Former Member
0 Likes
8,579

select se11.

give the view name.

at the tables option place give the wat table fields u r going to view.

then we appear one long subscreen type.

inthat give the any reltation between two tables.for ex.any pripary key and foreign key relation ship is there like that.

then click views option.

in that write which field in the table = which fields in the view.

which field in the table i want to see these fields in the view like that mannse.

then click copy.

your program ends..

this is the databae view.

Read only

Former Member
0 Likes
8,579

Hi,

VIEWS:

-


To fetch records from more than one database table, database view is used.

NAVIGATIONS:

-


SE11 -> Select View Radiobutton -> Specify name -> Create -> Select Database View -> Continue -> Opens interface -> Enter short description -> Specify table names in TABLES area -> Click on Relationships pushbutton -> Opens an interface -> Select relationship based on primary key values (not based on MANDT field) -> A join condition is automatically generated -> To choose fields from different tables, click VIEW FIELDS tab button -> Click TABLE FIELDS pushbutton -> Select first table -> Click on Choose -> Select required fields -> Repeat same for other tables -> Save -> Activate -> Say NO to warning message.

In SE38 editor, use the following code to access records using View:

TABLES Y_MYVIEW.

SELECT * FROM Y_MYVIEW.

WRITE 😕 Y_MYVIEW-MATNR, Y_MYVIEW-MTART, Y_MYVIEW-MBRSH, Y_MYVIEW-MEINS, Y_MYVIEW-WERKS, Y_MYVIEW-LVORM.

ENDSELECT.

-> Save -> Activate.

Regards,

Priya.