To answer the first question - this is only possible when delivery is printed after the invoice has been created. Invoice number may be determined from the document flow (VBFA table, using VBRP won't be more efficient because you're looking for a consequent document) either in the output processing program or even in the form itself (I recommend the later if you're using a standard output program).
Delivery output will need to be set up to do NOT print immediately (either by a batch job or in a transaction, if you have small volume and want to do it manually). After the invoices have been created, deliveries may be printed. If you're using a background job to create invoices, it's very easy to add another step and run RSNAST00 for delivery output.