‎2008 Jan 16 12:53 PM
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
‎2008 Jan 16 12:56 PM
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
‎2008 Jan 16 12:55 PM
Hi,
You can not use Select Query on Internal tables.
Regards,
Satish
‎2008 Jan 16 1:25 PM
ok thx
is it possible to bind two internal tables together?
when yes how can i do this.
regards,
tobias
‎2008 Jan 16 1:33 PM
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
‎2008 Jan 16 1:37 PM
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.
‎2008 Jan 16 12:56 PM
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