SAP RK_CHECK_DELETE_CONDITIONS_CO Function Module for Check Permission to Delete Transaction Data in Controlling Area
RK_CHECK_DELETE_CONDITIONS_CO is a standard rk check delete conditions co SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check Permission to Delete Transaction Data in Controlling Area 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 rk check delete conditions co FM, simply by entering the name RK_CHECK_DELETE_CONDITIONS_CO into the relevant SAP transaction such as SE37 or SE38.
Function Group: COZT
Program Name: SAPLCOZT
Main Program: SAPLCOZT
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RK_CHECK_DELETE_CONDITIONS_CO 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 'RK_CHECK_DELETE_CONDITIONS_CO'"Check Permission to Delete Transaction Data in Controlling Area.
EXPORTING
* KOKRS = V_KOKRS "Controlling area
TABLES
* BUKTAB = "Structure: TKA02-KOKRS, TKA02-BUKR
* XCOBK = "CO document headers
EXCEPTIONS
FOREIGN_BUKRS_DATAS_IN_KOKRS = 1 KOKRS_NOT_FOUND = 2 KOKRS_WITHOUT_BUKRS = 3 NOT_ALL_CO_DATAS_DELETE = 4 NO_DATAS = 5 PRODUCTIVE_BUKRS_IN_KOKRS = 6
IMPORTING Parameters details for RK_CHECK_DELETE_CONDITIONS_CO
KOKRS - Controlling area
Data type: TKA01-KOKRSDefault: V_KOKRS
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RK_CHECK_DELETE_CONDITIONS_CO
BUKTAB - Structure: TKA02-KOKRS, TKA02-BUKR
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
XCOBK - CO document headers
Data type: COBKOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FOREIGN_BUKRS_DATAS_IN_KOKRS - Data from non-allocated product. C
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
KOKRS_NOT_FOUND - Controlling company code does not
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
KOKRS_WITHOUT_BUKRS - ContA without allocation of CCode
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_ALL_CO_DATAS_DELETE - not all CCode data lies in ContA
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_DATAS - there is no transaction data
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PRODUCTIVE_BUKRS_IN_KOKRS - CArea contains data from productiv
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RK_CHECK_DELETE_CONDITIONS_CO 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_kokrs | TYPE TKA01-KOKRS, " V_KOKRS | |||
| lt_buktab | TYPE STANDARD TABLE OF TKA01, " | |||
| lv_foreign_bukrs_datas_in_kokrs | TYPE TKA01, " | |||
| lt_xcobk | TYPE STANDARD TABLE OF COBK, " | |||
| lv_kokrs_not_found | TYPE COBK, " | |||
| lv_kokrs_without_bukrs | TYPE COBK, " | |||
| lv_not_all_co_datas_delete | TYPE COBK, " | |||
| lv_no_datas | TYPE COBK, " | |||
| lv_productive_bukrs_in_kokrs | TYPE COBK. " |
|   CALL FUNCTION 'RK_CHECK_DELETE_CONDITIONS_CO' "Check Permission to Delete Transaction Data in Controlling Area |
| EXPORTING | ||
| KOKRS | = lv_kokrs | |
| TABLES | ||
| BUKTAB | = lt_buktab | |
| XCOBK | = lt_xcobk | |
| EXCEPTIONS | ||
| FOREIGN_BUKRS_DATAS_IN_KOKRS = 1 | ||
| KOKRS_NOT_FOUND = 2 | ||
| KOKRS_WITHOUT_BUKRS = 3 | ||
| NOT_ALL_CO_DATAS_DELETE = 4 | ||
| NO_DATAS = 5 | ||
| PRODUCTIVE_BUKRS_IN_KOKRS = 6 | ||
| . " RK_CHECK_DELETE_CONDITIONS_CO | ||
ABAP code using 7.40 inline data declarations to call FM RK_CHECK_DELETE_CONDITIONS_CO
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 KOKRS FROM TKA01 INTO @DATA(ld_kokrs). | ||||
| DATA(ld_kokrs) | = V_KOKRS. | |||
Search for further information about these or an SAP related objects