‎2010 Mar 10 5:27 AM
Hi,
Could some one help me with sample code for Multi level BOM explosion using FM CS_BOM_EXPL_MAT_V2..?
Please provide the sample having more than 1 material to be exploded.
Thanks in adv,
Shiv
‎2010 Mar 10 9:59 PM
Hi,
Please find the attached sample code.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = 'PC01' " Application ID
datuv = l_datuv " Validity date
* emeng = p_emeng " Required quantity
* MDMPS = ' ' " explode phantoms
mtnrv = lt_mast-matnr " Material
stlal = lt_mast-stlal " Alternative BOM
stlan = lt_mast-stlan " BOM usage
werks = lt_mast-werks " Plant
IMPORTING
topmat = top_mat " Data for top material
TABLES
stb = bom_tab " BOM item data table
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
OTHERS = 8.
Hope this helps.
Thanks,
Ramesh
‎2010 Mar 10 9:59 PM
Hi,
Please find the attached sample code.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = 'PC01' " Application ID
datuv = l_datuv " Validity date
* emeng = p_emeng " Required quantity
* MDMPS = ' ' " explode phantoms
mtnrv = lt_mast-matnr " Material
stlal = lt_mast-stlal " Alternative BOM
stlan = lt_mast-stlan " BOM usage
werks = lt_mast-werks " Plant
IMPORTING
topmat = top_mat " Data for top material
TABLES
stb = bom_tab " BOM item data table
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
OTHERS = 8.
Hope this helps.
Thanks,
Ramesh
‎2010 Mar 11 4:48 AM
Thanks for your input Ramesh.Any idea whether it can be used for more than 1 material(Multi level explosion)..?
Regards,
Shiv
‎2010 Mar 11 5:07 AM
Hi,
Go trough the [LINK|http://wiki.sdn.sap.com/wiki/display/Snippets/ProgramonExplodingBillOf+Materials] which has a detial code for multi level bom explosion program.
Regards,
Shanmugavel chandrasekaran
‎2010 Mar 11 2:19 PM
Yes.
You need to call this FM in loop to use it for multiple materials.
-Ramesh
‎2010 Mar 17 7:38 AM
‎2010 Mar 17 9:40 AM