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

Join MARA with TKKH

Former Member
0 Likes
1,010

Hi,

I need to make a join between the tables MARA & TKKH2.

The fields I need to retrieve are MARA-MTART, TKKH2-HRKFT and TKKH2-HRKTX

where MTART in ('ZENV', 'ZEMB', 'ZMAT')

I know there is no direct reference between the two but if anyone has any ideas about it let me know.

Regards,

Simon

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
826

there is no direct link between MARA and TKKH, so no answer to your request,; more exactly there may be multiple values for one material number.

You need to start from MBEW, which has a HRKFT field related to TKKH1 table. Look at foreign key on table MBEW field HRKFT. (or build KOKRS from MBEW-BWKEY -(T001K)-> BUKRS -(TKA02)-> KOKRS.)

I almost forgot to mention that TKKH2 is TKKH1 text table.

Regards

Hi,

I need to make a join between the tables MARA & TKKH2.

The fields I need to retrieve are MARA-MTART, TKKH2-HRKFT and TKKH2-HRKTX

where MTART in ('ZENV', 'ZEMB', 'ZMAT')

I know there is no direct reference between the two but if anyone has any ideas about it let me know.

Regards,

Simon

3 REPLIES 3
Read only

RaymondGiuseppi
Active Contributor
0 Likes
827

there is no direct link between MARA and TKKH, so no answer to your request,; more exactly there may be multiple values for one material number.

You need to start from MBEW, which has a HRKFT field related to TKKH1 table. Look at foreign key on table MBEW field HRKFT. (or build KOKRS from MBEW-BWKEY -(T001K)-> BUKRS -(TKA02)-> KOKRS.)

I almost forgot to mention that TKKH2 is TKKH1 text table.

Regards

Read only

Former Member
0 Likes
826

Hi,

Try this way.

1. Use SQVI transaction,

2. Create a View

3. Enter title,

4. Choose the Data source as Table Join

5. Now use Insert table option.

6. And insert the tables which you want. It will propose the relation between them.

Thanks

Nitesh

Read only

Former Member
0 Likes
826

A combination of both comments proved to be just right.

Thanks guys,

Simon