Multi company setup and material transfer


I want to have a multi-company setup, each with their own warehouses. Am I am to transfer material from company’s warehouse to another company’s warehouse?

Can someone tell me steps needed? Will I go through a delivery note? Shipping cost involved? How does the accounting work for that? Would it be a purchase order from one company and sales to another company? Is there a different way of doing that, cause that would require quite a bit of setup.