SAP REVERSE_CLEARING Function Module for Reset Cleared Items









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

Function Group: F005
Program Name: SAPLF005
Main Program: SAPLF005
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1



Function REVERSE_CLEARING 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 'REVERSE_CLEARING'"Reset Cleared Items
EXPORTING
I_AUGBU = "
I_AUGBL = "
I_AUGGJ = "Fiscal Year of Clearing Document
I_XERLK = "X, if correspondence is to be completed
* I_STODT = "Posting Date in the Document

TABLES
T_BKORM = "Correspondence to the affected documents
T_RAGL1 = "Line items for the cancellation
T_RAGL2 = "Line items of the clearing documents (FDIS)
T_RAGL3 = "Header data of clearing docs.(payment hist.)
.



IMPORTING Parameters details for REVERSE_CLEARING

I_AUGBU -

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

I_AUGBL -

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

I_AUGGJ - Fiscal Year of Clearing Document

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

I_XERLK - X, if correspondence is to be completed

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

I_STODT - Posting Date in the Document

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

TABLES Parameters details for REVERSE_CLEARING

T_BKORM - Correspondence to the affected documents

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

T_RAGL1 - Line items for the cancellation

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

T_RAGL2 - Line items of the clearing documents (FDIS)

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

T_RAGL3 - Header data of clearing docs.(payment hist.)

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

Copy and paste ABAP code example for REVERSE_CLEARING 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_augbu  TYPE BKPF-BUKRS, "   
lt_t_bkorm  TYPE STANDARD TABLE OF BKORM, "   
lv_i_augbl  TYPE BKPF-BELNR, "   
lt_t_ragl1  TYPE STANDARD TABLE OF RAGL1, "   
lv_i_auggj  TYPE BKPF-GJAHR, "   
lt_t_ragl2  TYPE STANDARD TABLE OF RAGL2, "   
lv_i_xerlk  TYPE RFPDO1-F140XDEL, "   
lt_t_ragl3  TYPE STANDARD TABLE OF RAGL3, "   
lv_i_stodt  TYPE BKPF-BUDAT. "   

  CALL FUNCTION 'REVERSE_CLEARING'  "Reset Cleared Items
    EXPORTING
         I_AUGBU = lv_i_augbu
         I_AUGBL = lv_i_augbl
         I_AUGGJ = lv_i_auggj
         I_XERLK = lv_i_xerlk
         I_STODT = lv_i_stodt
    TABLES
         T_BKORM = lt_t_bkorm
         T_RAGL1 = lt_t_ragl1
         T_RAGL2 = lt_t_ragl2
         T_RAGL3 = lt_t_ragl3
. " REVERSE_CLEARING




ABAP code using 7.40 inline data declarations to call FM REVERSE_CLEARING

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 BUKRS FROM BKPF INTO @DATA(ld_i_augbu).
 
 
"SELECT single BELNR FROM BKPF INTO @DATA(ld_i_augbl).
 
 
"SELECT single GJAHR FROM BKPF INTO @DATA(ld_i_auggj).
 
 
"SELECT single F140XDEL FROM RFPDO1 INTO @DATA(ld_i_xerlk).
 
 
"SELECT single BUDAT FROM BKPF INTO @DATA(ld_i_stodt).
 


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!