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

Help required

Former Member
0 Likes
549

Hi all

i have 6 tables from where i need to fetch data.

ekorg from ekko, mtart and meins from mara, like wise 2 fields from mbew, 2 fields from s012, 4 fields from ekpo, one field from ausp.

how can i write a select statement in this case?

can anyone pls help me?

thanks in advance

4 REPLIES 4
Read only

Former Member
0 Likes
519

Hi,

Join the EKKO,EKPO, MARA and MBEW tables and get the data into a single Int Table.

And for all entries of this table fetch the char.values from table AUSP.

Put the complete data into a single int table and display.

Regards,

Anji

Read only

Former Member
0 Likes
519

Hi,

U can join ekko and ekpo

Select a~ekorg b~field1 b~field2 b~field3 b~field4
           FROM EKKO as a inner join
           EKPO as b 
           ON a~ebeln = b~ebeln
           INTO TABLE i_ekk
           WHERE a~ebeln IN s_xx (if any selection para).

Select a~mtart a~meins b~filed1 b~field2
          FROM mara as a inner join 
          mbew as b
          ON a~matnr = b~matnr
          INTO TABLE i_mar
          WHERE a~matnr IN s_XXX.

if sy-subrc = 0.
Select f1 f2 FROM so12
              INTO TABLE i_so12
              FOR ALL ENTRIES IN i_mar
              WHERE matnr = i_mar-matnr.
endif.

select f1 from ausp into table i_ausp
             Where .....

Read only

0 Likes
519

hi judith

thanks a lot for all

thanks again

Read only

0 Likes
519

Hi,

Close the thread if ur problem got solved. Revert back if u have any clarification.