SAP OII_GET_DELIVERY_LOC_DATA_TPI Function Module for Get all TPI relevant data for sales location (OIL-BDRP)









OII_GET_DELIVERY_LOC_DATA_TPI is a standard oii get delivery loc data tpi SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get all TPI relevant data for sales location (OIL-BDRP) 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 oii get delivery loc data tpi FM, simply by entering the name OII_GET_DELIVERY_LOC_DATA_TPI into the relevant SAP transaction such as SE37 or SE38.

Function Group: OIIB
Program Name: SAPLOIIB
Main Program: SAPLOIIB
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function OII_GET_DELIVERY_LOC_DATA_TPI 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 'OII_GET_DELIVERY_LOC_DATA_TPI'"Get all TPI relevant data for sales location (OIL-BDRP)
EXPORTING
* I_PBLNR = ' ' "OIL-MRN/SSR Business location
* I_KUNWE = ' ' "Customer ship-to party
* I_VKORG = ' ' "Sales organization
* I_VTWEG = ' ' "Distribution channel
* I_SPART = ' ' "Division
* I_DATE = SY-DATUM "Date for which derivation to occur
* I_TIME = SY-UZEIT "Time for which derivation to occur
* I_PARFN = ' ' "Partner role (IS-Oil MRN/SSR)
* I_OVERWRITE_SOEG = ' ' "Overwrite customized SOE group when determining sold to

IMPORTING
E_OIISCPKN = "Site control parameters for ship-to
E_KUNAG = "ID of sold-to party determined by lookup
E_KUNWE = "ID of ship-to party determined by lookup
E_ROIIPSOE = "Sales order entry default group info
E_KNA1_WE = "

TABLES
* T_OIISCPLKN = "Lead times determined during lookup
* T_OIIOTWKN = "Operations time window sets (customer view)

EXCEPTIONS
MISSING_LOCATOR = 1 NO_SOLD_TO_FOR_SHIP_TO = 2 SALES_AREA_NOT_VALID = 3 SHIP_TO_CUST_NOT_VALID = 4 NO_VALID_SOEGRP = 5
.



IMPORTING Parameters details for OII_GET_DELIVERY_LOC_DATA_TPI

I_PBLNR - OIL-MRN/SSR Business location

Data type: OIFSPBL-PBLNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KUNWE - Customer ship-to party

Data type: KNA1-KUNNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VKORG - Sales organization

Data type: TVKO-VKORG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VTWEG - Distribution channel

Data type: TVTW-VTWEG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SPART - Division

Data type: TSPA-SPART
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DATE - Date for which derivation to occur

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TIME - Time for which derivation to occur

Data type: SY-UZEIT
Default: SY-UZEIT
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PARFN - Partner role (IS-Oil MRN/SSR)

Data type: OIFBRF1-PARFN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_OVERWRITE_SOEG - Overwrite customized SOE group when determining sold to

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for OII_GET_DELIVERY_LOC_DATA_TPI

E_OIISCPKN - Site control parameters for ship-to

Data type: OIISCPKN
Optional: No
Call by Reference: No ( called with pass by value option)

E_KUNAG - ID of sold-to party determined by lookup

Data type: KNA1-KUNNR
Optional: No
Call by Reference: No ( called with pass by value option)

E_KUNWE - ID of ship-to party determined by lookup

Data type: KNA1-KUNNR
Optional: No
Call by Reference: No ( called with pass by value option)

E_ROIIPSOE - Sales order entry default group info

Data type: ROIIPSOE
Optional: No
Call by Reference: No ( called with pass by value option)

E_KNA1_WE -

Data type: KNA1
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for OII_GET_DELIVERY_LOC_DATA_TPI

T_OIISCPLKN - Lead times determined during lookup

Data type: OIISCPLKN
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_OIIOTWKN - Operations time window sets (customer view)

Data type: V_OIIOTWKN
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

MISSING_LOCATOR - There must be at least one locator specification

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_SOLD_TO_FOR_SHIP_TO - No sold-to parties found for specified ship-to

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SALES_AREA_NOT_VALID - Sales area specified is not a valid combination

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SHIP_TO_CUST_NOT_VALID - Specified ship-to customer does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_VALID_SOEGRP - No sales order entry group found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for OII_GET_DELIVERY_LOC_DATA_TPI 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_i_pblnr  TYPE OIFSPBL-PBLNR, "   SPACE
lv_e_oiiscpkn  TYPE OIISCPKN, "   
lt_t_oiiscplkn  TYPE STANDARD TABLE OF OIISCPLKN, "   
lv_missing_locator  TYPE OIISCPLKN, "   
lv_e_kunag  TYPE KNA1-KUNNR, "   
lv_i_kunwe  TYPE KNA1-KUNNR, "   SPACE
lt_t_oiiotwkn  TYPE STANDARD TABLE OF V_OIIOTWKN, "   
lv_no_sold_to_for_ship_to  TYPE V_OIIOTWKN, "   
lv_e_kunwe  TYPE KNA1-KUNNR, "   
lv_i_vkorg  TYPE TVKO-VKORG, "   SPACE
lv_sales_area_not_valid  TYPE TVKO, "   
lv_i_vtweg  TYPE TVTW-VTWEG, "   SPACE
lv_e_roiipsoe  TYPE ROIIPSOE, "   
lv_ship_to_cust_not_valid  TYPE ROIIPSOE, "   
lv_i_spart  TYPE TSPA-SPART, "   SPACE
lv_e_kna1_we  TYPE KNA1, "   
lv_no_valid_soegrp  TYPE KNA1, "   
lv_i_date  TYPE SY-DATUM, "   SY-DATUM
lv_i_time  TYPE SY-UZEIT, "   SY-UZEIT
lv_i_parfn  TYPE OIFBRF1-PARFN, "   SPACE
lv_i_overwrite_soeg  TYPE OIFBRF1. "   SPACE

  CALL FUNCTION 'OII_GET_DELIVERY_LOC_DATA_TPI'  "Get all TPI relevant data for sales location (OIL-BDRP)
    EXPORTING
         I_PBLNR = lv_i_pblnr
         I_KUNWE = lv_i_kunwe
         I_VKORG = lv_i_vkorg
         I_VTWEG = lv_i_vtweg
         I_SPART = lv_i_spart
         I_DATE = lv_i_date
         I_TIME = lv_i_time
         I_PARFN = lv_i_parfn
         I_OVERWRITE_SOEG = lv_i_overwrite_soeg
    IMPORTING
         E_OIISCPKN = lv_e_oiiscpkn
         E_KUNAG = lv_e_kunag
         E_KUNWE = lv_e_kunwe
         E_ROIIPSOE = lv_e_roiipsoe
         E_KNA1_WE = lv_e_kna1_we
    TABLES
         T_OIISCPLKN = lt_t_oiiscplkn
         T_OIIOTWKN = lt_t_oiiotwkn
    EXCEPTIONS
        MISSING_LOCATOR = 1
        NO_SOLD_TO_FOR_SHIP_TO = 2
        SALES_AREA_NOT_VALID = 3
        SHIP_TO_CUST_NOT_VALID = 4
        NO_VALID_SOEGRP = 5
. " OII_GET_DELIVERY_LOC_DATA_TPI




ABAP code using 7.40 inline data declarations to call FM OII_GET_DELIVERY_LOC_DATA_TPI

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.

"SELECT single PBLNR FROM OIFSPBL INTO @DATA(ld_i_pblnr).
DATA(ld_i_pblnr) = ' '.
 
 
 
 
"SELECT single KUNNR FROM KNA1 INTO @DATA(ld_e_kunag).
 
"SELECT single KUNNR FROM KNA1 INTO @DATA(ld_i_kunwe).
DATA(ld_i_kunwe) = ' '.
 
 
 
"SELECT single KUNNR FROM KNA1 INTO @DATA(ld_e_kunwe).
 
"SELECT single VKORG FROM TVKO INTO @DATA(ld_i_vkorg).
DATA(ld_i_vkorg) = ' '.
 
 
"SELECT single VTWEG FROM TVTW INTO @DATA(ld_i_vtweg).
DATA(ld_i_vtweg) = ' '.
 
 
 
"SELECT single SPART FROM TSPA INTO @DATA(ld_i_spart).
DATA(ld_i_spart) = ' '.
 
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_i_date).
DATA(ld_i_date) = SY-DATUM.
 
"SELECT single UZEIT FROM SY INTO @DATA(ld_i_time).
DATA(ld_i_time) = SY-UZEIT.
 
"SELECT single PARFN FROM OIFBRF1 INTO @DATA(ld_i_parfn).
DATA(ld_i_parfn) = ' '.
 
DATA(ld_i_overwrite_soeg) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!