Recently.I have completed a interface in which I used the same bapi as well . It works well, it is scheduled as a job in background.
below lines is the source code.may it will help you.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATE_SLS'
EXPORTING
SHIP_POINT = L_WK_SPPT
DUE_DATE = SY-DATUM
IMPORTING
DELIVERY = L_WK_DELNO
TABLES
SALES_ORDER_ITEMS = L_IT_SONO
RETURN = L_IT_RETURN.