SAP FKK_CD_REVERSE_DOC Function Module for Cancel Payment Document
FKK_CD_REVERSE_DOC is a standard fkk cd 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 Payment Document 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 cd reverse doc FM, simply by entering the name FKK_CD_REVERSE_DOC into the relevant SAP transaction such as SE37 or SE38.
Function Group: FKH0
Program Name: SAPLFKH0
Main Program: SAPLFKH0
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FKK_CD_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 'FKK_CD_REVERSE_DOC'"Cancel Payment Document.
EXPORTING
I_OPBEL = "Number of a Contract Accounts Receivable and Payable Document
* I_BLART = "Document Type
* I_AUGRD = "Clearing Reason
* I_HERKF = "Document Origin Key
* I_EXTSERV = "
* I_SIMU = ' ' "
* I_STDAT = "
IMPORTING
E_REVERSED = "Table Type for RFKH10
CHANGING
C_RFKH0 = "Screen Fields for FKH0 - FI-CA Cash Payments
EXCEPTIONS
FAILED = 1
IMPORTING Parameters details for FKK_CD_REVERSE_DOC
I_OPBEL - Number of a Contract Accounts Receivable and Payable Document
Data type: OPBEL_KKOptional: No
Call by Reference: Yes
I_BLART - Document Type
Data type: BLART_KKOptional: Yes
Call by Reference: Yes
I_AUGRD - Clearing Reason
Data type: AUGRD_KKOptional: Yes
Call by Reference: Yes
I_HERKF - Document Origin Key
Data type: HERKF_KKOptional: Yes
Call by Reference: Yes
I_EXTSERV -
Data type: XFELDOptional: Yes
Call by Reference: Yes
I_SIMU -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_STDAT -
Data type: STODT_KKOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FKK_CD_REVERSE_DOC
E_REVERSED - Table Type for RFKH10
Data type: RFKH10_TOptional: No
Call by Reference: Yes
CHANGING Parameters details for FKK_CD_REVERSE_DOC
C_RFKH0 - Screen Fields for FKH0 - FI-CA Cash Payments
Data type: RFKH0Optional: No
Call by Reference: Yes
EXCEPTIONS details
FAILED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FKK_CD_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_failed | TYPE STRING, " | |||
| lv_c_rfkh0 | TYPE RFKH0, " | |||
| lv_i_opbel | TYPE OPBEL_KK, " | |||
| lv_e_reversed | TYPE RFKH10_T, " | |||
| lv_i_blart | TYPE BLART_KK, " | |||
| lv_i_augrd | TYPE AUGRD_KK, " | |||
| lv_i_herkf | TYPE HERKF_KK, " | |||
| lv_i_extserv | TYPE XFELD, " | |||
| lv_i_simu | TYPE BOOLE-BOOLE, " SPACE | |||
| lv_i_stdat | TYPE STODT_KK. " |
|   CALL FUNCTION 'FKK_CD_REVERSE_DOC' "Cancel Payment Document |
| EXPORTING | ||
| I_OPBEL | = lv_i_opbel | |
| I_BLART | = lv_i_blart | |
| I_AUGRD | = lv_i_augrd | |
| I_HERKF | = lv_i_herkf | |
| I_EXTSERV | = lv_i_extserv | |
| I_SIMU | = lv_i_simu | |
| I_STDAT | = lv_i_stdat | |
| IMPORTING | ||
| E_REVERSED | = lv_e_reversed | |
| CHANGING | ||
| C_RFKH0 | = lv_c_rfkh0 | |
| EXCEPTIONS | ||
| FAILED = 1 | ||
| . " FKK_CD_REVERSE_DOC | ||
ABAP code using 7.40 inline data declarations to call FM FKK_CD_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 BOOLE FROM BOOLE INTO @DATA(ld_i_simu). | ||||
| DATA(ld_i_simu) | = ' '. | |||
Search for further information about these or an SAP related objects