Dear Hector,
You may try to use the function module GN_DELIVERY_CREATE and fill up the whole XKOMDLGN table for a correct delivery.
To create a inbound delivery without dialog, you could try using the EDI inbound processing with IDOC DELVRY03.
Regards,
ian Wong Loke Foong