2007 Mar 22 4:26 PM
I realize that you can't do a select on an internal table but I need to do something identical to that. I need to replicate the following code:
SELECT * FROM it_detail INTO it_temp WHERE matnr = wa_detail-matnr.it_detail is of type ty_detail which joins field from three different tables. Right now it_detail holds information about many different material numbers with all material numbers being repeated. I am attempting to fill it_temp with all entries from it_detail that has the same material type. I did a search but I couldn't find anything that seemed to work in this situation.
Regards,
Davis.
2007 Mar 22 4:33 PM
I realize that you can't do a select on an internal table but I need to do something identical to that. I need to replicate the following code:
SELECT * FROM it_detail INTO it_temp WHERE matnr = wa_detail-matnr.it_detail is of type ty_detail which joins field from three different tables. Right now it_detail holds information about many different material numbers with all material numbers being repeated. I am attempting to fill it_temp with all entries from it_detail that has the same material type. I did a search but I couldn't find anything that seemed to work in this situation.
Regards,
Davis.
2007 Mar 22 4:33 PM
2007 Mar 22 4:48 PM
2007 Mar 22 4:34 PM
Hi,
You can use LOOP statement.
LOOP AT IT_DETAIL WHERE MATNR = WA_DETAIL-MATNR.
MOVE-CORRESPONDING IT_DETAIL TO IT_TEMP.
APPEND IT_TEMP.
ENDLOOP.
Regards,
Ferry Lianto