SD BAPI RFC Used the same way in S/4HANA

BAPI_SHIPMENT_CREATE Create Shipment

Creates a new shipment (VT01N) with header data, delivery items, stages, deadlines and handling units and returns the shipment number. It is used in interfaces that transfer plans from transportation planning systems or carrier portals into SAP. Pass mandatory header fields such as shipment type and transportation planning point in HEADERDATA, list the deliveries in ITEMDATA and call BAPI_TRANSACTION_COMMIT when there are no errors.

Function group
V56I_BAPI
Remote-enabled (RFC)
Yes
Type
BAPI

Importing parameters

ParameterTypeDescriptionRequired
HEADERDATABAPISHIPMENTHEADERShipment header dataYes

Exporting parameters

ParameterTypeDescription
TRANSPORTBAPISHIPMENTIDS-SHIPMENTNUMCreated shipment number
SHIPMENTGUIDBAPISHIPMENTIDS-GUIDShipment GUID

Tables parameters

ParameterTypeDescriptionRequired
HEADERDEADLINEBAPISHIPMENTHEADERDEADLINEHeader deadlines—
ITEMDATABAPISHIPMENTITEMShipment items (deliveries)—
STAGEDATABAPISHIPMENTSTAGEShipment stages—
STAGEDEADLINEBAPISHIPMENTSTAGEDEADLINEStage deadlines—
ITEMONSTAGEBAPISHIPMENTITEMONSTAGEItems on stage—
ADDRESSBAPISHIPMENTADDRESSAddresses—
HDUNHEADERBAPISHIPMENTHDUNHEADERHandling unit headers—
HDUNITEMBAPISHIPMENTHDUNITEMHandling unit items—
RETURNBAPIRET2Return messagesYes

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'BAPI_SHIPMENT_CREATE'
  EXPORTING
    headerdata = lv_headerdata
  IMPORTING
    transport = lv_transport
    shipmentguid = lv_shipmentguid
  TABLES
    headerdeadline = lt_headerdeadline
    itemdata = lt_itemdata
    stagedata = lt_stagedata
    stagedeadline = lt_stagedeadline
    itemonstage = lt_itemonstage
    address = lt_address
    hdunheader = lt_hdunheader
    hdunitem = lt_hdunitem
    return = lt_return.

Related tables

Solutions using this function

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report