How to trace the "connected" item ledger entry

Situation: Standard item is being purchased and sold. No item tracking etc. used; Average Costing.

After the item is being shipped on a delivery note, a “sales related” item ledger entry is created (in addition to value entries). Now I would like to find out, on which item ledger entry it was purchased on.
Really simple: where does Navision store the connection between sales- and purchase related item ledgers?

The reason in this instance is that I purchase goods with a dimension value coming from the vendor card. When I enter the item on a sales order and ship it, that dimension (from which vendor I have purchased it) is obviously not entered, as the system does not know before posting from which open, positive item ledger entry it will deduct the quantity.

Thank you for any hints you may give.

Check table 339 Item Application Entry

Thanks Colin!

Great Stuff, that solves my problem. Markus.