Joining tables MARA and MAKT in SAP ABAP

gram77
gram77 used Ask the Experts™
on
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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
SAP Technical Consultant
Commented:
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

Author

Commented:
SpotOn.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial