SAP FKK_SAMPLE_0254 Function Module for Reversal of Payment Document from Locked Checks
FKK_SAMPLE_0254 is a standard fkk sample 0254 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reversal of Payment Document from Locked Checks 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 fkk sample 0254 FM, simply by entering the name FKK_SAMPLE_0254 into the relevant SAP transaction such as SE37 or SE38.
Function Group: FKCHKREP
Program Name: SAPLFKCHKREP
Main Program: SAPLFKCHKREP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FKK_SAMPLE_0254 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_SAMPLE_0254'"Reversal of Payment Document from Locked Checks.
EXPORTING
I_CHECK = "Repository For Checks
I_BLART = "Document Type
* I_AUGRD = '05' "Clearing Reason
* I_HERKF = '02' "Document Origin Key
I_FIKEY = "Reconciliation Key for General Ledger
* I_VOIDR = ' ' "Alternative Voiding Reason
I_TFKVOID = "Reasons for Check Voiding
EXCEPTIONS
NO_REVERSE = 1
IMPORTING Parameters details for FKK_SAMPLE_0254
I_CHECK - Repository For Checks
Data type: FKKCROptional: No
Call by Reference: Yes
I_BLART - Document Type
Data type: FKKKO-BLARTOptional: No
Call by Reference: Yes
I_AUGRD - Clearing Reason
Data type: FKKOP-AUGRDDefault: '05'
Optional: Yes
Call by Reference: Yes
I_HERKF - Document Origin Key
Data type: FKKKO-HERKFDefault: '02'
Optional: Yes
Call by Reference: Yes
I_FIKEY - Reconciliation Key for General Ledger
Data type: FKKKO-FIKEYOptional: No
Call by Reference: Yes
I_VOIDR - Alternative Voiding Reason
Data type: VOIDREAS_KKDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_TFKVOID - Reasons for Check Voiding
Data type: TFKVOIDOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_REVERSE - No Reversal of Payment Document Executed
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FKK_SAMPLE_0254 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_check | TYPE FKKCR, " | |||
| lv_no_reverse | TYPE FKKCR, " | |||
| lv_i_blart | TYPE FKKKO-BLART, " | |||
| lv_i_augrd | TYPE FKKOP-AUGRD, " '05' | |||
| lv_i_herkf | TYPE FKKKO-HERKF, " '02' | |||
| lv_i_fikey | TYPE FKKKO-FIKEY, " | |||
| lv_i_voidr | TYPE VOIDREAS_KK, " SPACE | |||
| lv_i_tfkvoid | TYPE TFKVOID. " |
|   CALL FUNCTION 'FKK_SAMPLE_0254' "Reversal of Payment Document from Locked Checks |
| EXPORTING | ||
| I_CHECK | = lv_i_check | |
| I_BLART | = lv_i_blart | |
| I_AUGRD | = lv_i_augrd | |
| I_HERKF | = lv_i_herkf | |
| I_FIKEY | = lv_i_fikey | |
| I_VOIDR | = lv_i_voidr | |
| I_TFKVOID | = lv_i_tfkvoid | |
| EXCEPTIONS | ||
| NO_REVERSE = 1 | ||
| . " FKK_SAMPLE_0254 | ||
ABAP code using 7.40 inline data declarations to call FM FKK_SAMPLE_0254
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 BLART FROM FKKKO INTO @DATA(ld_i_blart). | ||||
| "SELECT single AUGRD FROM FKKOP INTO @DATA(ld_i_augrd). | ||||
| DATA(ld_i_augrd) | = '05'. | |||
| "SELECT single HERKF FROM FKKKO INTO @DATA(ld_i_herkf). | ||||
| DATA(ld_i_herkf) | = '02'. | |||
| "SELECT single FIKEY FROM FKKKO INTO @DATA(ld_i_fikey). | ||||
| DATA(ld_i_voidr) | = ' '. | |||
Search for further information about these or an SAP related objects