cancel
Showing results for 
Search instead for 
Did you mean: 

CS12

Former Member
0 Kudos

hi all,

I am working on BOM.

The header material is test under which there is test1 under which there is test2.

If u go to CS12 you would find the different levels. I have exploded the BOM using FM " CS_BOM_EXPLOSION ". Now in CS12 you would find the different levels.

I need to print the component number and the object description.

Could any1 pls help me with this.

Thanks

nayan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First goto Table MAST with the Material Number to obtain MAST-stnlr. With stlnr you can co to the STPO Table to get all the BOM Compenets. If the Item is a Material, field IDNRK would contain the Material Master Number. MAKT woudl contain your Description. Keep in mind this would be a Single Level BOM Explosion only. You would need to repeat the Check at each item to determine if there are additional BOM Levels.

Answers (2)

Answers (2)

Former Member
0 Kudos

check below code....

LOOP AT it_matnr.

REFRESH: it_stb, it_matcat.

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

capid = 'PP01'

datuv = sy-datum

mktls = 'X'

mehrs = 'X'

mtnrv = it_matnr-matnr

stlal = p_stlal

stlan = p_stlan

stpst = 0

svwvo = 'X'

werks = p_werks

vrsvo = 'X'

TABLES

stb = it_stb

matcat = it_matcat

EXCEPTIONS

alt_not_found = 1

call_invalid = 2

material_not_found = 3

missing_authorization = 4

no_bom_found = 5

no_plant_data = 6

no_suitable_bom_found = 7

conversion_error = 8

OTHERS = 9.

LOOP AT it_stb WHERE postp = c_val_l.

gf_it_bom_expl-bom_mat = it_matnr-matnr.

gf_it_bom_expl-bom_comp = it_stb-idnrk.

gf_it_bom_expl-level = it_stb-stufe.

gf_it_bom_expl-ojtxp = it_stb-ojtxp.

APPEND gf_it_bom_expl TO it_bom_expl.

ENDLOOP.

ENDLOOP.

Former Member
0 Kudos

Hi,

use the function module CS_BOM_EXPL_MAT_V2

Regards

Sudheer