Joining tables MARA and MAKT in SAP ABAP

I have written a inner join to join tables: MARA and MAKT.

In both tables, column MATNR is common so i join them. Still i get duplicate values when i run the query so i need to find more columns that are related by primary key and foreign key.

In SE11 (MARA table), the Fields tab shows the primary keys for MARA and Entry help/check tab tells me about foreign keys on table MARA and the check table name.

However, None of the foreign keys show check table as MAKT.

So how do i decide how are MARA and MAKT related?
gram77Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Onn LightSAP Technical ConsultantCommented:
Dear gram77

The following are the primary keys for MARA and MAKT

mara--pk.pngmakt---pk.png
As MAKT is a text table it will have multiple entries for a single material in different languages EN, DE etc.

The join between them should include mandt and matnr fields as shown below

mara-makt-join.png
And its better to include all the primary keys in the view fields of the view.

View-Fields-Marav.png
You can restrict entries and thus duplicates displayed in the view by restricting the language to a single entry in Select conditions
Selection-Conditions.png



Thanks and Regards
onn

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gram77Author Commented:
SpotOn.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SAP

From novice to tech pro — start learning today.