SAP FKK_PAYMENT_ALLOC_AND_CLEARING Function Module for
FKK_PAYMENT_ALLOC_AND_CLEARING is a standard fkk payment alloc and clearing SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 fkk payment alloc and clearing FM, simply by entering the name FKK_PAYMENT_ALLOC_AND_CLEARING into the relevant SAP transaction such as SE37 or SE38.
Function Group: FKK_CLRG
Program Name: SAPLFKK_CLRG
Main Program: SAPLFKK_CLRG
Appliation area: E
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FKK_PAYMENT_ALLOC_AND_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 'FKK_PAYMENT_ALLOC_AND_CLEARING'".
EXPORTING
I_FKKKO = "Header Data for Clearing Document
* I_POST_ON_ACCOUNT = ' ' "
* I_USE_AS_PROPOSAL = ' ' "
* I_VERART = ' ' "Clearing Type For Clearing Postings
IMPORTING
E_KLAEH = "
E_DIFFB = "
TABLES
* T_FKKOP = "
* T_FKKOPK = "
T_FKKCL = "Open items that can be cleared
* T_FKKOP_NEW = "New open items (for example, for payments on account)
* T_FKKOPK_NEW = "New offsetting items (for example, for write-offs)
* T_SELTAB = "Table of Selections
IMPORTING Parameters details for FKK_PAYMENT_ALLOC_AND_CLEARING
I_FKKKO - Header Data for Clearing Document
Data type: FKKKOOptional: No
Call by Reference: No ( called with pass by value option)
I_POST_ON_ACCOUNT -
Data type: DFKKZP-XAKONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_USE_AS_PROPOSAL -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_VERART - Clearing Type For Clearing Postings
Data type: VERART_KKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FKK_PAYMENT_ALLOC_AND_CLEARING
E_KLAEH -
Data type: DFKKZP-KLAEHOptional: No
Call by Reference: No ( called with pass by value option)
E_DIFFB -
Data type: RFKB4-DIFFBOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FKK_PAYMENT_ALLOC_AND_CLEARING
T_FKKOP -
Data type: FKKOPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FKKOPK -
Data type: FKKOPKOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FKKCL - Open items that can be cleared
Data type: FKKCLOptional: No
Call by Reference: No ( called with pass by value option)
T_FKKOP_NEW - New open items (for example, for payments on account)
Data type: FKKOPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FKKOPK_NEW - New offsetting items (for example, for write-offs)
Data type: FKKOPKOptional: Yes
Call by Reference: No ( called with pass by value option)
T_SELTAB - Table of Selections
Data type: ISELTABOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FKK_PAYMENT_ALLOC_AND_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_klaeh | TYPE DFKKZP-KLAEH, " | |||
| lv_i_fkkko | TYPE FKKKO, " | |||
| lt_t_fkkop | TYPE STANDARD TABLE OF FKKOP, " | |||
| lv_e_diffb | TYPE RFKB4-DIFFB, " | |||
| lt_t_fkkopk | TYPE STANDARD TABLE OF FKKOPK, " | |||
| lv_i_post_on_account | TYPE DFKKZP-XAKON, " SPACE | |||
| lt_t_fkkcl | TYPE STANDARD TABLE OF FKKCL, " | |||
| lv_i_use_as_proposal | TYPE BOOLE-BOOLE, " SPACE | |||
| lv_i_verart | TYPE VERART_KK, " SPACE | |||
| lt_t_fkkop_new | TYPE STANDARD TABLE OF FKKOP, " | |||
| lt_t_fkkopk_new | TYPE STANDARD TABLE OF FKKOPK, " | |||
| lt_t_seltab | TYPE STANDARD TABLE OF ISELTAB. " |
|   CALL FUNCTION 'FKK_PAYMENT_ALLOC_AND_CLEARING' " |
| EXPORTING | ||
| I_FKKKO | = lv_i_fkkko | |
| I_POST_ON_ACCOUNT | = lv_i_post_on_account | |
| I_USE_AS_PROPOSAL | = lv_i_use_as_proposal | |
| I_VERART | = lv_i_verart | |
| IMPORTING | ||
| E_KLAEH | = lv_e_klaeh | |
| E_DIFFB | = lv_e_diffb | |
| TABLES | ||
| T_FKKOP | = lt_t_fkkop | |
| T_FKKOPK | = lt_t_fkkopk | |
| T_FKKCL | = lt_t_fkkcl | |
| T_FKKOP_NEW | = lt_t_fkkop_new | |
| T_FKKOPK_NEW | = lt_t_fkkopk_new | |
| T_SELTAB | = lt_t_seltab | |
| . " FKK_PAYMENT_ALLOC_AND_CLEARING | ||
ABAP code using 7.40 inline data declarations to call FM FKK_PAYMENT_ALLOC_AND_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 KLAEH FROM DFKKZP INTO @DATA(ld_e_klaeh). | ||||
| "SELECT single DIFFB FROM RFKB4 INTO @DATA(ld_e_diffb). | ||||
| "SELECT single XAKON FROM DFKKZP INTO @DATA(ld_i_post_on_account). | ||||
| DATA(ld_i_post_on_account) | = ' '. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_use_as_proposal). | ||||
| DATA(ld_i_use_as_proposal) | = ' '. | |||
| DATA(ld_i_verart) | = ' '. | |||
Search for further information about these or an SAP related objects