I'm not familiar with your data model, but what I understand is that you have a list of material numbers and for each one of those you want to retrieve the most current billing item.
From your statement that by ordering the data by the BILL_DATE and DATE_TO (both in descending order) and taking on the first result record, you already specified that you're interesting in the maximum values for both items.
So why not have a sub query, that computes these MAX values and apply the result as a filter?
Also: why would you want to use an internal table here? Why the detour through ABAP? Don't you have the list of new items on DB level?