SAP K_KKB_STRUC_EXPLOSION Function Module for









K_KKB_STRUC_EXPLOSION is a standard k kkb struc explosion 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 kkb struc explosion FM, simply by entering the name K_KKB_STRUC_EXPLOSION into the relevant SAP transaction such as SE37 or SE38.

Function Group: KKB2
Program Name: SAPLKKB2
Main Program: SAPLKKB2
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function K_KKB_STRUC_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 'K_KKB_STRUC_EXPLOSION'"
EXPORTING
* I_MATNR = "Material Number
* I_LOSGR = "Lot Size
* I_CALC_QUAN = 'X' "
* I_ONLY_M = 'X' "'X': Only Material Items
* I_SUM_NODES = ' ' "
* I_TIEFE = 1 "
* I_OBJW = 'X' "'X': Object Currency
* I_ANW = '8' "
* I_CHOICE_J = 'X' "'X': Report Group Selection
* I_CHOICE_K = 'X' "'X': Cost Element Selection
* I_SICHT = '01' "Cost Component View
* I_WERK = "Plant
* I_KST = ' ' "Cost Element Group for Report
* I_RGJNR = '7EE0' "Report
* I_KALNR = "
* I_GRID = ' ' "
* I_KEKO = "Product Costing - Header Data
* I_VARIANT = "Layout (External Use)
* I_VBELN = "Sales Order Number
* I_POSNR = "Item Number
* I_KALKVAR = "Costing Variant
* I_KALKVERS = '01' "Costing Version
* I_KADKY = SY-DATLO "Costing Date
* I_KALNR_BA = "Procurement Alternative
* I_ERZKA = 'X' "

EXCEPTIONS
WRONG_INPUT = 1 NOT_FOUND = 2
.



IMPORTING Parameters details for K_KKB_STRUC_EXPLOSION

I_MATNR - Material Number

Data type: KEKO-MATNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LOSGR - Lot Size

Data type: KEKO-LOSGR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CALC_QUAN -

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ONLY_M - 'X': Only Material Items

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SUM_NODES -

Data type: C
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TIEFE -

Data type: I
Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_OBJW - 'X': Object Currency

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ANW -

Data type: TKKB1-ANW
Default: '8'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CHOICE_J - 'X': Report Group Selection

Data type: TKKB1-OBJ
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CHOICE_K - 'X': Cost Element Selection

Data type: TKKB1-OBJ
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SICHT - Cost Component View

Data type: KKBE-SICHT
Default: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WERK - Plant

Data type: KEKO-WERKS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KST - Cost Element Group for Report

Data type: TKKB2-KST
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RGJNR - Report

Data type: TKKB1-BGR
Default: '7EE0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KALNR -

Data type: KEKO-KALNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_GRID -

Data type: C
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KEKO - Product Costing - Header Data

Data type: KEKO
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VARIANT - Layout (External Use)

Data type: DISVARIANT
Optional: Yes
Call by Reference: Yes

I_VBELN - Sales Order Number

Data type: VBAP-VBELN
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_POSNR - Item Number

Data type: VBAP-POSNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KALKVAR - Costing Variant

Data type: KEKO-KLVAR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KALKVERS - Costing Version

Data type: KEKO-TVERS
Default: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KADKY - Costing Date

Data type: KEKO-KADKY
Default: SY-DATLO
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KALNR_BA - Procurement Alternative

Data type: KEKO-KALNR_BA
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ERZKA -

Data type: KEKO-ERZKA
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

WRONG_INPUT - No cost estimate found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_FOUND - No cost estimate found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for K_KKB_STRUC_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_i_matnr  TYPE KEKO-MATNR, "   
lv_wrong_input  TYPE KEKO, "   
lv_i_losgr  TYPE KEKO-LOSGR, "   
lv_i_calc_quan  TYPE C, "   'X'
lv_i_only_m  TYPE C, "   'X'
lv_i_sum_nodes  TYPE C, "   ' '
lv_i_tiefe  TYPE I, "   1
lv_i_objw  TYPE C, "   'X'
lv_i_anw  TYPE TKKB1-ANW, "   '8'
lv_i_choice_j  TYPE TKKB1-OBJ, "   'X'
lv_i_choice_k  TYPE TKKB1-OBJ, "   'X'
lv_i_sicht  TYPE KKBE-SICHT, "   '01'
lv_i_werk  TYPE KEKO-WERKS, "   
lv_not_found  TYPE KEKO, "   
lv_i_kst  TYPE TKKB2-KST, "   SPACE
lv_i_rgjnr  TYPE TKKB1-BGR, "   '7EE0'
lv_i_kalnr  TYPE KEKO-KALNR, "   
lv_i_grid  TYPE C, "   ' '
lv_i_keko  TYPE KEKO, "   
lv_i_variant  TYPE DISVARIANT, "   
lv_i_vbeln  TYPE VBAP-VBELN, "   
lv_i_posnr  TYPE VBAP-POSNR, "   
lv_i_kalkvar  TYPE KEKO-KLVAR, "   
lv_i_kalkvers  TYPE KEKO-TVERS, "   '01'
lv_i_kadky  TYPE KEKO-KADKY, "   SY-DATLO
lv_i_kalnr_ba  TYPE KEKO-KALNR_BA, "   
lv_i_erzka  TYPE KEKO-ERZKA. "   'X'

  CALL FUNCTION 'K_KKB_STRUC_EXPLOSION'  "
    EXPORTING
         I_MATNR = lv_i_matnr
         I_LOSGR = lv_i_losgr
         I_CALC_QUAN = lv_i_calc_quan
         I_ONLY_M = lv_i_only_m
         I_SUM_NODES = lv_i_sum_nodes
         I_TIEFE = lv_i_tiefe
         I_OBJW = lv_i_objw
         I_ANW = lv_i_anw
         I_CHOICE_J = lv_i_choice_j
         I_CHOICE_K = lv_i_choice_k
         I_SICHT = lv_i_sicht
         I_WERK = lv_i_werk
         I_KST = lv_i_kst
         I_RGJNR = lv_i_rgjnr
         I_KALNR = lv_i_kalnr
         I_GRID = lv_i_grid
         I_KEKO = lv_i_keko
         I_VARIANT = lv_i_variant
         I_VBELN = lv_i_vbeln
         I_POSNR = lv_i_posnr
         I_KALKVAR = lv_i_kalkvar
         I_KALKVERS = lv_i_kalkvers
         I_KADKY = lv_i_kadky
         I_KALNR_BA = lv_i_kalnr_ba
         I_ERZKA = lv_i_erzka
    EXCEPTIONS
        WRONG_INPUT = 1
        NOT_FOUND = 2
. " K_KKB_STRUC_EXPLOSION




ABAP code using 7.40 inline data declarations to call FM K_KKB_STRUC_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 MATNR FROM KEKO INTO @DATA(ld_i_matnr).
 
 
"SELECT single LOSGR FROM KEKO INTO @DATA(ld_i_losgr).
 
DATA(ld_i_calc_quan) = 'X'.
 
DATA(ld_i_only_m) = 'X'.
 
DATA(ld_i_sum_nodes) = ' '.
 
DATA(ld_i_tiefe) = 1.
 
DATA(ld_i_objw) = 'X'.
 
"SELECT single ANW FROM TKKB1 INTO @DATA(ld_i_anw).
DATA(ld_i_anw) = '8'.
 
"SELECT single OBJ FROM TKKB1 INTO @DATA(ld_i_choice_j).
DATA(ld_i_choice_j) = 'X'.
 
"SELECT single OBJ FROM TKKB1 INTO @DATA(ld_i_choice_k).
DATA(ld_i_choice_k) = 'X'.
 
"SELECT single SICHT FROM KKBE INTO @DATA(ld_i_sicht).
DATA(ld_i_sicht) = '01'.
 
"SELECT single WERKS FROM KEKO INTO @DATA(ld_i_werk).
 
 
"SELECT single KST FROM TKKB2 INTO @DATA(ld_i_kst).
DATA(ld_i_kst) = ' '.
 
"SELECT single BGR FROM TKKB1 INTO @DATA(ld_i_rgjnr).
DATA(ld_i_rgjnr) = '7EE0'.
 
"SELECT single KALNR FROM KEKO INTO @DATA(ld_i_kalnr).
 
DATA(ld_i_grid) = ' '.
 
 
 
"SELECT single VBELN FROM VBAP INTO @DATA(ld_i_vbeln).
 
"SELECT single POSNR FROM VBAP INTO @DATA(ld_i_posnr).
 
"SELECT single KLVAR FROM KEKO INTO @DATA(ld_i_kalkvar).
 
"SELECT single TVERS FROM KEKO INTO @DATA(ld_i_kalkvers).
DATA(ld_i_kalkvers) = '01'.
 
"SELECT single KADKY FROM KEKO INTO @DATA(ld_i_kadky).
DATA(ld_i_kadky) = SY-DATLO.
 
"SELECT single KALNR_BA FROM KEKO INTO @DATA(ld_i_kalnr_ba).
 
"SELECT single ERZKA FROM KEKO INTO @DATA(ld_i_erzka).
DATA(ld_i_erzka) = 'X'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!