Application Development 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: 

Reg Database view

Former Member
0 Kudos

Hi all Gurus,

I am trying to create a database view for joining STKO, STPO, MAST.

I am getting duplicate records., How to avoid that ?

Very CRITICAL situation . If any one of u have view for these table, please gimme the TABLE JOIN CONDITIONS.

Hoping for the reply please

Regards

karthik

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

From SE11 create the DB view and join the tables with the key fields

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.

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&;

Reward points for useful Answers

Regards,

Raj.

3 REPLIES 3

Former Member
0 Kudos

hi,

You r getting duplicate records due to stpo where their is IDNRK (component no).

you can take enteries from mast and stko with inner join with common field of STLNR.

and then for all enteries from stpo.

so what basically u rquired the output ?

Priya.

reward if helpful

0 Kudos

Hi priya

Basically i am working for BW project. i have to craete a view and then i should take it to Bw side.

My requirement is to take amterial and the corresponding Components to BW side along with BOM category.,,

Regards

karthik

Former Member
0 Kudos

Hi,

From SE11 create the DB view and join the tables with the key fields

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.

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&;

Reward points for useful Answers

Regards,

Raj.