Application Development and Automation 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: 
Read only

BOM Mulitlevel problem

Former Member
0 Likes
637

Hi All,

I am trying to display multilevel BOM display but it is displaying items only for 1st level.

I am attatching my code.

Kindly help me in this.

Regards,

Dilip

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

CAPID = 'PP01'

DATUV = SY-DATUM

mktls = 'X'

MDMPS = 'X'

MEHRS = 'X'

STLAN = IT_RESULT1-STLAN

SVWVO = 'X'

VRSVO = 'X'

MTNRV = it_result1-matnr

WERKS = it_result1-werks

MDNOT = 'X'

STPST = 1

TABLES

stb = it_stb.

loop at it_stb.

write :/2 it_stb-idnrk,it_stb-OJTXP, it_stb-stufe.

endloop.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
594

Hello,

Pass

'PP01' to capid,

valid date to datuv,

'1' to ehndl,

'X' to mehrs,

'1' to mmory,

Header / parent Material to mtnrv,

plant to werks

Please let me know if you have problems.

Regards, Murugesh AS

4 REPLIES 4
Read only

Former Member
0 Likes
595

Hello,

Pass

'PP01' to capid,

valid date to datuv,

'1' to ehndl,

'X' to mehrs,

'1' to mmory,

Header / parent Material to mtnrv,

plant to werks

Please let me know if you have problems.

Regards, Murugesh AS

Read only

0 Likes
594

This is how I'm using it, and it works fine :

  • Tables "call CS_BOM_EXPL_MAT_V2 "

DATA: BEGIN OF T_STB OCCURS 0.

INCLUDE STRUCTURE STPOX.

DATA: END OF T_STB.

DATA: BEGIN OF MATCAT OCCURS 50.

INCLUDE STRUCTURE CSCMAT.

DATA: END OF MATCAT.

DATA: DSTST_FLG LIKE CSDATA-XFELD.

DATA: BEGIN OF SELPOOL.

INCLUDE STRUCTURE CSTMAT.

DATA: END OF SELPOOL.

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

AUSKZ = ' '

CAPID = 'PP01'

DATUV = SY-DATUM

EMENG = '1.000'

STLAN = '3'

MTNRV = MATNR

MEHRS = 'X'

MMORY = '1'

STPST = '0'

WERKS = WERKS

IMPORTING

TOPMAT = SELPOOL

DSTST = DSTST_FLG

TABLES

STB = STB

MATCAT = MATCAT

EXCEPTIONS

MATERIAL_NOT_FOUND = 4

NO_PLANT_DATA = 8

NO_BOM_FOUND = 12

NO_SUITABLE_BOM_FOUND = 16.

Hope it helps !

Erwan.

Read only

0 Likes
594

Dear Murugesh,

I have made changes that you suggested. But the problem is still the same. Only 1st level items are being displayed.

I have checked the material it has 3 level of bom.

Regards,

Dilip

Read only

0 Likes
594

Hi Dilip,

Just came across this thread.

In case you are still following up:-

Field STPST isthe Maximum explosion level. Do not specify a number there if you want the BOM to be exploded completely.

Regards,

Vivek Kute.