Hi Mark -
As Jayasri mentioned, the MD_STOCK_REQUIREMENTS_LIST_API BAPI is the one to go with. I've attached an example Studio v11 version of a Direct-based script and excel. You will need to provide a number of D rows, more than you think might be needed, so that you don't end up missing any of the line items.
The one thing about this BAPI that won't be the most helpful is that you can only easily do this with one material number at a time, and I know that you have hundreds to do. If you wanted to do hundreds, then you would need to provide an H row for each material and a fixed number of D rows for each material number underneath, which makes it kind of painful to format the sheet. If you are handy with excel macros, you could create one that would populate the Ds for you.
Good luck!
Jennifer
------------------------------
Jennifer Hwang | SE
Winshuttle North America
------------------------------