2007 Sep 17 1:11 PM
Hi Guys,
Is there a FM available to simulate material BOM creation? My requirement is to check whether BOM can be created of a material for a set of components (this includes all standard checks e.g. whether components are valid material numbers, those materials are extended to the plant etc) and act accordingly.
Hi,
Any comments? This is rather urgent.
Points assured.
2007 Sep 17 1:48 PM
2008 Jan 03 6:41 AM
2008 Jan 03 6:51 AM
hi sandeep,
We can use fm-CS_BOM_EXPL_MAT_V2. This FM will explode the material BoM for given material and plant.
Sample code for FM usage :
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = p_appli
datuv = sy-datum
mktls = 'X'
mehrs = 'X'
mtnrv = v_matnr
stlal = p_alter
stlan = p_usage
stpst = p_level
werks = v_werks
TABLES
stb = it_stpox
matcat = it_cscmat
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 .
IF sy-subrc IS NOT INITIAL.
*Message " No Bom detials found
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " EXPLODE_BOM
Reward if it is usful,
Thanks,
Srikanth.A
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |