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

select over internal table

Former Member
0 Likes
808

Hi,

is it possible to make a select over an itab?

i get an itab from the FM 'fkk_open_item_select_with_date' and i want to use this table in the where conditions in my select over the dfkkop or can i just use my itab TYPE TABLE OF fkkop_copy WITH HEADER LINE to make the select?

regards,

tobias

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
596

Hello,

Make u of the FOR ALL ENTRIES in Select statement.

Try like this:

if not itab[] is initial.

SELECT * from MARA inot itab1 for all entries in itab

where matnr eq itab-matnr.

endif.

Cheers,

Vasanth

5 REPLIES 5
Read only

Former Member
0 Likes
596

Hi,

You can not use Select Query on Internal tables.

Regards,

Satish

Read only

0 Likes
596

ok thx

is it possible to bind two internal tables together?

when yes how can i do this.

regards,

tobias

Read only

0 Likes
596

Yes, you can merge 2 internal tables based on some common field.

Example: itab1& itab2 has common field f1.

Loop at itab1 into wa1.

read table itab2 into wa2 with key f1 = wa1-f1.

if sy-subrc = 0.

move: wa1-f1 to wa3-f1,

wa2-f2 to wa3-f2,

.....

.....

append wa3 to itab3.

clear wa3.

endloop.

Now you will have both internal tables data in one internal table itab3.

Regards,

Satish

Read only

0 Likes
596

Hi,

You want to bind the two tables means exactly what do you want?

Do you want to append one int. table into other

or do you want to get all records into one internal table.

E.g. If you have int.tab i_mara for material

i_makt for material Desc

i_cust for Customer Record

and now you want to bind these all int. table into one,

then take another int. table i_final with filelds from all above three int. tables and now move wa_mara to corresponding fields of wa_final

and so on for remaining and append your final internal table.

I hope this will solve your doubt,

Do reward,

Madhura N.

Read only

Former Member
0 Likes
597

Hello,

Make u of the FOR ALL ENTRIES in Select statement.

Try like this:

if not itab[] is initial.

SELECT * from MARA inot itab1 for all entries in itab

where matnr eq itab-matnr.

endif.

Cheers,

Vasanth