SAP POSTING_INTERFACE_CLEARING Function Module for Post with clearing (FB05) using internal posting interface
POSTING_INTERFACE_CLEARING is a standard posting interface 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 Post with clearing (FB05) using internal 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 clearing FM, simply by entering the name POSTING_INTERFACE_CLEARING 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_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 'POSTING_INTERFACE_CLEARING'"Post with clearing (FB05) using internal posting interface.
EXPORTING
I_AUGLV = "Clearing Transaction
I_TCODE = "Transaction code
* I_SGFUNCT = ' ' "Different FUNCT function
* I_NO_AUTH = ' ' "
* I_XSIMU = ' ' "
IMPORTING
E_MSGID = "Message ID (only for Call Trans. ..Using)
E_MSGNO = "Message number (only for Call Trans. ..Using)
E_MSGTY = "Message category (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 = "Table of the document numbers (only for Call Trans ..)
T_FTCLEAR = "Clearing data
T_FTPOST = "Document header and item data
T_FTTAX = "Taxes
EXCEPTIONS
CLEARING_PROCEDURE_INVALID = 1 CLEARING_PROCEDURE_MISSING = 2 TABLE_T041A_EMPTY = 3 TRANSACTION_CODE_INVALID = 4 AMOUNT_FORMAT_ERROR = 5 TOO_MANY_LINE_ITEMS = 6 COMPANY_CODE_INVALID = 7 SCREEN_NOT_FOUND = 8 NO_AUTHORIZATION = 9
IMPORTING Parameters details for POSTING_INTERFACE_CLEARING
I_AUGLV - Clearing Transaction
Data type: T041A-AUGLVOptional: No
Call by Reference: No ( called with pass by value option)
I_TCODE - Transaction code
Data type: SY-TCODEOptional: No
Call by Reference: No ( called with pass by value option)
I_SGFUNCT - Different FUNCT function
Data type: RFIPI-SGFUNCTDefault: 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)
I_XSIMU -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for POSTING_INTERFACE_CLEARING
E_MSGID - Message ID (only for Call Trans. ..Using)
Data type: SY-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGNO - Message number (only for Call Trans. ..Using)
Data type: SY-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGTY - Message category (only for Call Trans. ..Using)
Data type: SY-MSGTYOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGV1 - Message variable 1 (only for Call Trans. ..Using)
Data type: SY-MSGV1Optional: No
Call by Reference: No ( called with pass by value option)
E_MSGV2 - Message variable 2 (only for Call Trans. ..Using)
Data type: SY-MSGV2Optional: No
Call by Reference: No ( called with pass by value option)
E_MSGV3 - Message variable 3 (only for Call Trans. ..Using)
Data type: SY-MSGV3Optional: No
Call by Reference: No ( called with pass by value option)
E_MSGV4 - Message variable 4 (only for Call Trans. ..Using)
Data type: SY-MSGV4Optional: No
Call by Reference: No ( called with pass by value option)
E_SUBRC - Return code (only for Call Trans. ..Using)
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for POSTING_INTERFACE_CLEARING
T_BLNTAB - Table of the document numbers (only for Call Trans ..)
Data type: BLNTABOptional: No
Call by Reference: No ( called with pass by value option)
T_FTCLEAR - Clearing data
Data type: FTCLEAROptional: No
Call by Reference: No ( called with pass by value option)
T_FTPOST - Document header and item data
Data type: FTPOSTOptional: No
Call by Reference: No ( called with pass by value option)
T_FTTAX - Taxes
Data type: FTTAXOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CLEARING_PROCEDURE_INVALID - Transferred clearing procedure is invalid
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CLEARING_PROCEDURE_MISSING - Clearing procedure not transferred
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLE_T041A_EMPTY - Table of the clearing procedures (T041A) is empty
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TRANSACTION_CODE_INVALID - Transferred transaction code not supported
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
AMOUNT_FORMAT_ERROR - Formatting error with the specified amount
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TOO_MANY_LINE_ITEMS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
COMPANY_CODE_INVALID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SCREEN_NOT_FOUND -
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_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_e_msgid | TYPE SY-MSGID, " | |||
| lv_i_auglv | TYPE T041A-AUGLV, " | |||
| lt_t_blntab | TYPE STANDARD TABLE OF BLNTAB, " | |||
| lv_clearing_procedure_invalid | TYPE BLNTAB, " | |||
| lv_e_msgno | TYPE SY-MSGNO, " | |||
| lv_i_tcode | TYPE SY-TCODE, " | |||
| lt_t_ftclear | TYPE STANDARD TABLE OF FTCLEAR, " | |||
| lv_clearing_procedure_missing | TYPE FTCLEAR, " | |||
| lv_e_msgty | TYPE SY-MSGTY, " | |||
| lt_t_ftpost | TYPE STANDARD TABLE OF FTPOST, " | |||
| lv_i_sgfunct | TYPE RFIPI-SGFUNCT, " SPACE | |||
| lv_table_t041a_empty | TYPE RFIPI, " | |||
| lv_e_msgv1 | TYPE SY-MSGV1, " | |||
| lt_t_fttax | TYPE STANDARD TABLE OF FTTAX, " | |||
| lv_i_no_auth | TYPE FTTAX, " SPACE | |||
| lv_transaction_code_invalid | TYPE FTTAX, " | |||
| lv_e_msgv2 | TYPE SY-MSGV2, " | |||
| lv_i_xsimu | TYPE CHAR1, " SPACE | |||
| lv_amount_format_error | TYPE CHAR1, " | |||
| lv_e_msgv3 | TYPE SY-MSGV3, " | |||
| lv_too_many_line_items | TYPE SY, " | |||
| lv_e_msgv4 | TYPE SY-MSGV4, " | |||
| lv_company_code_invalid | TYPE SY, " | |||
| lv_e_subrc | TYPE SY-SUBRC, " | |||
| lv_screen_not_found | TYPE SY, " | |||
| lv_no_authorization | TYPE SY. " |
|   CALL FUNCTION 'POSTING_INTERFACE_CLEARING' "Post with clearing (FB05) using internal posting interface |
| EXPORTING | ||
| I_AUGLV | = lv_i_auglv | |
| I_TCODE | = lv_i_tcode | |
| I_SGFUNCT | = lv_i_sgfunct | |
| I_NO_AUTH | = lv_i_no_auth | |
| I_XSIMU | = lv_i_xsimu | |
| 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 | |
| T_FTCLEAR | = lt_t_ftclear | |
| T_FTPOST | = lt_t_ftpost | |
| T_FTTAX | = lt_t_fttax | |
| EXCEPTIONS | ||
| CLEARING_PROCEDURE_INVALID = 1 | ||
| CLEARING_PROCEDURE_MISSING = 2 | ||
| TABLE_T041A_EMPTY = 3 | ||
| TRANSACTION_CODE_INVALID = 4 | ||
| AMOUNT_FORMAT_ERROR = 5 | ||
| TOO_MANY_LINE_ITEMS = 6 | ||
| COMPANY_CODE_INVALID = 7 | ||
| SCREEN_NOT_FOUND = 8 | ||
| NO_AUTHORIZATION = 9 | ||
| . " POSTING_INTERFACE_CLEARING | ||
ABAP code using 7.40 inline data declarations to call FM POSTING_INTERFACE_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 MSGID FROM SY INTO @DATA(ld_e_msgid). | ||||
| "SELECT single AUGLV FROM T041A INTO @DATA(ld_i_auglv). | ||||
| "SELECT single MSGNO FROM SY INTO @DATA(ld_e_msgno). | ||||
| "SELECT single TCODE FROM SY INTO @DATA(ld_i_tcode). | ||||
| "SELECT single MSGTY FROM SY INTO @DATA(ld_e_msgty). | ||||
| "SELECT single SGFUNCT FROM RFIPI INTO @DATA(ld_i_sgfunct). | ||||
| DATA(ld_i_sgfunct) | = ' '. | |||
| "SELECT single MSGV1 FROM SY INTO @DATA(ld_e_msgv1). | ||||
| DATA(ld_i_no_auth) | = ' '. | |||
| "SELECT single MSGV2 FROM SY INTO @DATA(ld_e_msgv2). | ||||
| DATA(ld_i_xsimu) | = ' '. | |||
| "SELECT single MSGV3 FROM SY INTO @DATA(ld_e_msgv3). | ||||
| "SELECT single MSGV4 FROM SY INTO @DATA(ld_e_msgv4). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_e_subrc). | ||||
Search for further information about these or an SAP related objects