‎2008 Apr 09 4:35 PM
Hi,
I have an text table /bic/tmaterial and an internal table ITAB.
In a function module, i need to get the material numbers of /bic/tmaterial which are not present in ITAB-material(material is a field in internal table ITAB) and for those material no's i need to make an entry in the structure ZSTRUCTURE(which also contains a material no field).
Help me in the code to make the above functionality possible.
Please help as soon as possible
Thanks & Regards,
Pra
Edited by: Alvaro Tejada Galindo on Apr 9, 2008 12:08 PM
‎2008 Apr 09 5:08 PM
With out more information, this code will get you started.
DATA:
BEGIN OF mat_rec,
matnr TYPE matnr,
END OF mat_rec,
it_tab LIKE STANDARD TABLE OF mat_rec,
zsturcture LIKE STANDARD TABLE OF mat_rec,
it_file LIKE STANDARD TABLE OF mat_rec.
"" read your file into it_file.
zsturcture = it_tab.
LOOP AT it_file INTO mat_rec.
APPEND mat_rec TO zsturcture.
ENDLOOP.
SORT zsturcture.
DELETE ADJACENT DUPLICATES FROM zsturcture.