SAP Function Modules

POSTING_INTERFACE_CLEARING SAP Function module - Post with clearing (FB05) using internal posting interface







POSTING_INTERFACE_CLEARING is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name POSTING_INTERFACE_CLEARING into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FIPI
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM POSTING_INTERFACE_CLEARING - POSTING INTERFACE CLEARING





CALL FUNCTION 'POSTING_INTERFACE_CLEARING' "Post with clearing (FB05) using internal posting interface
  EXPORTING
    i_auglv =                   " t041a-auglv   Clearing Transaction
    i_tcode =                   " sy-tcode      Transaction code
*   i_sgfunct = SPACE           " rfipi-sgfunct  Different FUNCT function
*   i_no_auth = SPACE           "
*   i_xsimu = SPACE             " char1
  IMPORTING
    e_msgid =                   " sy-msgid      Message ID (only for Call Trans. ..Using)
    e_msgno =                   " sy-msgno      Message number (only for Call Trans. ..Using)
    e_msgty =                   " sy-msgty      Message category (only for Call Trans. ..Using)
    e_msgv1 =                   " sy-msgv1      Message variable 1 (only for Call Trans. ..Using)
    e_msgv2 =                   " sy-msgv2      Message variable 2 (only for Call Trans. ..Using)
    e_msgv3 =                   " sy-msgv3      Message variable 3 (only for Call Trans. ..Using)
    e_msgv4 =                   " sy-msgv4      Message variable 4 (only for Call Trans. ..Using)
    e_subrc =                   " sy-subrc      Return code (only for Call Trans. ..Using)
  TABLES
    t_blntab =                  " blntab        Table of the document numbers (only for Call Trans ..)
    t_ftclear =                 " ftclear       Clearing data
    t_ftpost =                  " ftpost        Document header and item data
    t_fttax =                   " fttax         Taxes
  EXCEPTIONS
    CLEARING_PROCEDURE_INVALID = 1  "           Transferred clearing procedure is invalid
    CLEARING_PROCEDURE_MISSING = 2  "           Clearing procedure not transferred
    TABLE_T041A_EMPTY = 3       "               Table of the clearing procedures (T041A) is empty
    TRANSACTION_CODE_INVALID = 4  "             Transferred transaction code not supported
    AMOUNT_FORMAT_ERROR = 5     "               Formatting error with the specified amount
    TOO_MANY_LINE_ITEMS = 6     "
    COMPANY_CODE_INVALID = 7    "
    SCREEN_NOT_FOUND = 8        "
    NO_AUTHORIZATION = 9        "               Authorization missing
    .  "  POSTING_INTERFACE_CLEARING

ABAP code example for Function Module POSTING_INTERFACE_CLEARING





The ABAP code below is a full code listing to execute function module POSTING_INTERFACE_CLEARING including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_e_msgid  TYPE SY-MSGID ,
ld_e_msgno  TYPE SY-MSGNO ,
ld_e_msgty  TYPE SY-MSGTY ,
ld_e_msgv1  TYPE SY-MSGV1 ,
ld_e_msgv2  TYPE SY-MSGV2 ,
ld_e_msgv3  TYPE SY-MSGV3 ,
ld_e_msgv4  TYPE SY-MSGV4 ,
ld_e_subrc  TYPE SY-SUBRC ,
it_t_blntab  TYPE STANDARD TABLE OF BLNTAB,"TABLES PARAM
wa_t_blntab  LIKE LINE OF it_t_blntab ,
it_t_ftclear  TYPE STANDARD TABLE OF FTCLEAR,"TABLES PARAM
wa_t_ftclear  LIKE LINE OF it_t_ftclear ,
it_t_ftpost  TYPE STANDARD TABLE OF FTPOST,"TABLES PARAM
wa_t_ftpost  LIKE LINE OF it_t_ftpost ,
it_t_fttax  TYPE STANDARD TABLE OF FTTAX,"TABLES PARAM
wa_t_fttax  LIKE LINE OF it_t_fttax .


SELECT single AUGLV
FROM T041A
INTO @DATA(ld_i_auglv).

DATA(ld_i_tcode) = 'some text here'.

DATA(ld_i_sgfunct) = some text here
DATA(ld_i_no_auth) = 'some text here'.
DATA(ld_i_xsimu) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_blntab to it_t_blntab.

"populate fields of struture and append to itab
append wa_t_ftclear to it_t_ftclear.

"populate fields of struture and append to itab
append wa_t_ftpost to it_t_ftpost.

"populate fields of struture and append to itab
append wa_t_fttax to it_t_fttax. . CALL FUNCTION 'POSTING_INTERFACE_CLEARING' EXPORTING i_auglv = ld_i_auglv i_tcode = ld_i_tcode * i_sgfunct = ld_i_sgfunct * i_no_auth = ld_i_no_auth * i_xsimu = ld_i_xsimu IMPORTING e_msgid = ld_e_msgid e_msgno = ld_e_msgno e_msgty = ld_e_msgty e_msgv1 = ld_e_msgv1 e_msgv2 = ld_e_msgv2 e_msgv3 = ld_e_msgv3 e_msgv4 = ld_e_msgv4 e_subrc = ld_e_subrc TABLES t_blntab = it_t_blntab t_ftclear = it_t_ftclear t_ftpost = it_t_ftpost t_fttax = it_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
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_msgid  TYPE SY-MSGID ,
ld_i_auglv  TYPE T041A-AUGLV ,
it_t_blntab  TYPE STANDARD TABLE OF BLNTAB ,
wa_t_blntab  LIKE LINE OF it_t_blntab,
ld_e_msgno  TYPE SY-MSGNO ,
ld_i_tcode  TYPE SY-TCODE ,
it_t_ftclear  TYPE STANDARD TABLE OF FTCLEAR ,
wa_t_ftclear  LIKE LINE OF it_t_ftclear,
ld_e_msgty  TYPE SY-MSGTY ,
ld_i_sgfunct  TYPE RFIPI-SGFUNCT ,
it_t_ftpost  TYPE STANDARD TABLE OF FTPOST ,
wa_t_ftpost  LIKE LINE OF it_t_ftpost,
ld_e_msgv1  TYPE SY-MSGV1 ,
ld_i_no_auth  TYPE STRING ,
it_t_fttax  TYPE STANDARD TABLE OF FTTAX ,
wa_t_fttax  LIKE LINE OF it_t_fttax,
ld_i_xsimu  TYPE CHAR1 ,
ld_e_msgv2  TYPE SY-MSGV2 ,
ld_e_msgv3  TYPE SY-MSGV3 ,
ld_e_msgv4  TYPE SY-MSGV4 ,
ld_e_subrc  TYPE SY-SUBRC .


SELECT single AUGLV
FROM T041A
INTO ld_i_auglv.


"populate fields of struture and append to itab
append wa_t_blntab to it_t_blntab.
ld_i_tcode = 'some text here'.

"populate fields of struture and append to itab
append wa_t_ftclear to it_t_ftclear.

ld_i_sgfunct = some text here

"populate fields of struture and append to itab
append wa_t_ftpost to it_t_ftpost.
ld_i_no_auth = 'some text here'.

"populate fields of struture and append to itab
append wa_t_fttax to it_t_fttax.
ld_i_xsimu = 'some text here'.

SAP Documentation for FM POSTING_INTERFACE_CLEARING


Processing with 'Call Transaction ... Using '
If processing takes place with 'Call Transaction .. Using', the ...See here for full SAP fm documentation

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name POSTING_INTERFACE_CLEARING or its description.