SAP POSTING_INTERFACE_REVERSE_DOC Function Module for Cancel document via posting interface









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

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



Function POSTING_INTERFACE_REVERSE_DOC 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 'POSTING_INTERFACE_REVERSE_DOC'"Cancel document via posting interface
EXPORTING
I_BELNS = "Document number: document to be reversed
* I_BUDAT = ' ' "Reversal Document Posting Date
I_BUKRS = "Company code
* I_GJAHS = ' ' "Fiscal year
* I_MONAT = ' ' "Posting period reverse doc.: fiscal period
I_TCODE = "Transaction code (currently only FB08)
* I_VOIDR = ' ' "Void reason code: reason invalid check
* I_STGRD = ' ' "
* I_NO_AUTH = ' ' "

IMPORTING
E_MSGID = "Message ID only for call trans. ..using)
E_MSGNO = "Message number only for call trans. ..using)
E_MSGTY = "Message type only for call trans. ..using)
E_MSGV1 = "Message variable 1 only for call trans. ..using)
E_MSGV2 = "Message variable 2 only for call trans. ..using)
E_MSGV3 = "Message variable 3 only for call trans. ..using)
E_MSGV4 = "Message variable 4 only for call trans. ..using)
E_SUBRC = "Return code only for call trans. ..using)

TABLES
T_BLNTAB = "

EXCEPTIONS
TRANSACTION_CODE_INVALID = 1 NO_AUTHORIZATION = 2
.



IMPORTING Parameters details for POSTING_INTERFACE_REVERSE_DOC

I_BELNS - Document number: document to be reversed

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

I_BUDAT - Reversal Document Posting Date

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

I_BUKRS - Company code

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

I_GJAHS - Fiscal year

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

I_MONAT - Posting period reverse doc.: fiscal period

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

I_TCODE - Transaction code (currently only FB08)

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

I_VOIDR - Void reason code: reason invalid check

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

I_STGRD -

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

I_NO_AUTH -

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

EXPORTING Parameters details for POSTING_INTERFACE_REVERSE_DOC

E_MSGID - Message ID only for call trans. ..using)

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

E_MSGNO - Message number only for call trans. ..using)

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

E_MSGTY - Message type only for call trans. ..using)

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

E_MSGV1 - Message variable 1 only for call trans. ..using)

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

E_MSGV2 - Message variable 2 only for call trans. ..using)

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

E_MSGV3 - Message variable 3 only for call trans. ..using)

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

E_MSGV4 - Message variable 4 only for call trans. ..using)

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

E_SUBRC - Return code only for call trans. ..using)

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

TABLES Parameters details for POSTING_INTERFACE_REVERSE_DOC

T_BLNTAB -

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

EXCEPTIONS details

TRANSACTION_CODE_INVALID - Invalid transaction code

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

NO_AUTHORIZATION - Authorization missing

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

Copy and paste ABAP code example for POSTING_INTERFACE_REVERSE_DOC 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_e_msgid  TYPE SY-MSGID, "   
lv_i_belns  TYPE RF05A-BELNS, "   
lt_t_blntab  TYPE STANDARD TABLE OF BLNTAB, "   
lv_transaction_code_invalid  TYPE BLNTAB, "   
lv_e_msgno  TYPE SY-MSGNO, "   
lv_i_budat  TYPE BSIS-BUDAT, "   SPACE
lv_no_authorization  TYPE BSIS, "   
lv_e_msgty  TYPE SY-MSGTY, "   
lv_i_bukrs  TYPE BKPF-BUKRS, "   
lv_e_msgv1  TYPE SY-MSGV1, "   
lv_i_gjahs  TYPE RF05A-GJAHS, "   SPACE
lv_e_msgv2  TYPE SY-MSGV2, "   
lv_i_monat  TYPE BSIS-MONAT, "   SPACE
lv_e_msgv3  TYPE SY-MSGV3, "   
lv_i_tcode  TYPE SY-TCODE, "   
lv_e_msgv4  TYPE SY-MSGV4, "   
lv_i_voidr  TYPE RF05A-VOIDR, "   SPACE
lv_e_subrc  TYPE SY-SUBRC, "   
lv_i_stgrd  TYPE UF05A-STGRD, "   SPACE
lv_i_no_auth  TYPE UF05A. "   SPACE

  CALL FUNCTION 'POSTING_INTERFACE_REVERSE_DOC'  "Cancel document via posting interface
    EXPORTING
         I_BELNS = lv_i_belns
         I_BUDAT = lv_i_budat
         I_BUKRS = lv_i_bukrs
         I_GJAHS = lv_i_gjahs
         I_MONAT = lv_i_monat
         I_TCODE = lv_i_tcode
         I_VOIDR = lv_i_voidr
         I_STGRD = lv_i_stgrd
         I_NO_AUTH = lv_i_no_auth
    IMPORTING
         E_MSGID = lv_e_msgid
         E_MSGNO = lv_e_msgno
         E_MSGTY = lv_e_msgty
         E_MSGV1 = lv_e_msgv1
         E_MSGV2 = lv_e_msgv2
         E_MSGV3 = lv_e_msgv3
         E_MSGV4 = lv_e_msgv4
         E_SUBRC = lv_e_subrc
    TABLES
         T_BLNTAB = lt_t_blntab
    EXCEPTIONS
        TRANSACTION_CODE_INVALID = 1
        NO_AUTHORIZATION = 2
. " POSTING_INTERFACE_REVERSE_DOC




ABAP code using 7.40 inline data declarations to call FM POSTING_INTERFACE_REVERSE_DOC

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 MSGID FROM SY INTO @DATA(ld_e_msgid).
 
"SELECT single BELNS FROM RF05A INTO @DATA(ld_i_belns).
 
 
 
"SELECT single MSGNO FROM SY INTO @DATA(ld_e_msgno).
 
"SELECT single BUDAT FROM BSIS INTO @DATA(ld_i_budat).
DATA(ld_i_budat) = ' '.
 
 
"SELECT single MSGTY FROM SY INTO @DATA(ld_e_msgty).
 
"SELECT single BUKRS FROM BKPF INTO @DATA(ld_i_bukrs).
 
"SELECT single MSGV1 FROM SY INTO @DATA(ld_e_msgv1).
 
"SELECT single GJAHS FROM RF05A INTO @DATA(ld_i_gjahs).
DATA(ld_i_gjahs) = ' '.
 
"SELECT single MSGV2 FROM SY INTO @DATA(ld_e_msgv2).
 
"SELECT single MONAT FROM BSIS INTO @DATA(ld_i_monat).
DATA(ld_i_monat) = ' '.
 
"SELECT single MSGV3 FROM SY INTO @DATA(ld_e_msgv3).
 
"SELECT single TCODE FROM SY INTO @DATA(ld_i_tcode).
 
"SELECT single MSGV4 FROM SY INTO @DATA(ld_e_msgv4).
 
"SELECT single VOIDR FROM RF05A INTO @DATA(ld_i_voidr).
DATA(ld_i_voidr) = ' '.
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_e_subrc).
 
"SELECT single STGRD FROM UF05A INTO @DATA(ld_i_stgrd).
DATA(ld_i_stgrd) = ' '.
 
DATA(ld_i_no_auth) = ' '.
 


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!