SAP OIURV_ALLOCATION_FACTOR Function Module for Calculates allocation factors for multiple owners









OIURV_ALLOCATION_FACTOR is a standard oiurv allocation factor SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Calculates allocation factors for multiple owners 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 oiurv allocation factor FM, simply by entering the name OIURV_ALLOCATION_FACTOR into the relevant SAP transaction such as SE37 or SE38.

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



Function OIURV_ALLOCATION_FACTOR 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 'OIURV_ALLOCATION_FACTOR'"Calculates allocation factors for multiple owners
EXPORTING
I_DN_NO = "Delivery network number
I_CT_NO = "Contract Number
I_SALE_DT = "Sales date
I_UNIT_VNAME = "Joint venture
I_TXN_LVL_CD = "Level Code
I_VOLUME_TYPE = "Volume type code
I_FREQ_CD = "Frequency code
I_WL_NO = "Well ID Number
I_WC_NO = "Well Completion Number
I_MP_NO = "Measurement Point Number
I_MAJPD_CD = "Major Product Code
I_MATNR = "Material number
I_BUKRS = "Company code
I_VNAME = "Joint Venture
I_DOI_NO = "Division of Interest

IMPORTING
E_STATUS = "Status Flag
E_REJ_RSN_CD = "Rejection Reason Code
E_TOTAL_CT_GRI = "Gross Revenue Interest Decimal

TABLES
P_PROD_ALLOC_TB = "Producer Allocation (used in functions)
P_SETT_ALLOC_TB = "Settlement Allocation (used in functions)

EXCEPTIONS
IO_ERROR = 1 OTHER_ERROR = 2
.



IMPORTING Parameters details for OIURV_ALLOCATION_FACTOR

I_DN_NO - Delivery network number

Data type: OIURV_DOC_DTL_BK-DN_NO
Optional: No
Call by Reference: Yes

I_CT_NO - Contract Number

Data type: OIURV_DOC_DTL_BK-CT_NO
Optional: No
Call by Reference: Yes

I_SALE_DT - Sales date

Data type: OIU_SB_ENTWC-SA_DT
Optional: No
Call by Reference: Yes

I_UNIT_VNAME - Joint venture

Data type: OIURV_DOC_DTL_BK-UNIT_VNAME
Optional: No
Call by Reference: Yes

I_TXN_LVL_CD - Level Code

Data type: OIURV_DOC_DTL_BK-LVL_CD
Optional: No
Call by Reference: Yes

I_VOLUME_TYPE - Volume type code

Data type: OIU_SB_ENTWC-VT_CD
Optional: No
Call by Reference: Yes

I_FREQ_CD - Frequency code

Data type: OIURV_DOC_DTL_BK-FREQ_CD
Optional: No
Call by Reference: Yes

I_WL_NO - Well ID Number

Data type: OIURV_DOC_DTL_BK-WL_NO
Optional: No
Call by Reference: Yes

I_WC_NO - Well Completion Number

Data type: OIURV_DOC_DTL_BK-WC_NO
Optional: No
Call by Reference: Yes

I_MP_NO - Measurement Point Number

Data type: OIURV_DOC_DTL_BK-MP_NO
Optional: No
Call by Reference: Yes

I_MAJPD_CD - Major Product Code

Data type: OIURV_DOC_DTL_BK-MAJPD_CD
Optional: No
Call by Reference: Yes

I_MATNR - Material number

Data type: OIURV_DOC_DTL_BK-MATNR
Optional: No
Call by Reference: Yes

I_BUKRS - Company code

Data type: OIURV_DOC_DTL_BK-BUKRS
Optional: No
Call by Reference: Yes

I_VNAME - Joint Venture

Data type: OIURV_DOC_DTL_BK-VNAME
Optional: No
Call by Reference: Yes

I_DOI_NO - Division of Interest

Data type: OIURV_DOC_DTL_BK-DOI_NO
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for OIURV_ALLOCATION_FACTOR

E_STATUS - Status Flag

Data type: C
Optional: No
Call by Reference: Yes

E_REJ_RSN_CD - Rejection Reason Code

Data type: OIURV_DOC_DTL_BK-REJ_RSN_CD
Optional: No
Call by Reference: Yes

E_TOTAL_CT_GRI - Gross Revenue Interest Decimal

Data type: OIU_SB_ENTWC-GRI_PC
Optional: No
Call by Reference: Yes

TABLES Parameters details for OIURV_ALLOCATION_FACTOR

P_PROD_ALLOC_TB - Producer Allocation (used in functions)

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

P_SETT_ALLOC_TB - Settlement Allocation (used in functions)

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

EXCEPTIONS details

IO_ERROR - Unexpected Error

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

OTHER_ERROR - All Other Errors

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

Copy and paste ABAP code example for OIURV_ALLOCATION_FACTOR 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_dn_no  TYPE OIURV_DOC_DTL_BK-DN_NO, "   
lv_e_status  TYPE C, "   
lv_io_error  TYPE C, "   
lt_p_prod_alloc_tb  TYPE STANDARD TABLE OF ROIU_PROD_ALLOC, "   
lv_i_ct_no  TYPE OIURV_DOC_DTL_BK-CT_NO, "   
lv_i_sale_dt  TYPE OIU_SB_ENTWC-SA_DT, "   
lv_i_unit_vname  TYPE OIURV_DOC_DTL_BK-UNIT_VNAME, "   
lv_i_txn_lvl_cd  TYPE OIURV_DOC_DTL_BK-LVL_CD, "   
lv_i_volume_type  TYPE OIU_SB_ENTWC-VT_CD, "   
lv_i_freq_cd  TYPE OIURV_DOC_DTL_BK-FREQ_CD, "   
lv_i_wl_no  TYPE OIURV_DOC_DTL_BK-WL_NO, "   
lv_other_error  TYPE OIURV_DOC_DTL_BK, "   
lv_e_rej_rsn_cd  TYPE OIURV_DOC_DTL_BK-REJ_RSN_CD, "   
lt_p_sett_alloc_tb  TYPE STANDARD TABLE OF ROIU_SETT_ALLOC, "   
lv_i_wc_no  TYPE OIURV_DOC_DTL_BK-WC_NO, "   
lv_e_total_ct_gri  TYPE OIU_SB_ENTWC-GRI_PC, "   
lv_i_mp_no  TYPE OIURV_DOC_DTL_BK-MP_NO, "   
lv_i_majpd_cd  TYPE OIURV_DOC_DTL_BK-MAJPD_CD, "   
lv_i_matnr  TYPE OIURV_DOC_DTL_BK-MATNR, "   
lv_i_bukrs  TYPE OIURV_DOC_DTL_BK-BUKRS, "   
lv_i_vname  TYPE OIURV_DOC_DTL_BK-VNAME, "   
lv_i_doi_no  TYPE OIURV_DOC_DTL_BK-DOI_NO. "   

  CALL FUNCTION 'OIURV_ALLOCATION_FACTOR'  "Calculates allocation factors for multiple owners
    EXPORTING
         I_DN_NO = lv_i_dn_no
         I_CT_NO = lv_i_ct_no
         I_SALE_DT = lv_i_sale_dt
         I_UNIT_VNAME = lv_i_unit_vname
         I_TXN_LVL_CD = lv_i_txn_lvl_cd
         I_VOLUME_TYPE = lv_i_volume_type
         I_FREQ_CD = lv_i_freq_cd
         I_WL_NO = lv_i_wl_no
         I_WC_NO = lv_i_wc_no
         I_MP_NO = lv_i_mp_no
         I_MAJPD_CD = lv_i_majpd_cd
         I_MATNR = lv_i_matnr
         I_BUKRS = lv_i_bukrs
         I_VNAME = lv_i_vname
         I_DOI_NO = lv_i_doi_no
    IMPORTING
         E_STATUS = lv_e_status
         E_REJ_RSN_CD = lv_e_rej_rsn_cd
         E_TOTAL_CT_GRI = lv_e_total_ct_gri
    TABLES
         P_PROD_ALLOC_TB = lt_p_prod_alloc_tb
         P_SETT_ALLOC_TB = lt_p_sett_alloc_tb
    EXCEPTIONS
        IO_ERROR = 1
        OTHER_ERROR = 2
. " OIURV_ALLOCATION_FACTOR




ABAP code using 7.40 inline data declarations to call FM OIURV_ALLOCATION_FACTOR

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 DN_NO FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_dn_no).
 
 
 
 
"SELECT single CT_NO FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_ct_no).
 
"SELECT single SA_DT FROM OIU_SB_ENTWC INTO @DATA(ld_i_sale_dt).
 
"SELECT single UNIT_VNAME FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_unit_vname).
 
"SELECT single LVL_CD FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_txn_lvl_cd).
 
"SELECT single VT_CD FROM OIU_SB_ENTWC INTO @DATA(ld_i_volume_type).
 
"SELECT single FREQ_CD FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_freq_cd).
 
"SELECT single WL_NO FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_wl_no).
 
 
"SELECT single REJ_RSN_CD FROM OIURV_DOC_DTL_BK INTO @DATA(ld_e_rej_rsn_cd).
 
 
"SELECT single WC_NO FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_wc_no).
 
"SELECT single GRI_PC FROM OIU_SB_ENTWC INTO @DATA(ld_e_total_ct_gri).
 
"SELECT single MP_NO FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_mp_no).
 
"SELECT single MAJPD_CD FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_majpd_cd).
 
"SELECT single MATNR FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_matnr).
 
"SELECT single BUKRS FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_bukrs).
 
"SELECT single VNAME FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_vname).
 
"SELECT single DOI_NO FROM OIURV_DOC_DTL_BK INTO @DATA(ld_i_doi_no).
 


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!