Hi,
I am using the BAPI : BAPI_OUTB_DELIVERY_CREATE_STO to create the Delivery Note(DN) from stock transfer order(STO)
The DN is getting created successfully but while doing the Post goods issue (PGI) it is showing error "Maintain the Material Handling type".
I am just passing the PO number to BAPI for creating the DN.
What other details I need to pass to BAPI to get the material handling type from PO?
or Is there any other BAPI available to create the DN without the error?
following Code
ls_stock_trans_items-ref_doc = l_po_number. " STO Number (PO Number)
APPEND ls_stock_trans_items TO lt_stock_trans_items.
CLEAR ls_stock_trans_items.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATE_STO'
* EXPORTING
* IMPORTING
TABLES
stock_trans_items = lt_stock_trans_items.
* SERIAL_NUMBERS =
* EXTENSION_IN =
* DELIVERIES =
* CREATED_ITEMS =
* EXTENSION_OUT =
* RETURN =
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.