SAP RFC_UNIFIED_SHIPMENT_INTERFACE Function Module for UNIFIED SHIPMENT INTERFACE
RFC_UNIFIED_SHIPMENT_INTERFACE is a standard rfc unified shipment interface SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for UNIFIED SHIPMENT INTERFACE processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for rfc unified shipment interface FM, simply by entering the name RFC_UNIFIED_SHIPMENT_INTERFACE into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIKE
Program Name: SAPLOIKE
Main Program: SAPLOIKE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function RFC_UNIFIED_SHIPMENT_INTERFACE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'RFC_UNIFIED_SHIPMENT_INTERFACE'"UNIFIED SHIPMENT INTERFACE.
EXPORTING
I_SHIPMENT = "IS-Oil Shipmnet header segment
I_APPLIC = "IS-OIL application index ( 1 TAS, 2 TPI, 3 DCP )
IMPORTING
RETURN = "Return parameter
TABLES
* SHIPMENT_VEHICLE = "TPI/DCP: Shipment specific vehicle data
* COMPARTMENTS = "TPI: TD compartment
* ITEM_POSITION = "TPI/DCP: Shipment item position
* ITEM_TANKS = "TPI/DCP: storage objekt segment for item storage objekt assignment
* SHP_PARTNER = "TPI: E1OILSA Segment with additional field for Vehicle
* SHP_MATERIAL = "TPI: Material in Shipment
* F_ASSIGNMENT = "TPI: TD-F Assignment of document quantities from OIGFIIQ
* SHP_QUANTITY = "TPI: Quantity per material/vehicle in shipment
* LOAD_DATA = "TAS: Loading related data from depot
* LOAD_AUOM = "TAS: Loading related data from depot - additional uom
* SHP_LOAD_DATA = "TAS: Loading related data from depot - shipment data
* SHIPMENT_DRIVER = "TPI: Shipment driver
* SHP_LOAD_AUOM = "TAS: Shipment data from depot - additional uom
* SHIPMENT_ITEM = "TPI/DCP: Shipment item data
* SHIPMENT_EVENTS = "TPI/DCP: Shipment events
* EVENT_TEXT = "TPI/DCP: Shipment event text lines
* SHIPMENT_STAGES = "TPI/DCP: TD Shipment stages
* STAGES_ASSIGN = "TPI/DCP: Shipment assignment of doc items to stages
* QUANTITY_ITEM = "TPI: Shipment item from OIGSVMQ, OIGSVMQM, OIGSVMQO1
* ITEM_AUOM = "DCP: Additional quantities in alternative UOMs
EXCEPTIONS
ISO2SAP = 1 ERROR_POSTING_TPI_IDOC = 10 ERROR_PROCESSING_TAS_IDOC = 11 ERROR_PROCESSING_TPI_IDOC = 12 MODBAPI = 2 NOSHNUM = 3 EAN2SAP = 4 NOEVENT = 5 NOUPDATE = 6 DCPLOCK = 7 DCPSTAT = 8 ERROR_POSTING_TAS_IDOC = 9
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLOIKE_100 User exit Unified Shipment Interface (USI) - Scheduling Data IDOC
EXIT_SAPLOIKE_110 User exit Unified Shipment Interface (USI) - Loading Data IDOC
IMPORTING Parameters details for RFC_UNIFIED_SHIPMENT_INTERFACE
I_SHIPMENT - IS-Oil Shipmnet header segment
Data type: BAPI_OIGSOptional: No
Call by Reference: No ( called with pass by value option)
I_APPLIC - IS-OIL application index ( 1 TAS, 2 TPI, 3 DCP )
Data type: OIK_APPLICOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RFC_UNIFIED_SHIPMENT_INTERFACE
RETURN - Return parameter
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RFC_UNIFIED_SHIPMENT_INTERFACE
SHIPMENT_VEHICLE - TPI/DCP: Shipment specific vehicle data
Data type: BAPI_OIGSVOptional: Yes
Call by Reference: No ( called with pass by value option)
COMPARTMENTS - TPI: TD compartment
Data type: BAPI_OIGCCOptional: Yes
Call by Reference: No ( called with pass by value option)
ITEM_POSITION - TPI/DCP: Shipment item position
Data type: BAPI_OIGSIIOptional: Yes
Call by Reference: No ( called with pass by value option)
ITEM_TANKS - TPI/DCP: storage objekt segment for item storage objekt assignment
Data type: BAPI_TANKOptional: Yes
Call by Reference: No ( called with pass by value option)
SHP_PARTNER - TPI: E1OILSA Segment with additional field for Vehicle
Data type: BAPI_SHP_PARTNEROptional: Yes
Call by Reference: No ( called with pass by value option)
SHP_MATERIAL - TPI: Material in Shipment
Data type: BAPI_SHP_MATERIALOptional: Yes
Call by Reference: No ( called with pass by value option)
F_ASSIGNMENT - TPI: TD-F Assignment of document quantities from OIGFIIQ
Data type: BAPI_F_ASSIGNMENTOptional: Yes
Call by Reference: No ( called with pass by value option)
SHP_QUANTITY - TPI: Quantity per material/vehicle in shipment
Data type: BAPI_SHP_QUANTITYOptional: Yes
Call by Reference: No ( called with pass by value option)
LOAD_DATA - TAS: Loading related data from depot
Data type: BAPI_OIKLDDOptional: Yes
Call by Reference: No ( called with pass by value option)
LOAD_AUOM - TAS: Loading related data from depot - additional uom
Data type: BAPI_OIKLD_AUOMOptional: Yes
Call by Reference: No ( called with pass by value option)
SHP_LOAD_DATA - TAS: Loading related data from depot - shipment data
Data type: BAPI_OIKSHLOptional: Yes
Call by Reference: No ( called with pass by value option)
SHIPMENT_DRIVER - TPI: Shipment driver
Data type: BAPI_OIGSDVOptional: Yes
Call by Reference: No ( called with pass by value option)
SHP_LOAD_AUOM - TAS: Shipment data from depot - additional uom
Data type: BAPI_OIKSHL_AUOMOptional: Yes
Call by Reference: No ( called with pass by value option)
SHIPMENT_ITEM - TPI/DCP: Shipment item data
Data type: BAPI_OIGSIOptional: Yes
Call by Reference: No ( called with pass by value option)
SHIPMENT_EVENTS - TPI/DCP: Shipment events
Data type: BAPI_OIGSEOptional: Yes
Call by Reference: No ( called with pass by value option)
EVENT_TEXT - TPI/DCP: Shipment event text lines
Data type: BAPI_OIGSETOptional: Yes
Call by Reference: No ( called with pass by value option)
SHIPMENT_STAGES - TPI/DCP: TD Shipment stages
Data type: BAPI_OIGSSOptional: Yes
Call by Reference: No ( called with pass by value option)
STAGES_ASSIGN - TPI/DCP: Shipment assignment of doc items to stages
Data type: BAPI_OIGSVIISOptional: Yes
Call by Reference: No ( called with pass by value option)
QUANTITY_ITEM - TPI: Shipment item from OIGSVMQ, OIGSVMQM, OIGSVMQO1
Data type: BAPI_OIGSVMQOptional: Yes
Call by Reference: No ( called with pass by value option)
ITEM_AUOM - DCP: Additional quantities in alternative UOMs
Data type: BAPI_AUOMOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ISO2SAP - UoM conversion from ISO to SAP not possible
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_POSTING_TPI_IDOC - Error Posting TPI IDoc
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_PROCESSING_TAS_IDOC - Error Processing TAS IDoc
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_PROCESSING_TPI_IDOC - Error Processing TPI IDoc
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MODBAPI - Changes to BAPI data not allowed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOSHNUM - Shipment number missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EAN2SAP - Material conversion from EAN to SAP not possible
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOEVENT - Trigger of BP Event not possible
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOUPDATE - Update of delivery confirmation table not possible
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DCPLOCK - DCP data currently locked
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DCPSTAT - Changes to BAPI data not allowed wrong status
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_POSTING_TAS_IDOC - Error Posting TAS IDoc
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RFC_UNIFIED_SHIPMENT_INTERFACE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_return | TYPE BAPIRET2, " | |||
| lv_iso2sap | TYPE BAPIRET2, " | |||
| lv_i_shipment | TYPE BAPI_OIGS, " | |||
| lt_shipment_vehicle | TYPE STANDARD TABLE OF BAPI_OIGSV, " | |||
| lt_compartments | TYPE STANDARD TABLE OF BAPI_OIGCC, " | |||
| lv_error_posting_tpi_idoc | TYPE BAPI_OIGCC, " | |||
| lt_item_position | TYPE STANDARD TABLE OF BAPI_OIGSII, " | |||
| lv_error_processing_tas_idoc | TYPE BAPI_OIGSII, " | |||
| lt_item_tanks | TYPE STANDARD TABLE OF BAPI_TANK, " | |||
| lv_error_processing_tpi_idoc | TYPE BAPI_TANK, " | |||
| lt_shp_partner | TYPE STANDARD TABLE OF BAPI_SHP_PARTNER, " | |||
| lt_shp_material | TYPE STANDARD TABLE OF BAPI_SHP_MATERIAL, " | |||
| lt_f_assignment | TYPE STANDARD TABLE OF BAPI_F_ASSIGNMENT, " | |||
| lt_shp_quantity | TYPE STANDARD TABLE OF BAPI_SHP_QUANTITY, " | |||
| lt_load_data | TYPE STANDARD TABLE OF BAPI_OIKLDD, " | |||
| lt_load_auom | TYPE STANDARD TABLE OF BAPI_OIKLD_AUOM, " | |||
| lt_shp_load_data | TYPE STANDARD TABLE OF BAPI_OIKSHL, " | |||
| lv_modbapi | TYPE BAPI_OIKSHL, " | |||
| lv_i_applic | TYPE OIK_APPLIC, " | |||
| lt_shipment_driver | TYPE STANDARD TABLE OF BAPI_OIGSDV, " | |||
| lt_shp_load_auom | TYPE STANDARD TABLE OF BAPI_OIKSHL_AUOM, " | |||
| lv_noshnum | TYPE BAPI_OIKSHL_AUOM, " | |||
| lt_shipment_item | TYPE STANDARD TABLE OF BAPI_OIGSI, " | |||
| lv_ean2sap | TYPE BAPI_OIGSI, " | |||
| lt_shipment_events | TYPE STANDARD TABLE OF BAPI_OIGSE, " | |||
| lv_noevent | TYPE BAPI_OIGSE, " | |||
| lt_event_text | TYPE STANDARD TABLE OF BAPI_OIGSET, " | |||
| lv_noupdate | TYPE BAPI_OIGSET, " | |||
| lt_shipment_stages | TYPE STANDARD TABLE OF BAPI_OIGSS, " | |||
| lv_dcplock | TYPE BAPI_OIGSS, " | |||
| lt_stages_assign | TYPE STANDARD TABLE OF BAPI_OIGSVIIS, " | |||
| lv_dcpstat | TYPE BAPI_OIGSVIIS, " | |||
| lt_quantity_item | TYPE STANDARD TABLE OF BAPI_OIGSVMQ, " | |||
| lt_item_auom | TYPE STANDARD TABLE OF BAPI_AUOM, " | |||
| lv_error_posting_tas_idoc | TYPE BAPI_AUOM. " |
|   CALL FUNCTION 'RFC_UNIFIED_SHIPMENT_INTERFACE' "UNIFIED SHIPMENT INTERFACE |
| EXPORTING | ||
| I_SHIPMENT | = lv_i_shipment | |
| I_APPLIC | = lv_i_applic | |
| IMPORTING | ||
| RETURN | = lv_return | |
| TABLES | ||
| SHIPMENT_VEHICLE | = lt_shipment_vehicle | |
| COMPARTMENTS | = lt_compartments | |
| ITEM_POSITION | = lt_item_position | |
| ITEM_TANKS | = lt_item_tanks | |
| SHP_PARTNER | = lt_shp_partner | |
| SHP_MATERIAL | = lt_shp_material | |
| F_ASSIGNMENT | = lt_f_assignment | |
| SHP_QUANTITY | = lt_shp_quantity | |
| LOAD_DATA | = lt_load_data | |
| LOAD_AUOM | = lt_load_auom | |
| SHP_LOAD_DATA | = lt_shp_load_data | |
| SHIPMENT_DRIVER | = lt_shipment_driver | |
| SHP_LOAD_AUOM | = lt_shp_load_auom | |
| SHIPMENT_ITEM | = lt_shipment_item | |
| SHIPMENT_EVENTS | = lt_shipment_events | |
| EVENT_TEXT | = lt_event_text | |
| SHIPMENT_STAGES | = lt_shipment_stages | |
| STAGES_ASSIGN | = lt_stages_assign | |
| QUANTITY_ITEM | = lt_quantity_item | |
| ITEM_AUOM | = lt_item_auom | |
| EXCEPTIONS | ||
| ISO2SAP = 1 | ||
| ERROR_POSTING_TPI_IDOC = 10 | ||
| ERROR_PROCESSING_TAS_IDOC = 11 | ||
| ERROR_PROCESSING_TPI_IDOC = 12 | ||
| MODBAPI = 2 | ||
| NOSHNUM = 3 | ||
| EAN2SAP = 4 | ||
| NOEVENT = 5 | ||
| NOUPDATE = 6 | ||
| DCPLOCK = 7 | ||
| DCPSTAT = 8 | ||
| ERROR_POSTING_TAS_IDOC = 9 | ||
| . " RFC_UNIFIED_SHIPMENT_INTERFACE | ||
ABAP code using 7.40 inline data declarations to call FM RFC_UNIFIED_SHIPMENT_INTERFACE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.Search for further information about these or an SAP related objects