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

Joining Tables 2

Former Member
0 Likes
560

Hi

I want to join BKPF and CDHDR and they can be joined through the OBJECTCLAS field in CDHDR and a combination of MANDT BUKRS BELNR GJAHR in the BKBF table, so

OBJECTCLAS = MANDT & BUKRS & BELNR & GJAHR

im not sure how to do this, can anyone help please

Thanks in adavance

4 REPLIES 4
Read only

alex_m
Active Contributor
0 Likes
532

There is no fields to relate both a table, so u cant join both the table. Atleaset one key field should in both the table.

Read only

Former Member
0 Likes
532

Do you have to join on a key?

it looks like OBJECTCLAS is made up of MANDT + BUKRS + BELNR + GJAHR

so i could join that way

Read only

Former Member
0 Likes
532

Hi

I am brand new to this by the way, i am writing my first abap program so sorry if my questions are basic

Thanks for your help

Read only

0 Likes
532

> Hi

> I am brand new to this by the way, i am writing my

> first abap program so sorry if my questions are

> basic

>

> Thanks for your help

Don't worry, we are all here to learn -;)

Actually, you can do a JOIN like that....

TABLE1FIELD1 = TABLE2FIELD1 + TABLE2FIELD2 + TABLE2FIELD3

What you will need to do is gather data from each table and then use some LOOP and READ TABLE statements....

Greetings,

Blag.