Matt is definitely right on this one, depending on the status of the document, it could either retrieve from SOP10100 or SOP30200. Although, I would like to add up additional essential point as related to how you may have an answer for any similar inquiry; GP Power tools is the answer, security profiler catches the associated tables for each screen in a neat and simple way, this will help you track down such issues when needed.
Here are the "associated tables" for the Sales Document Detail Inquiry zoom window:
Check it out on Dynamics GP Power tools Portal
Your feedback is highly appreciated,