SAP K_KOSTL_WHERE_USED_CHECK Function Module for
K_KOSTL_WHERE_USED_CHECK is a standard k kostl where used check 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 k kostl where used check FM, simply by entering the name K_KOSTL_WHERE_USED_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: KAMM
Program Name: SAPLKAMM
Main Program: SAPLKAMM
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function K_KOSTL_WHERE_USED_CHECK 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 'K_KOSTL_WHERE_USED_CHECK'".
EXPORTING
OBJNR = "
* CALC_CHECK = "
* DATAB = "
* DATBI = "
KOKRS = "
* CHECK_ONLY = ' ' "
* ORDER_CHECK = "
* WBS_CHECK = "
* ASSET_CHECK = "
* CATS_CHECK = "
IMPORTING
DATA_EXIST = "
TAB_NAME = "
TABLES
* IT_COBRB = "
* IT_CATSMM = "
* IT_PTEX2000 = "
* IT_PTEX2010 = "
* IT_COIFT = "
* IT_T683S = "
* IT_RESULT_OM = "
* IT_RESULT_PA = "
* IT_AUFK = "
* IT_PRPS = "
* IT_TIMEDEPENDENTDATA = "
* IT_CATSCO = "
* IT_CATSPS = "
* IT_CATSPM = "
EXCEPTIONS
ERROR_OCCURED = 1
IMPORTING Parameters details for K_KOSTL_WHERE_USED_CHECK
OBJNR -
Data type: J_OBJNROptional: No
Call by Reference: No ( called with pass by value option)
CALC_CHECK -
Data type: COptional: Yes
Call by Reference: Yes
DATAB -
Data type: DATABOptional: Yes
Call by Reference: No ( called with pass by value option)
DATBI -
Data type: DATBIOptional: Yes
Call by Reference: No ( called with pass by value option)
KOKRS -
Data type: KOKRSOptional: No
Call by Reference: No ( called with pass by value option)
CHECK_ONLY -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ORDER_CHECK -
Data type: COptional: Yes
Call by Reference: Yes
WBS_CHECK -
Data type: COptional: Yes
Call by Reference: Yes
ASSET_CHECK -
Data type: COptional: Yes
Call by Reference: Yes
CATS_CHECK -
Data type: COptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for K_KOSTL_WHERE_USED_CHECK
DATA_EXIST -
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
TAB_NAME -
Data type: TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for K_KOSTL_WHERE_USED_CHECK
IT_COBRB -
Data type: COBRBOptional: Yes
Call by Reference: Yes
IT_CATSMM -
Data type: CATSMMOptional: Yes
Call by Reference: Yes
IT_PTEX2000 -
Data type: PTEX2000Optional: Yes
Call by Reference: Yes
IT_PTEX2010 -
Data type: PTEX2010Optional: Yes
Call by Reference: Yes
IT_COIFT -
Data type: COIFTOptional: Yes
Call by Reference: Yes
IT_T683S -
Data type: T683SOptional: Yes
Call by Reference: Yes
IT_RESULT_OM -
Data type: KGAL_RESULTOptional: Yes
Call by Reference: Yes
IT_RESULT_PA -
Data type: KGAL_RESULTOptional: Yes
Call by Reference: Yes
IT_AUFK -
Data type: AUFK_WUOptional: Yes
Call by Reference: Yes
IT_PRPS -
Data type: PRPS_WUOptional: Yes
Call by Reference: Yes
IT_TIMEDEPENDENTDATA -
Data type: BAPI1022_FEGLG003_PIDOptional: Yes
Call by Reference: Yes
IT_CATSCO -
Data type: CATSCOOptional: Yes
Call by Reference: Yes
IT_CATSPS -
Data type: CATSPSOptional: Yes
Call by Reference: Yes
IT_CATSPM -
Data type: CATSPMOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
ERROR_OCCURED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for K_KOSTL_WHERE_USED_CHECK 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_objnr | TYPE J_OBJNR, " | |||
| lt_it_cobrb | TYPE STANDARD TABLE OF COBRB, " | |||
| lv_data_exist | TYPE CHAR1, " | |||
| lv_error_occured | TYPE CHAR1, " | |||
| lt_it_catsmm | TYPE STANDARD TABLE OF CATSMM, " | |||
| lv_calc_check | TYPE C, " | |||
| lt_it_ptex2000 | TYPE STANDARD TABLE OF PTEX2000, " | |||
| lt_it_ptex2010 | TYPE STANDARD TABLE OF PTEX2010, " | |||
| lt_it_coift | TYPE STANDARD TABLE OF COIFT, " | |||
| lt_it_t683s | TYPE STANDARD TABLE OF T683S, " | |||
| lv_datab | TYPE DATAB, " | |||
| lv_tab_name | TYPE TABNAME, " | |||
| lt_it_result_om | TYPE STANDARD TABLE OF KGAL_RESULT, " | |||
| lv_datbi | TYPE DATBI, " | |||
| lt_it_result_pa | TYPE STANDARD TABLE OF KGAL_RESULT, " | |||
| lv_kokrs | TYPE KOKRS, " | |||
| lt_it_aufk | TYPE STANDARD TABLE OF AUFK_WU, " | |||
| lt_it_prps | TYPE STANDARD TABLE OF PRPS_WU, " | |||
| lv_check_only | TYPE CHAR1, " SPACE | |||
| lv_order_check | TYPE C, " | |||
| lt_it_timedependentdata | TYPE STANDARD TABLE OF BAPI1022_FEGLG003_PID, " | |||
| lt_it_catsco | TYPE STANDARD TABLE OF CATSCO, " | |||
| lv_wbs_check | TYPE C, " | |||
| lt_it_catsps | TYPE STANDARD TABLE OF CATSPS, " | |||
| lv_asset_check | TYPE C, " | |||
| lt_it_catspm | TYPE STANDARD TABLE OF CATSPM, " | |||
| lv_cats_check | TYPE C. " |
|   CALL FUNCTION 'K_KOSTL_WHERE_USED_CHECK' " |
| EXPORTING | ||
| OBJNR | = lv_objnr | |
| CALC_CHECK | = lv_calc_check | |
| DATAB | = lv_datab | |
| DATBI | = lv_datbi | |
| KOKRS | = lv_kokrs | |
| CHECK_ONLY | = lv_check_only | |
| ORDER_CHECK | = lv_order_check | |
| WBS_CHECK | = lv_wbs_check | |
| ASSET_CHECK | = lv_asset_check | |
| CATS_CHECK | = lv_cats_check | |
| IMPORTING | ||
| DATA_EXIST | = lv_data_exist | |
| TAB_NAME | = lv_tab_name | |
| TABLES | ||
| IT_COBRB | = lt_it_cobrb | |
| IT_CATSMM | = lt_it_catsmm | |
| IT_PTEX2000 | = lt_it_ptex2000 | |
| IT_PTEX2010 | = lt_it_ptex2010 | |
| IT_COIFT | = lt_it_coift | |
| IT_T683S | = lt_it_t683s | |
| IT_RESULT_OM | = lt_it_result_om | |
| IT_RESULT_PA | = lt_it_result_pa | |
| IT_AUFK | = lt_it_aufk | |
| IT_PRPS | = lt_it_prps | |
| IT_TIMEDEPENDENTDATA | = lt_it_timedependentdata | |
| IT_CATSCO | = lt_it_catsco | |
| IT_CATSPS | = lt_it_catsps | |
| IT_CATSPM | = lt_it_catspm | |
| EXCEPTIONS | ||
| ERROR_OCCURED = 1 | ||
| . " K_KOSTL_WHERE_USED_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM K_KOSTL_WHERE_USED_CHECK
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.| DATA(ld_check_only) | = ' '. | |||
Search for further information about these or an SAP related objects