Hello all,
I never worked with such a kind of assignment.I have to
explode CS_BOM_EXPLOSION.I got syntax but could not retrieve the data.In this case
assume li_datuv is what user enters ie budat
li_werks is plantcode
li_mtnrv is material no.
i have declared STARTMAT as internal table of type CSTMAT. and further declared i_XXX tables based on corresponding structures.
Wil be definitely rewarded.
loop at i_mseg.
li_datuv = i_mseg-budat.
li_mktls = 'X'.
li_mehrs = 'X'.
li_mtnrv = i_mseg-matnr.
li_mmory = '1'.
li_stlal = '001'.
li_werks = s_werks.
li_svwvo = 'X'.
li_vrsvo = 'X'.
CALL FUNCTION 'CS_BOM_EXPLOSION'
EXPORTING
DATUV = li_datuv
MKTLS = 'X'
MEHRS = 'X'
MMORY = '1'
MTNRV = li_mtnrv
STLAL = '01'
SVWVO = 'X'
VRSVO = 'X'
WERKS = li_WERKS
IMPORTING
TOPMAT = STARTMAT "includes structure CSTMAT
TABLES
STBD = i_tbd "includes structure CSXDOC
STBE = i_tbe "includes structure CSXEQUI
STBK = i_tbk "includes structure CSXKLA
STBM = i_tbm "includes structure CSXMAT
STBP = i_tbp "includes structure CSXGEN
STBT = i_tbt "includes structure CSXTDL
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MISSING_AUTHORIZATION = 3
NO_BOM_FOUND = 4
NO_PLANT_DATA = 5
NO_SUITABLE_BOM_FOUND = 6
OBJECT_NOT_FOUND = 7
CONVERSION_ERROR = 8
OTHERS = 9.
endloop.