Retreiving field from EKKO, EKPO , EKET
Condition EKKO-IHREZ = "XXX" AND EKKO-BEDAT = "DATE"
select xxx from EKKO INTO i_EKKO. key EKKO-IHREZ = "XXX" AND EKKO-BEDAT = "DATE" Select xxx xxx from EKPO into i_EKPO for all entries in i_EKKO key EBELN Select xxx xxx xxx from EKET into i_EKEP for all entries in i_EKET KEY EBELN and EBELP
Please advise whether inner join can be done with 3 table
So here your first table contains only contents of EKKO, EKPO and second table contains contents of EKET..
So there is no common table for these all...
Thats what i mentioned above decalre on final internal table if neccessary with all these three table fields...
and then pass itab1, itab2 to final internal table...like..
loop at itab1 into wa1. <---contents of EKKO,EKPO waf-filed1 = wa1-filed1 read table itab2 into wa2 with key f1 = wa1-f1. <----Contents of EKET if sy-subrc = 0. waf-field2 = wa2-field2. endif. append waf to final internal tabel. clear waf. endloop.
There is no other better way in this case... to have all contents in one table..