SAP tables:
MAST Material to BOM Link
STPO BOM item
Function Module for BOM
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
altvo = ' '
aufsw = ' '
capid = ''
datuv = sy-datum
ehndl = '1'
emeng = 0
mbwls = ' '
mehrs = 'X'
mmory = '1'
mtnrv = l_matnr
stlan = '1'
stpst = 0
werks = zsapim-werks
TABLES
stb = stb
matcat = matcat
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.
Tcode for BOM
CS03 - Display material BOM