SAP CK_F_CSTG_STRUCTURE_EXPLOSION Function Module for Structure Explosion
CK_F_CSTG_STRUCTURE_EXPLOSION is a standard ck f cstg structure explosion SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Structure Explosion 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 ck f cstg structure explosion FM, simply by entering the name CK_F_CSTG_STRUCTURE_EXPLOSION into the relevant SAP transaction such as SE37 or SE38.
Function Group: CKST
Program Name: SAPLCKST
Main Program: SAPLCKST
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CK_F_CSTG_STRUCTURE_EXPLOSION 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 'CK_F_CSTG_STRUCTURE_EXPLOSION'"Structure Explosion.
EXPORTING
* KLVAR = "Costing variant
* S_ACCEPT_NULLMENGE = ' ' "
* S_AUFLOESUNGSTIEFE = "Explosion level
* S_READ_ONLY_DB = 'X' "Indic: Only read from the database
* S_ONLY_MAT_POS = ' ' "Indic: Only return material items
* S_EXPLODE_KF_TOO = ' ' "
* S_EXPLODE_RAW = ' ' "
* S_SKIP_TOTALS = 'X' "
* S_USE_KKE3_CACHE = ' ' "
* S_EXPLODE_BPO = ' ' "
* S_VUC_READ_ONLY_DB = ' ' "
KALNR = "Cost Estimate Number
KADKY = "Costing date
TVERS = "Costing version
WERK = "Plant
* SICHT = 01 "View
* S_LOSGR = ' ' "Passo on lot size/ref. qty
* S_BEZUGSMENGE = "Cost base for header material
* S_BEZUGSMENGENEINHEIT = "
IMPORTING
F_KEKO = "KEKO record for header material
F_HEADER_MAT = "Data for header material
S_AUFL_UNVOLLSTAENDIG = "
TABLES
STRUKTURTABELLE = "Results table
* T_KEKO_IMP = "KEKO from cstg memory required for preread
EXCEPTIONS
INVALID_BZOBJ = 1 KEKO_NOT_FOUND = 2 META_MODEL_ERROR = 3 CKHS_NOT_FOUND = 4
IMPORTING Parameters details for CK_F_CSTG_STRUCTURE_EXPLOSION
KLVAR - Costing variant
Data type: CKI64A-KLVAROptional: Yes
Call by Reference: No ( called with pass by value option)
S_ACCEPT_NULLMENGE -
Data type: CKI64A-SELKZDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_AUFLOESUNGSTIEFE - Explosion level
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
S_READ_ONLY_DB - Indic: Only read from the database
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_ONLY_MAT_POS - Indic: Only return material items
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_EXPLODE_KF_TOO -
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_EXPLODE_RAW -
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_SKIP_TOTALS -
Data type: XFELDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_USE_KKE3_CACHE -
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_EXPLODE_BPO -
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_VUC_READ_ONLY_DB -
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
KALNR - Cost Estimate Number
Data type: KEKO-KALNROptional: No
Call by Reference: No ( called with pass by value option)
KADKY - Costing date
Data type: KEKO-KADKYOptional: No
Call by Reference: No ( called with pass by value option)
TVERS - Costing version
Data type: KEKO-TVERSOptional: No
Call by Reference: No ( called with pass by value option)
WERK - Plant
Data type: CKI64A-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
SICHT - View
Data type: TCKH8-SICHTDefault: 01
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_LOSGR - Passo on lot size/ref. qty
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
S_BEZUGSMENGE - Cost base for header material
Data type: CKI64A-KOSMNGOptional: Yes
Call by Reference: No ( called with pass by value option)
S_BEZUGSMENGENEINHEIT -
Data type: CKI64A-MEINSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CK_F_CSTG_STRUCTURE_EXPLOSION
F_KEKO - KEKO record for header material
Data type: KEKOOptional: No
Call by Reference: No ( called with pass by value option)
F_HEADER_MAT - Data for header material
Data type: CK_STRUKTURTAB_HEADEROptional: No
Call by Reference: No ( called with pass by value option)
S_AUFL_UNVOLLSTAENDIG -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CK_F_CSTG_STRUCTURE_EXPLOSION
STRUKTURTABELLE - Results table
Data type: CK_STRUKTURTABOptional: No
Call by Reference: No ( called with pass by value option)
T_KEKO_IMP - KEKO from cstg memory required for preread
Data type: KEKOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_BZOBJ - Reference object is neither sales order nor material
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
KEKO_NOT_FOUND - No cost split found for initial material
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
META_MODEL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CKHS_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CK_F_CSTG_STRUCTURE_EXPLOSION 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_klvar | TYPE CKI64A-KLVAR, " | |||
| lv_f_keko | TYPE KEKO, " | |||
| lv_invalid_bzobj | TYPE KEKO, " | |||
| lt_strukturtabelle | TYPE STANDARD TABLE OF CK_STRUKTURTAB, " | |||
| lv_s_accept_nullmenge | TYPE CKI64A-SELKZ, " ' ' | |||
| lv_s_aufloesungstiefe | TYPE I, " | |||
| lv_s_read_only_db | TYPE XFELD, " 'X' | |||
| lv_s_only_mat_pos | TYPE XFELD, " ' ' | |||
| lv_s_explode_kf_too | TYPE XFELD, " ' ' | |||
| lv_s_explode_raw | TYPE XFELD, " ' ' | |||
| lv_s_skip_totals | TYPE XFELD, " 'X' | |||
| lv_s_use_kke3_cache | TYPE XFELD, " ' ' | |||
| lv_s_explode_bpo | TYPE XFELD, " ' ' | |||
| lv_s_vuc_read_only_db | TYPE XFELD, " ' ' | |||
| lv_kalnr | TYPE KEKO-KALNR, " | |||
| lt_t_keko_imp | TYPE STANDARD TABLE OF KEKO, " | |||
| lv_f_header_mat | TYPE CK_STRUKTURTAB_HEADER, " | |||
| lv_keko_not_found | TYPE CK_STRUKTURTAB_HEADER, " | |||
| lv_kadky | TYPE KEKO-KADKY, " | |||
| lv_meta_model_error | TYPE KEKO, " | |||
| lv_s_aufl_unvollstaendig | TYPE C, " | |||
| lv_tvers | TYPE KEKO-TVERS, " | |||
| lv_ckhs_not_found | TYPE KEKO, " | |||
| lv_werk | TYPE CKI64A-WERKS, " | |||
| lv_sicht | TYPE TCKH8-SICHT, " 01 | |||
| lv_s_losgr | TYPE XFELD, " ' ' | |||
| lv_s_bezugsmenge | TYPE CKI64A-KOSMNG, " | |||
| lv_s_bezugsmengeneinheit | TYPE CKI64A-MEINS. " |
|   CALL FUNCTION 'CK_F_CSTG_STRUCTURE_EXPLOSION' "Structure Explosion |
| EXPORTING | ||
| KLVAR | = lv_klvar | |
| S_ACCEPT_NULLMENGE | = lv_s_accept_nullmenge | |
| S_AUFLOESUNGSTIEFE | = lv_s_aufloesungstiefe | |
| S_READ_ONLY_DB | = lv_s_read_only_db | |
| S_ONLY_MAT_POS | = lv_s_only_mat_pos | |
| S_EXPLODE_KF_TOO | = lv_s_explode_kf_too | |
| S_EXPLODE_RAW | = lv_s_explode_raw | |
| S_SKIP_TOTALS | = lv_s_skip_totals | |
| S_USE_KKE3_CACHE | = lv_s_use_kke3_cache | |
| S_EXPLODE_BPO | = lv_s_explode_bpo | |
| S_VUC_READ_ONLY_DB | = lv_s_vuc_read_only_db | |
| KALNR | = lv_kalnr | |
| KADKY | = lv_kadky | |
| TVERS | = lv_tvers | |
| WERK | = lv_werk | |
| SICHT | = lv_sicht | |
| S_LOSGR | = lv_s_losgr | |
| S_BEZUGSMENGE | = lv_s_bezugsmenge | |
| S_BEZUGSMENGENEINHEIT | = lv_s_bezugsmengeneinheit | |
| IMPORTING | ||
| F_KEKO | = lv_f_keko | |
| F_HEADER_MAT | = lv_f_header_mat | |
| S_AUFL_UNVOLLSTAENDIG | = lv_s_aufl_unvollstaendig | |
| TABLES | ||
| STRUKTURTABELLE | = lt_strukturtabelle | |
| T_KEKO_IMP | = lt_t_keko_imp | |
| EXCEPTIONS | ||
| INVALID_BZOBJ = 1 | ||
| KEKO_NOT_FOUND = 2 | ||
| META_MODEL_ERROR = 3 | ||
| CKHS_NOT_FOUND = 4 | ||
| . " CK_F_CSTG_STRUCTURE_EXPLOSION | ||
ABAP code using 7.40 inline data declarations to call FM CK_F_CSTG_STRUCTURE_EXPLOSION
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 KLVAR FROM CKI64A INTO @DATA(ld_klvar). | ||||
| "SELECT single SELKZ FROM CKI64A INTO @DATA(ld_s_accept_nullmenge). | ||||
| DATA(ld_s_accept_nullmenge) | = ' '. | |||
| DATA(ld_s_read_only_db) | = 'X'. | |||
| DATA(ld_s_only_mat_pos) | = ' '. | |||
| DATA(ld_s_explode_kf_too) | = ' '. | |||
| DATA(ld_s_explode_raw) | = ' '. | |||
| DATA(ld_s_skip_totals) | = 'X'. | |||
| DATA(ld_s_use_kke3_cache) | = ' '. | |||
| DATA(ld_s_explode_bpo) | = ' '. | |||
| DATA(ld_s_vuc_read_only_db) | = ' '. | |||
| "SELECT single KALNR FROM KEKO INTO @DATA(ld_kalnr). | ||||
| "SELECT single KADKY FROM KEKO INTO @DATA(ld_kadky). | ||||
| "SELECT single TVERS FROM KEKO INTO @DATA(ld_tvers). | ||||
| "SELECT single WERKS FROM CKI64A INTO @DATA(ld_werk). | ||||
| "SELECT single SICHT FROM TCKH8 INTO @DATA(ld_sicht). | ||||
| DATA(ld_sicht) | = 01. | |||
| DATA(ld_s_losgr) | = ' '. | |||
| "SELECT single KOSMNG FROM CKI64A INTO @DATA(ld_s_bezugsmenge). | ||||
| "SELECT single MEINS FROM CKI64A INTO @DATA(ld_s_bezugsmengeneinheit). | ||||
Search for further information about these or an SAP related objects