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: 

Function Module for Multi-level BOM Explosion

Former Member
0 Kudos

Hi All,

I am trying to build a infoset-query to display multi-level BOM as seen in output of T-codes: CS11 or CS12 & link the components read with a few parameters in the material master. I tested the below mentioned function modules in SE37 to see if the function module gives the desired output, but the system prompts 'CALL INVALID'. Can someone help me with this?

Function Modules:

1. CS_BOM_EXPLOSION

2. CS_BOM_EXPLOSION_MAT

3. CS_BOM_EXPL_MAT_V2

4. CSAP_MAT_BOM_READ - (This reads a single level BOM & am able to test this using SE37).

Hope my problem is clear, await inputs.

Vivek

1 ACCEPTED SOLUTION

Clemenss
Active Contributor

Hi Vivek,

CS_BOM_EXPL_MAT_V2 will be the one you need.

Here is a sample giving you parameters that should work:

call function 'CS_BOM_EXPL_MAT_V2'

exporting

  • FTREL = ' '

  • ALTVO = ' '

  • AUFSW = ' '

  • AUMGB = ' '

  • AUMNG = 0

auskz = 'X'

  • AMIND = ' '

  • BAGRP = ' '

  • BEIKZ = ' '

  • BESSL = ' '

  • BGIXO = ' '

brems = 'X'

capid = ' '

  • CHLST = ' '

  • COSPR = ' '

  • CUOBJ = 000000000000000

  • CUOVS = 0

  • CUOLS = ' '

datuv = p_datuv

  • DELNL = ' '

  • DRLDT = ' '

  • EHNDL = ' '

  • EMENG = 0

  • ERSKZ = ' '

  • ERSSL = ' '

  • FBSTP = ' '

  • KNFBA = ' '

  • KSBVO = ' '

  • MBWLS = ' '

  • MKTLS = 'X'

  • MDMPS = ' '

mehrs = 'X'

  • MKMAT = ' '

  • MMAPS = ' '

  • SALWW = ' '

  • SPLWW = ' '

  • MMORY = ' '

mtnrv = p_mkal_dta-matnr

  • NLINK = ' '

  • POSTP = ' '

  • RNDKZ = ' '

  • RVREL = ' '

  • SANFR = ' '

  • SANIN = ' '

  • SANKA = ' '

  • SANKO = ' '

  • SANVS = ' '

  • SCHGT = ' '

  • STKKZ = ' '

stlal = p_mkal_dta-stlal

stlan = p_mkal_dta-stlan

  • STPST = 0

  • SVWVO = 'X'

werks = p_mkal_dta-werks

  • NORVL = ' '

  • MDNOT = ' '

  • PANOT = ' '

  • QVERW = ' '

  • VERID = ' '

  • VRSVO = 'X'

importing

topmat = p_topmat

dstst = l_dstst

tables

stb = p_i_stpox

matcat = p_i_cscmat

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

.

The p_mkal_dta data field are from MARA/MARC.

Regards,

Clemens

P.S.: Sorry - forum admins unexpectedly changed the reply functionality - I don't know how to handle this.

Even the prview looks totally different from the final result, sorry.

Edited by: Clemens Li on Dec 16, 2007 12:49 PM

4 REPLIES 4

Clemenss
Active Contributor

Hi Vivek,

CS_BOM_EXPL_MAT_V2 will be the one you need.

Here is a sample giving you parameters that should work:

call function 'CS_BOM_EXPL_MAT_V2'

exporting

  • FTREL = ' '

  • ALTVO = ' '

  • AUFSW = ' '

  • AUMGB = ' '

  • AUMNG = 0

auskz = 'X'

  • AMIND = ' '

  • BAGRP = ' '

  • BEIKZ = ' '

  • BESSL = ' '

  • BGIXO = ' '

brems = 'X'

capid = ' '

  • CHLST = ' '

  • COSPR = ' '

  • CUOBJ = 000000000000000

  • CUOVS = 0

  • CUOLS = ' '

datuv = p_datuv

  • DELNL = ' '

  • DRLDT = ' '

  • EHNDL = ' '

  • EMENG = 0

  • ERSKZ = ' '

  • ERSSL = ' '

  • FBSTP = ' '

  • KNFBA = ' '

  • KSBVO = ' '

  • MBWLS = ' '

  • MKTLS = 'X'

  • MDMPS = ' '

mehrs = 'X'

  • MKMAT = ' '

  • MMAPS = ' '

  • SALWW = ' '

  • SPLWW = ' '

  • MMORY = ' '

mtnrv = p_mkal_dta-matnr

  • NLINK = ' '

  • POSTP = ' '

  • RNDKZ = ' '

  • RVREL = ' '

  • SANFR = ' '

  • SANIN = ' '

  • SANKA = ' '

  • SANKO = ' '

  • SANVS = ' '

  • SCHGT = ' '

  • STKKZ = ' '

stlal = p_mkal_dta-stlal

stlan = p_mkal_dta-stlan

  • STPST = 0

  • SVWVO = 'X'

werks = p_mkal_dta-werks

  • NORVL = ' '

  • MDNOT = ' '

  • PANOT = ' '

  • QVERW = ' '

  • VERID = ' '

  • VRSVO = 'X'

importing

topmat = p_topmat

dstst = l_dstst

tables

stb = p_i_stpox

matcat = p_i_cscmat

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

.

The p_mkal_dta data field are from MARA/MARC.

Regards,

Clemens

P.S.: Sorry - forum admins unexpectedly changed the reply functionality - I don't know how to handle this.

Even the prview looks totally different from the final result, sorry.

Edited by: Clemens Li on Dec 16, 2007 12:49 PM

Former Member
0 Kudos

Hi Clemens,

Managed to resolve the function testing in SE37. It works fine

I would like to know which tables should i join for my infoset? Is it ok if i join MAST & MARC or should it be MARC first & then MAST?

Await inputs

Vivek

Edited by: Vivek on Dec 17, 2007 11:13 PM

Former Member
0 Kudos

You can use MAST and MARC Table join in order to get it.

Thanks

Seshu

Former Member
0 Kudos

Mr. Seshu,

Thanks for your inputs. This is my first program where i am trying to call a function & build a infoset query. Can you please guide me as to how i should declare the variables & how i should read the data?

The query output should display multi-level BOM & for each material, i want to display a few parameters coming from MARC table, like Plnd Dlvy Time, Goods Receipt Processing Time, MRP Indicator & the document number associated with the material. I understand i should read the document number from DRAD table.

Await your inputs.

Vivek

Anyone who can help me build this infoset?

Edited by: Vivek on Dec 19, 2007 6:10 PM