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

view

Former Member
0 Likes
764

Hi friendz,

can u give me procedure to create a data base view and after creating how to write select statements to slect data from a view.

regards,

siri,

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
657

Hi Sireesha,

example.

i have created a view zview,in it i have 5 fields

matnr,mtart,werks,dispo,dismm,

now my select query is

select matnr mtart werks dispo dismm from zview

into table it_view.

regards,

nagaraj

5 REPLIES 5
Read only

Former Member
0 Likes
657

Hi

To create View: trx SE11

- Choose View option;

- Insert the name Z<VIEW>

- Choose the type View

- Insert the tables of the view a the join condition

- Insert the fields you need in the views from the tables of the join

The select is the same:

SELECT * FROM Z<VIEW> WHERE ......

Max

Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
657

Hi,

You can create views through TCode - se11. Giv some some name and click on create. It will prompt you to select the type of view you need to create. Select any one from the popup window and proceed. Click on the below link for more details in creating views.

<a href="http://help.sap.com/saphelp_47x200/helpdata/EN/4c/81c1351181b73fe10000009b38f839/frameset.htm">http://help.sap.com/saphelp_47x200/helpdata/EN/4c/81c1351181b73fe10000009b38f839/frameset.htm</a>

<a href="http://help.sap.com/saphelp_46c/helpdata/en/36/74c0358373003ee10000009b38f839/frameset.htm">http://help.sap.com/saphelp_46c/helpdata/en/36/74c0358373003ee10000009b38f839/frameset.htm</a>

And to select the data from the view it's same as selecting from the table...

Cheers,

Simha.

Note: Some points could be fine..

Read only

former_member404244
Active Contributor
0 Likes
658

Hi Sireesha,

example.

i have created a view zview,in it i have 5 fields

matnr,mtart,werks,dispo,dismm,

now my select query is

select matnr mtart werks dispo dismm from zview

into table it_view.

regards,

nagaraj

Read only

Former Member
0 Likes
657

Hi,

GOTO SE11, in the view tab, give a view name(Zview), Create, select DB view Radiobutton, enter short description, give the Check table name and the dependent table names on the left hand side view, Click on Establish Relationship button, select the checkboxes the relationships are automatically generated,click on the viewfield button in tabstrip, give the view fields and the corresponding table fields, if you want any specific condition enter in the conditions tab, activate the view and in the program use the normal select query instead of table name give view name.

Regards:-

Santosh.D