How To Show a Standard Cost Component on a Single Level

Query

We use report S_P99_41000111 for displaying cost components for multiple materials. However we are looking for the cost component costs incurred on the material itself, and not from the lower level materials. For example, we have a finished product with a cost component called Freight. The value in this cost component is $20. However, $15 of this freight came from the source material in a different plant. We therefore only want $5 to show in this report.

In report S_P99_41000111, if you click on the button called "Detailed report: Cost Components" (just before the "Change Layout button" and then in the subsequent screen click on "Choose Layout" and select Layout "1SAP03" Total/Level/Lower Level. You will see that in the column called "Level" this contains the cost incurred on that level alone. This is what we need. We just need it for multiple materials and not just one material.

If there is no standard report that does this. We would like to know which cost component tables we can use that will show us the cost incurred on the level of the material alone.

Answer

There does not seem to be a standard report that will allow you to see this information on a mass basis. You will need to pull this information from table KEPH, field KKZST (Indicator Lower Level/Level) 

Valid values for field KEPH-KKZST 

<blank>    All levels
X    Lower Level
S    Level

Cost component for own level = Total record (KEPH-KKSTZ = blank) minus Lower Level (KEPH-KKSTZ = “X”)

 

How to retrieve cost component information on a mass basis:

You may use Function module CK_F_KEKO_KEPH_DIRECT_READ to read this data. Note that information for KALNR (cost estimate number) will be necessary, which can be found from table MBEW, field KALN1.

Example of one single material is provided below for ease in conceptualization

 

Step 1: Identify Cost estimate number (KALN1 / KALNR)

 

Step 2: Read function module

Go to SE37, enter function module CK_F_KEKO_KEPH_DIRECT_READ. Hit execute.

 

Step 3: Fill-in details in function module: 

In import parameters “F_KEKOKEY”, fill-in details for Client, Reference Object, Cost Estimate Number, Costing Type, Costing Date (Key), Costing Version, Valuation Variant. Example is provided below:

 

Step 4: Execute the function module

Output similar to below should show up. Look for I_KEPH result (bottom of the screen)

 

Step 5: Review details of function module:

Click on detail of I_KEPH result, a screen similar to below should show up. Highlighted field is KKZST (Indicator Lower Level/Level)

2nd record from SE37 I_KEPH result has data only in the first cost component. This record has KEPH-KKZST = “X”, this would mean this is the cost component breakdown at lower level. KST001 in the result screen corresponds to cost component 1 in table TKCH3 (screenshot is provided below)

 

Step 6: Read details of individual records

Details of 1st record from SE37 I_KEPH result. This record has KEPH-KKZST = “” (blank), this would mean this is the cost component breakdown at total level.

Scroll down on this record to find cost details in additional cost components

 

Step 7: Read cost components from TCKH3

Identify cost component in TCKH3. Cost components 1, 7, 8, 18 and 19 have values in SE37. These values correspond to the individual cost components shown in table TCKH3.

 

Step 8: Report S_P99_41000111 output

Report output from report S_P99_41000111 for the material when drilled-down to the cost component for layout 1SAP03 is shown below for reference. This should help you visualize the output in SE37 function module 

 

Conclusion

In summary, you are looking for information for 1st record minus the 2nd record. 

In other words: Cost component for own level = Total record (KEPH-KKSTZ = blank) minus Lower Level (KEPH-KKSTZ = “X”)

 

Additional function modules:

You may also find below function modules useful while building this report.

BAPI_COSTESTIMATE_GETDETAIL

BAPI_COSTESTIMATE_GETEXPLOSION

 

Table information

In case the development team determines that use of Function Modules impacts performance adversely, then information from below tables van be used while building this program

MBEW    Material Valuation

KEKO    Product Costing - Header Data

CKIS    Items Unit Costing/Itemization Product Costing

KEPH    Product Costing: Cost Components for Cost of Goods Mfd

TCKH3Cost Components