best to set up a temp table... (note it is a permanent table in your solution, but data is only prepped for import from here)... call is SalesOrders
SalesOrder Header, and SalesOrder LineItem would be your normalised tables.
Import the Sales Order to the SalesOrder table.
Import the H to the Header table, and use an auto-enter key field, get the key value in a script.
Import the L records to the Line Items table, setup a header key field, and update it to the value from the header.