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: 

which one is used view or tables ?

Former Member
0 Kudos

Could you please guide me ...

I have data base view called MACKW.

Which is the combination of mara and marc.

like below it was joined

MARA MANDT = MARC MANDT

MARA MATNR = MARC MATNR.

My question is hwo to approach now .

In my program I have to go for

select from mara

then select from marc for all entries of mara?

OR is it better to use direclty

select from the dbview MACKW ?

Which way makes more sense ?

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can use DBview MACKW to select data from the database if you have all the fileds in that view

It acts as a inner join in your ABAP program.

Regards

Krishna

5 REPLIES 5

Former Member
0 Kudos

So long as the view has all the fields you need, I'd go for that.

You also have to make sure that there are no selection conditions for the view that might exclude data that you need. In this case, there are none.

Rob

Edited by: Rob Burbank on May 19, 2009 2:59 PM

Former Member
0 Kudos

Hi,

Please check whether all the fields in this view fulfills your requirement or not??

If it you can proceed with that but in my opinion its better you code join conditions in your program according to your requirement, If you want all the data from marc then that will be a bigger join statement so just check for the fields which you want and go further.

Regards

Sudhe

Former Member
0 Kudos

Hi,

You can go for the View instead of mara & marc.

Former Member
0 Kudos

MARC is at the plant level. I am sure you must be passing plant too. Check if there is any conditions for the DBVIEW. i.e. display records only for specific conditions. If not yes then you can use the DBVIEW else you can directly use your select & join. Check the link below for join.

[Specifying Database Tables |http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb39c4358411d1829f0000e829fbfe/content.htm]

Hope this helps.

Former Member
0 Kudos

Hi,

You can use DBview MACKW to select data from the database if you have all the fileds in that view

It acts as a inner join in your ABAP program.

Regards

Krishna