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

Doubt on creating join between two tables

Former Member
0 Likes
711

Hi friends,

I have two tables , ekes and eine

my requirement is if Ekes-ebtyp = 'X1'.

then Ekes-ebtyp = EKES-EINDT + Eine-j_3alitra.

the doubt is there is no primary key common between this table . actually in my whole program for purchase order i used EBELN for extracting details when two tables are involved . in this two tables no two primary keys are common to extract data ...is there any ways please suggest..

the code i wrote is

loop at li_ekes assigning <fl_ekes>.

read table li_eine assigning <fl_eine> with table key (here i need to give some unique fields to join these two fields please guide me which field i can use.).

<fl_ekes>-ebtyp = <fl_ekes>-EINDT + <fl_eine>-j_3alitra.

4 REPLIES 4
Read only

Former Member
0 Likes
670

Hi

I believe you need to read EINA table for field LIFNR and MATNR of the Purchase Order to get the field INFNR and then read EINE with INFNR and EKORG and WERKS of Purchase Order.

Max

Read only

0 Likes
670

hello sir,

i am not reading EINA . i am using only EKPO,EKES,EKET,EKPO and EINE.

so that is why i am facing this problem please help me ..

Read only

0 Likes
670

Hi

Try to use EKPO-INFNR, here the system should have stored the record info.

Max

Read only

Former Member
0 Likes
670

Hi,

Both tables have field EBELN in common.

You can use it to extract data from both.

Hope this helps.

reward if helpful.

Regards,

Sipra