Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_OUTB_DELIVERY_CREATE_SLS commit

I use this bapi to do the delivery. The bapi create the objet (delivery) but the commit work don't commit: the report return the number of delivery but it doesn't exist on database (LIKP).

The code is:

call function 'BAPI_OUTB_DELIVERY_CREATE_SLS'

DESTINATION logsys

  • EXPORTING

  • SHIP_POINT = 'MD01'

  • DUE_DATE = sy-datum

  • DEBUG_FLG = 'X'

importing

delivery = lf_vbeln

num_deliveries = lf_num

tables

sales_order_items = lt_order

extension_in = lt_extin

deliveries = lt_deli

created_items = lt_itm

extension_out = lt_extout

return = lt_return

.

write: / 'Delivery:', lf_vbeln,

/ 'NumDeliveries:', lf_num,

/ 'Deliveries:'.

loop at lt_deli into ls_deli.

write ls_deli-deliv_numb.

endloop.

if not lt_itm[] is initial.

write: / 'CreatedItems:'.

loop at lt_itm into ls_itm.

write: / ls_itm-ref_doc,

ls_itm-ref_item,

ls_itm-deliv_numb,

ls_itm-deliv_item,

ls_itm-material,

ls_itm-dlv_qty,

ls_itm-sales_unit,

ls_itm-sales_unit_iso.

endloop.

endif.

if not lt_return[] is initial.

write: / 'Return:'.

loop at lt_return into ls_ret.

write: / ls_ret-type, ls_ret-id, ls_ret-number,

ls_ret-message,

/.

endloop.

endif.

if not lt_extout[] is initial.

write: / 'ExtensionOut:'.

loop at lt_extout into ls_ext.

write: / ls_ext.

endloop.

endif.

if not lf_vbeln is initial.

commit work.

endif.

Someone can help me?

Thanks

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question