SAP OIRI_REVERSE_BILLING_DOCUMENT Function Module for Reverse billing document









OIRI_REVERSE_BILLING_DOCUMENT is a standard oiri reverse billing document SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reverse billing document 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 oiri reverse billing document FM, simply by entering the name OIRI_REVERSE_BILLING_DOCUMENT into the relevant SAP transaction such as SE37 or SE38.

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



Function OIRI_REVERSE_BILLING_DOCUMENT 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 'OIRI_REVERSE_BILLING_DOCUMENT'"Reverse billing document
EXPORTING
I_VBELN = "Billing document
* I_COMMIT = 'C' "Single-character flag
* I_OIR_INVINFO = "SSR Invoicing information
* I_PROCID = "Process ID
* I_REVDAT = "Billing date for billing index and printout

IMPORTING
E_NEW_VBELN = "Cancellation billing document number

TABLES
PT_VBFS = "Error Log for Collective Processing

EXCEPTIONS
ERROR_IN_COMMIT = 1 COMMIT_PARAMETER_NOT_DEFINED = 2 ERROR_IN_DOCUMENT_CREATION = 3
.



IMPORTING Parameters details for OIRI_REVERSE_BILLING_DOCUMENT

I_VBELN - Billing document

Data type: VBRK-VBELN
Optional: No
Call by Reference: Yes

I_COMMIT - Single-character flag

Data type: CHAR1
Default: 'C'
Optional: Yes
Call by Reference: Yes

I_OIR_INVINFO - SSR Invoicing information

Data type: OIRI_INVINFO
Optional: Yes
Call by Reference: Yes

I_PROCID - Process ID

Data type: OIRA_PROC
Optional: Yes
Call by Reference: Yes

I_REVDAT - Billing date for billing index and printout

Data type: FKDAT
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for OIRI_REVERSE_BILLING_DOCUMENT

E_NEW_VBELN - Cancellation billing document number

Data type: VBRK-VBELN
Optional: No
Call by Reference: Yes

TABLES Parameters details for OIRI_REVERSE_BILLING_DOCUMENT

PT_VBFS - Error Log for Collective Processing

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

EXCEPTIONS details

ERROR_IN_COMMIT - Error occured when performing commit with wait

Data type:
Optional: No
Call by Reference: Yes

COMMIT_PARAMETER_NOT_DEFINED - Commit parameter is not defined.

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_DOCUMENT_CREATION - Error occured in document creation

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for OIRI_REVERSE_BILLING_DOCUMENT 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_vbeln  TYPE VBRK-VBELN, "   
lt_pt_vbfs  TYPE STANDARD TABLE OF VBFS, "   
lv_e_new_vbeln  TYPE VBRK-VBELN, "   
lv_error_in_commit  TYPE VBRK, "   
lv_i_commit  TYPE CHAR1, "   'C'
lv_commit_parameter_not_defined  TYPE CHAR1, "   
lv_i_oir_invinfo  TYPE OIRI_INVINFO, "   
lv_error_in_document_creation  TYPE OIRI_INVINFO, "   
lv_i_procid  TYPE OIRA_PROC, "   
lv_i_revdat  TYPE FKDAT. "   

  CALL FUNCTION 'OIRI_REVERSE_BILLING_DOCUMENT'  "Reverse billing document
    EXPORTING
         I_VBELN = lv_i_vbeln
         I_COMMIT = lv_i_commit
         I_OIR_INVINFO = lv_i_oir_invinfo
         I_PROCID = lv_i_procid
         I_REVDAT = lv_i_revdat
    IMPORTING
         E_NEW_VBELN = lv_e_new_vbeln
    TABLES
         PT_VBFS = lt_pt_vbfs
    EXCEPTIONS
        ERROR_IN_COMMIT = 1
        COMMIT_PARAMETER_NOT_DEFINED = 2
        ERROR_IN_DOCUMENT_CREATION = 3
. " OIRI_REVERSE_BILLING_DOCUMENT




ABAP code using 7.40 inline data declarations to call FM OIRI_REVERSE_BILLING_DOCUMENT

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 VBELN FROM VBRK INTO @DATA(ld_i_vbeln).
 
 
"SELECT single VBELN FROM VBRK INTO @DATA(ld_e_new_vbeln).
 
 
DATA(ld_i_commit) = 'C'.
 
 
 
 
 
 


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!