Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_OUTB_DELIVERY_CREATE_STO

Former Member
0 Likes
564

Can any one help me with peice of code to create a outbound delivery from PO .

Please help me with the feilds in the tables parameter that needs to be passed and any valuable inputs will be of help

Can any one help me with peice of code to create a outbound delivery from PO .

Please help me with the feilds in the tables parameter that needs to be passed and any valuable inputs will be of help

1 REPLY 1
Read only

Former Member
0 Likes
440

Hi,

Hope this will help you

DATA: it_stock_trans_items TYPE TABLE OF bapidlvreftosto,
           wa_stock_trans_items TYPE bapidlvreftosto.

  wa_stock_trans_items-ref_doc = exppurchaseorder. " pass the PO number
  APPEND wa_stock_trans_items TO it_stock_trans_items.
  CLEAR wa_stock_trans_items.

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATE_STO'
    IMPORTING
      delivery          = delivery
    TABLES
      stock_trans_items = it_stock_trans_items
      return            = return2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait   = 'X'
      IMPORTING
        return = wa_return2_commit.

Regards,

Aditya

Edited by: aditya on Feb 2, 2010 6:34 PM