SAP Function Modules

BAPI_OUTB_DELIVERY_SAVEREPLICA SAP Function module - BAPI Function Module for Replication of Outbound Deliveries







BAPI_OUTB_DELIVERY_SAVEREPLICA is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BAPI_OUTB_DELIVERY_SAVEREPLICA into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: V50I
Released Date: 22.06.1998
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_OUTB_DELIVERY_SAVEREPLICA - BAPI OUTB DELIVERY SAVEREPLICA





CALL FUNCTION 'BAPI_OUTB_DELIVERY_SAVEREPLICA' "BAPI Function Module for Replication of Outbound Deliveries
  EXPORTING
    header_data =               " bapiobdlvhdr  Header Data
    header_org =                " bapiobdlvhdrorg  Organizational Data Header
    sender_system =             " tbdls-logsys  Sender System
*   techn_control =             " bapidlvcontrol  Technical Control Data
*   header_data_spl =           " /spe/bapiobdlvhdr  Outbound Delivery Header Fields/Service Parts Logistics
  IMPORTING
    delivery =                  " likp-vbeln    Outbound Delivery Number
  TABLES
    header_partner =            " bapidlvpartner  Header Partners
*   header_partner_addr =       " bapiaddr1     Header Partner Addresses
    header_deadlines =          " bapidlvdeadln  Header Deadlines
    item_data =                 " bapiobdlvitem  Item Data
    item_org =                  " bapiobdlvitemorg  Organizational Data Item
*   item_stock_trans =          " bapidlvitemsttr  Stock Transfer Data - Item
*   item_coding_block =         " bapidlvcoblitem  Account Assignment Data Item
*   item_reference_order =      " bapiobdlvitemrfo  Order Reference Data Item
*   item_ref_purchase_order =   " bapidlvitemrpo  Purchase Order Reference Data Item
*   item_serial_no =            " bapidlvitmserno  BAPI Delivery Serial Numbers Item
*   text_header =               " bapidlvtxthdr  Text Header Data
*   text_lines =                " bapidlvtxtitem  Text Lines
*   handling_unit_header =      " bapidlvhdunhdr  Handling Unit Header Data
*   handling_unit_item =        " bapidlvhdunitm  Handling Unit Item Data
*   handling_unit_serno =       " bapidlvhdunserno  Handling Unit Serial Numbers
*   extension1 =                " bapiextc      Data Container (Unstructured)
*   extension2 =                " bapiext       Data Container (Structured)
    return =                    " bapiret2      Return Parameter(s)
*   tokenreference =            " bapitokenreference  Reference for CSL Token (CSL_TR_EXS)
*   item_data_spl =             " /spe/bapiobdlvitm  Outbound Delivery Item Fields/Service Parts Logisitics
*   batch_attributes =          " bapi3060_allocation  Classification: Object Description and Assignment
*   batch_values_char =         " bapi3060_valuation_char  Classification: Object Description and CHAR/BOOL Values
*   batch_values_curr =         " bapi3060_valuation_curr  Classification: Object Description and CURR Values
*   batch_values_num =          " bapi3060_valuation_num  Classification: Object Description and NUM Values
*   item_reference_wmd =        " bapiobdlvitemwmd  Reference of Delivery Item to Inbound Purchase Order Item
    .  "  BAPI_OUTB_DELIVERY_SAVEREPLICA

ABAP code example for Function Module BAPI_OUTB_DELIVERY_SAVEREPLICA





The ABAP code below is a full code listing to execute function module BAPI_OUTB_DELIVERY_SAVEREPLICA including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_delivery  TYPE LIKP-VBELN ,
it_header_partner  TYPE STANDARD TABLE OF BAPIDLVPARTNER,"TABLES PARAM
wa_header_partner  LIKE LINE OF it_header_partner ,
it_header_partner_addr  TYPE STANDARD TABLE OF BAPIADDR1,"TABLES PARAM
wa_header_partner_addr  LIKE LINE OF it_header_partner_addr ,
it_header_deadlines  TYPE STANDARD TABLE OF BAPIDLVDEADLN,"TABLES PARAM
wa_header_deadlines  LIKE LINE OF it_header_deadlines ,
it_item_data  TYPE STANDARD TABLE OF BAPIOBDLVITEM,"TABLES PARAM
wa_item_data  LIKE LINE OF it_item_data ,
it_item_org  TYPE STANDARD TABLE OF BAPIOBDLVITEMORG,"TABLES PARAM
wa_item_org  LIKE LINE OF it_item_org ,
it_item_stock_trans  TYPE STANDARD TABLE OF BAPIDLVITEMSTTR,"TABLES PARAM
wa_item_stock_trans  LIKE LINE OF it_item_stock_trans ,
it_item_coding_block  TYPE STANDARD TABLE OF BAPIDLVCOBLITEM,"TABLES PARAM
wa_item_coding_block  LIKE LINE OF it_item_coding_block ,
it_item_reference_order  TYPE STANDARD TABLE OF BAPIOBDLVITEMRFO,"TABLES PARAM
wa_item_reference_order  LIKE LINE OF it_item_reference_order ,
it_item_ref_purchase_order  TYPE STANDARD TABLE OF BAPIDLVITEMRPO,"TABLES PARAM
wa_item_ref_purchase_order  LIKE LINE OF it_item_ref_purchase_order ,
it_item_serial_no  TYPE STANDARD TABLE OF BAPIDLVITMSERNO,"TABLES PARAM
wa_item_serial_no  LIKE LINE OF it_item_serial_no ,
it_text_header  TYPE STANDARD TABLE OF BAPIDLVTXTHDR,"TABLES PARAM
wa_text_header  LIKE LINE OF it_text_header ,
it_text_lines  TYPE STANDARD TABLE OF BAPIDLVTXTITEM,"TABLES PARAM
wa_text_lines  LIKE LINE OF it_text_lines ,
it_handling_unit_header  TYPE STANDARD TABLE OF BAPIDLVHDUNHDR,"TABLES PARAM
wa_handling_unit_header  LIKE LINE OF it_handling_unit_header ,
it_handling_unit_item  TYPE STANDARD TABLE OF BAPIDLVHDUNITM,"TABLES PARAM
wa_handling_unit_item  LIKE LINE OF it_handling_unit_item ,
it_handling_unit_serno  TYPE STANDARD TABLE OF BAPIDLVHDUNSERNO,"TABLES PARAM
wa_handling_unit_serno  LIKE LINE OF it_handling_unit_serno ,
it_extension1  TYPE STANDARD TABLE OF BAPIEXTC,"TABLES PARAM
wa_extension1  LIKE LINE OF it_extension1 ,
it_extension2  TYPE STANDARD TABLE OF BAPIEXT,"TABLES PARAM
wa_extension2  LIKE LINE OF it_extension2 ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_tokenreference  TYPE STANDARD TABLE OF BAPITOKENREFERENCE,"TABLES PARAM
wa_tokenreference  LIKE LINE OF it_tokenreference ,
it_item_data_spl  TYPE STANDARD TABLE OF /SPE/BAPIOBDLVITM,"TABLES PARAM
wa_item_data_spl  LIKE LINE OF it_item_data_spl ,
it_batch_attributes  TYPE STANDARD TABLE OF BAPI3060_ALLOCATION,"TABLES PARAM
wa_batch_attributes  LIKE LINE OF it_batch_attributes ,
it_batch_values_char  TYPE STANDARD TABLE OF BAPI3060_VALUATION_CHAR,"TABLES PARAM
wa_batch_values_char  LIKE LINE OF it_batch_values_char ,
it_batch_values_curr  TYPE STANDARD TABLE OF BAPI3060_VALUATION_CURR,"TABLES PARAM
wa_batch_values_curr  LIKE LINE OF it_batch_values_curr ,
it_batch_values_num  TYPE STANDARD TABLE OF BAPI3060_VALUATION_NUM,"TABLES PARAM
wa_batch_values_num  LIKE LINE OF it_batch_values_num ,
it_item_reference_wmd  TYPE STANDARD TABLE OF BAPIOBDLVITEMWMD,"TABLES PARAM
wa_item_reference_wmd  LIKE LINE OF it_item_reference_wmd .

DATA(ld_header_data) = 'Check type of data required'.
DATA(ld_header_org) = 'Check type of data required'.

SELECT single LOGSYS
FROM TBDLS
INTO @DATA(ld_sender_system).

DATA(ld_techn_control) = 'Check type of data required'.
DATA(ld_header_data_spl) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_header_partner to it_header_partner.

"populate fields of struture and append to itab
append wa_header_partner_addr to it_header_partner_addr.

"populate fields of struture and append to itab
append wa_header_deadlines to it_header_deadlines.

"populate fields of struture and append to itab
append wa_item_data to it_item_data.

"populate fields of struture and append to itab
append wa_item_org to it_item_org.

"populate fields of struture and append to itab
append wa_item_stock_trans to it_item_stock_trans.

"populate fields of struture and append to itab
append wa_item_coding_block to it_item_coding_block.

"populate fields of struture and append to itab
append wa_item_reference_order to it_item_reference_order.

"populate fields of struture and append to itab
append wa_item_ref_purchase_order to it_item_ref_purchase_order.

"populate fields of struture and append to itab
append wa_item_serial_no to it_item_serial_no.

"populate fields of struture and append to itab
append wa_text_header to it_text_header.

"populate fields of struture and append to itab
append wa_text_lines to it_text_lines.

"populate fields of struture and append to itab
append wa_handling_unit_header to it_handling_unit_header.

"populate fields of struture and append to itab
append wa_handling_unit_item to it_handling_unit_item.

"populate fields of struture and append to itab
append wa_handling_unit_serno to it_handling_unit_serno.

"populate fields of struture and append to itab
append wa_extension1 to it_extension1.

"populate fields of struture and append to itab
append wa_extension2 to it_extension2.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_tokenreference to it_tokenreference.

"populate fields of struture and append to itab
append wa_item_data_spl to it_item_data_spl.

"populate fields of struture and append to itab
append wa_batch_attributes to it_batch_attributes.

"populate fields of struture and append to itab
append wa_batch_values_char to it_batch_values_char.

"populate fields of struture and append to itab
append wa_batch_values_curr to it_batch_values_curr.

"populate fields of struture and append to itab
append wa_batch_values_num to it_batch_values_num.

"populate fields of struture and append to itab
append wa_item_reference_wmd to it_item_reference_wmd. . CALL FUNCTION 'BAPI_OUTB_DELIVERY_SAVEREPLICA' EXPORTING header_data = ld_header_data header_org = ld_header_org sender_system = ld_sender_system * techn_control = ld_techn_control * header_data_spl = ld_header_data_spl IMPORTING delivery = ld_delivery TABLES header_partner = it_header_partner * header_partner_addr = it_header_partner_addr header_deadlines = it_header_deadlines item_data = it_item_data item_org = it_item_org * item_stock_trans = it_item_stock_trans * item_coding_block = it_item_coding_block * item_reference_order = it_item_reference_order * item_ref_purchase_order = it_item_ref_purchase_order * item_serial_no = it_item_serial_no * text_header = it_text_header * text_lines = it_text_lines * handling_unit_header = it_handling_unit_header * handling_unit_item = it_handling_unit_item * handling_unit_serno = it_handling_unit_serno * extension1 = it_extension1 * extension2 = it_extension2 return = it_return * tokenreference = it_tokenreference * item_data_spl = it_item_data_spl * batch_attributes = it_batch_attributes * batch_values_char = it_batch_values_char * batch_values_curr = it_batch_values_curr * batch_values_num = it_batch_values_num * item_reference_wmd = it_item_reference_wmd . " BAPI_OUTB_DELIVERY_SAVEREPLICA
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_delivery  TYPE LIKP-VBELN ,
ld_header_data  TYPE BAPIOBDLVHDR ,
it_header_partner  TYPE STANDARD TABLE OF BAPIDLVPARTNER ,
wa_header_partner  LIKE LINE OF it_header_partner,
ld_header_org  TYPE BAPIOBDLVHDRORG ,
it_header_partner_addr  TYPE STANDARD TABLE OF BAPIADDR1 ,
wa_header_partner_addr  LIKE LINE OF it_header_partner_addr,
ld_sender_system  TYPE TBDLS-LOGSYS ,
it_header_deadlines  TYPE STANDARD TABLE OF BAPIDLVDEADLN ,
wa_header_deadlines  LIKE LINE OF it_header_deadlines,
ld_techn_control  TYPE BAPIDLVCONTROL ,
it_item_data  TYPE STANDARD TABLE OF BAPIOBDLVITEM ,
wa_item_data  LIKE LINE OF it_item_data,
ld_header_data_spl  TYPE /SPE/BAPIOBDLVHDR ,
it_item_org  TYPE STANDARD TABLE OF BAPIOBDLVITEMORG ,
wa_item_org  LIKE LINE OF it_item_org,
it_item_stock_trans  TYPE STANDARD TABLE OF BAPIDLVITEMSTTR ,
wa_item_stock_trans  LIKE LINE OF it_item_stock_trans,
it_item_coding_block  TYPE STANDARD TABLE OF BAPIDLVCOBLITEM ,
wa_item_coding_block  LIKE LINE OF it_item_coding_block,
it_item_reference_order  TYPE STANDARD TABLE OF BAPIOBDLVITEMRFO ,
wa_item_reference_order  LIKE LINE OF it_item_reference_order,
it_item_ref_purchase_order  TYPE STANDARD TABLE OF BAPIDLVITEMRPO ,
wa_item_ref_purchase_order  LIKE LINE OF it_item_ref_purchase_order,
it_item_serial_no  TYPE STANDARD TABLE OF BAPIDLVITMSERNO ,
wa_item_serial_no  LIKE LINE OF it_item_serial_no,
it_text_header  TYPE STANDARD TABLE OF BAPIDLVTXTHDR ,
wa_text_header  LIKE LINE OF it_text_header,
it_text_lines  TYPE STANDARD TABLE OF BAPIDLVTXTITEM ,
wa_text_lines  LIKE LINE OF it_text_lines,
it_handling_unit_header  TYPE STANDARD TABLE OF BAPIDLVHDUNHDR ,
wa_handling_unit_header  LIKE LINE OF it_handling_unit_header,
it_handling_unit_item  TYPE STANDARD TABLE OF BAPIDLVHDUNITM ,
wa_handling_unit_item  LIKE LINE OF it_handling_unit_item,
it_handling_unit_serno  TYPE STANDARD TABLE OF BAPIDLVHDUNSERNO ,
wa_handling_unit_serno  LIKE LINE OF it_handling_unit_serno,
it_extension1  TYPE STANDARD TABLE OF BAPIEXTC ,
wa_extension1  LIKE LINE OF it_extension1,
it_extension2  TYPE STANDARD TABLE OF BAPIEXT ,
wa_extension2  LIKE LINE OF it_extension2,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return,
it_tokenreference  TYPE STANDARD TABLE OF BAPITOKENREFERENCE ,
wa_tokenreference  LIKE LINE OF it_tokenreference,
it_item_data_spl  TYPE STANDARD TABLE OF /SPE/BAPIOBDLVITM ,
wa_item_data_spl  LIKE LINE OF it_item_data_spl,
it_batch_attributes  TYPE STANDARD TABLE OF BAPI3060_ALLOCATION ,
wa_batch_attributes  LIKE LINE OF it_batch_attributes,
it_batch_values_char  TYPE STANDARD TABLE OF BAPI3060_VALUATION_CHAR ,
wa_batch_values_char  LIKE LINE OF it_batch_values_char,
it_batch_values_curr  TYPE STANDARD TABLE OF BAPI3060_VALUATION_CURR ,
wa_batch_values_curr  LIKE LINE OF it_batch_values_curr,
it_batch_values_num  TYPE STANDARD TABLE OF BAPI3060_VALUATION_NUM ,
wa_batch_values_num  LIKE LINE OF it_batch_values_num,
it_item_reference_wmd  TYPE STANDARD TABLE OF BAPIOBDLVITEMWMD ,
wa_item_reference_wmd  LIKE LINE OF it_item_reference_wmd.

ld_header_data = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_header_partner to it_header_partner.
ld_header_org = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_header_partner_addr to it_header_partner_addr.

SELECT single LOGSYS
FROM TBDLS
INTO ld_sender_system.


"populate fields of struture and append to itab
append wa_header_deadlines to it_header_deadlines.
ld_techn_control = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_item_data to it_item_data.
ld_header_data_spl = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_item_org to it_item_org.

"populate fields of struture and append to itab
append wa_item_stock_trans to it_item_stock_trans.

"populate fields of struture and append to itab
append wa_item_coding_block to it_item_coding_block.

"populate fields of struture and append to itab
append wa_item_reference_order to it_item_reference_order.

"populate fields of struture and append to itab
append wa_item_ref_purchase_order to it_item_ref_purchase_order.

"populate fields of struture and append to itab
append wa_item_serial_no to it_item_serial_no.

"populate fields of struture and append to itab
append wa_text_header to it_text_header.

"populate fields of struture and append to itab
append wa_text_lines to it_text_lines.

"populate fields of struture and append to itab
append wa_handling_unit_header to it_handling_unit_header.

"populate fields of struture and append to itab
append wa_handling_unit_item to it_handling_unit_item.

"populate fields of struture and append to itab
append wa_handling_unit_serno to it_handling_unit_serno.

"populate fields of struture and append to itab
append wa_extension1 to it_extension1.

"populate fields of struture and append to itab
append wa_extension2 to it_extension2.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_tokenreference to it_tokenreference.

"populate fields of struture and append to itab
append wa_item_data_spl to it_item_data_spl.

"populate fields of struture and append to itab
append wa_batch_attributes to it_batch_attributes.

"populate fields of struture and append to itab
append wa_batch_values_char to it_batch_values_char.

"populate fields of struture and append to itab
append wa_batch_values_curr to it_batch_values_curr.

"populate fields of struture and append to itab
append wa_batch_values_num to it_batch_values_num.

"populate fields of struture and append to itab
append wa_item_reference_wmd to it_item_reference_wmd.

SAP Documentation for FM BAPI_OUTB_DELIVERY_SAVEREPLICA


You can use this method to distribute outbound deliveries from an ERP system to a WM system. ...See here for full SAP fm documentation

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_OUTB_DELIVERY_SAVEREPLICA or its description.