2005 Mar 30 12:28 PM
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.
2005 Mar 30 1:44 PM
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
2005 Mar 30 1:44 PM
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
2005 Mar 30 1:59 PM
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.
2005 Mar 31 6:21 AM
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
2005 Aug 09 5:45 AM
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.