Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

'CS_BOM_EXPL_MAT_V2 ?

Former Member
0 Kudos

Hi All,

I am using 'CS_BOM_EXPL_MAT_V2' function to find bom level items of a material. But it is showing only first level items. I have attatched the function below.

Is there any thing wrong, it is showing wrong o/p.

Regards,

Dilip

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

CAPID = 'PP01'" change PP01 to BEST

DATUV = SY-DATUM

MDMPS = 'X'

MEHRS = 'X'

MTNRV = IT_MAST-MATNR

STLAN = '1'

WERKS = IT_MAST-WERKS

MDNOT = 'X'

PANOT = 'X'

TABLES

STB = IT_STB

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Diliip,

Multi level items are exploded only if one of the Import parameters in the function module is checked. I forgot which one but you can refer to the following code for the function module which gave me multi level bom explosions.

call function 'CS_BOM_EXPL_MAT_V2'

exporting

capid = 'PP01'

datuv = sy-datum

emeng = p_req_menge

mktls = 'X'

mehrs = 'X'

mtnrv = p_material

stlal = p_w_stlal

stlan = '1'

stpst = 0

svwvo = 'X'

werks = p_plant

vrsvo = 'X'

tables

stb = w_stpox

matcat = w_cscmat.

regards,

Madhavan

5 REPLIES 5

Former Member
0 Kudos

Hi Diliip,

Multi level items are exploded only if one of the Import parameters in the function module is checked. I forgot which one but you can refer to the following code for the function module which gave me multi level bom explosions.

call function 'CS_BOM_EXPL_MAT_V2'

exporting

capid = 'PP01'

datuv = sy-datum

emeng = p_req_menge

mktls = 'X'

mehrs = 'X'

mtnrv = p_material

stlal = p_w_stlal

stlan = '1'

stpst = 0

svwvo = 'X'

werks = p_plant

vrsvo = 'X'

tables

stb = w_stpox

matcat = w_cscmat.

regards,

Madhavan

Former Member
0 Kudos

Just enable the field MEHRS, don´t enable any other field...follow my sample :

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

CAPID = v_ordem " usually pp01

DATUV = sy-datum

MEHRS = c_X

MTNRV = v_material

WERKS = v_werks

IMPORTING

TOPMAT = e_topmat

TABLES

STB = t_itens

matcat = t_consumos

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.

0 Kudos

Some explanation:

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2' "BOM explosion for material

  • EXPORTING

  • ftrel = SPACE " csdata-xfeld Limited multi-level - stop explosion at items not relevant to production

  • aufsw = SPACE " csdata-xfeld Determine and enter order level and channel

  • aumgb = SPACE " csdata-xfeld Calculate scrap quantity

  • aumng = 0 " stko-bmeng Scrap quantity

  • auskz = SPACE " csdata-xfeld Scrap

  • bagrp = SPACE " mara-matnr Assembly restriction

  • beikz = SPACE " stpo-beikz Material provision indicator

  • bessl = SPACE " csdata-xfeld Material provision selection indicator

  • bgixo = SPACE " csdata-xfeld Load assembly information for exploded assemblies only

  • brems = SPACE " csdata-xfeld Limited explosion

  • capid = 'STD1' " tc04-capid Application ID

  • cospr = SPACE " csdata-xfeld Internal: (CO) order-spec. MatPreRead

  • cuobj = 000000000000000 " marc-cuobj Configuration

  • datuv = 00000000 " stko-datuv Validity date

  • delnl = SPACE " csdata-xfeld Delete items not kept in stock from list

  • emeng = 0 " stko-bmeng Required quantity

  • erskz = SPACE " stpo-erskz Spare part indicator

  • erssl = SPACE " csdata-xfeld Spare part selection indicator

  • fbstp = SPACE " csdata-xfeld Limited multi-level - stop explosion at externally procured item

  • mbwls = SPACE " csdata-xfeld Read material valuation

  • mdmps = SPACE " csdata-xfeld Limited multi-level - explode phantom assemblies at least

  • mehrs = SPACE " csdata-xfeld Multi-level explosion

  • mkmat = SPACE " csdata-xfeld Limited multi-level; explode KMAT

  • mmaps = SPACE " csdata-xfeld Limited multi-level - explode at least M assembly (M order)

  • mmory = SPACE " csdata-xfeld Memory use ('1'=on;'0'=off;' '=no reaction)

  • mtnrv = SPACE " mara-matnr Material

  • postp = SPACE " stpo-postp Item category

  • rndkz = SPACE " csdata-xfeld Round off: ' '=always, '1'=never, '2'=only levels > 1

  • rvrel = SPACE " stpo-rvrel Relevant to sales

  • sanfr = SPACE " stpo-sanfe Production

  • sanin = SPACE " stpo-sanin Maintenance

  • sanka = SPACE " stpo-sanka Costing

  • sanko = SPACE " stpo-sanko Engineering/design

  • sanvs = SPACE " stpo-sanvs Shipping

  • schgt = SPACE " stpo-schgt Bulk material

  • stkkz = SPACE " stpo-stkkz PM assembly

  • stlal = SPACE " stko-stlal Alternative BOM

  • stlan = SPACE " stzu-stlan BOM usage

  • werks = SPACE " marc-werks Plant

  • mdnot = SPACE " csdata-xfeld Restriction on MDMPS: do not explode M phantom

  • panot = SPACE " csdata-xfeld Restriction on MDMPS: no parallel discontinue

IMPORTING

topmat = " cstmat Data for start material

dstst = " csdata-xfeld Structure destroyed by filter

TABLES

stb = " stpox Collective item data table

  • matcat = " cscmat Material catalog (sub-assemblies)

EXCEPTIONS

ALT_NOT_FOUND = 1 " Alternative not found

CALL_INVALID = 2 " Incorrect parameter combination

MATERIAL_NOT_FOUND = 3 " Material not found

MISSING_AUTHORIZATION = 4 " No authorization (bill of material)

NO_BOM_FOUND = 5 " No BOM for this material

NO_PLANT_DATA = 6 " Material not maintained in plant

NO_SUITABLE_BOM_FOUND = 7 " BOM does not exist

. " CS_BOM_EXPL_MAT_V2

0 Kudos

hi

can any one help me, does this function module work for phantom assemblies also,

i had executed this function module and it is showing the number of  entries exactly that is 36 but it is not displaying all the entries it is only displaying 25 entries,  i have passed MEHRS=X

krishna

Pratik2228
Participant
0 Kudos

if u have done report for zbom can u please share so that i can refer from it...

it will be a great help.