‎2005 Jul 06 7:31 AM
Friends,
Can anyone of you specify a function module that
displays the "Bill of Materials (BOMs)" relavant to a
Top Level Material
Regards,
Usha
‎2005 Jul 06 7:56 AM
Hi Erwan,
Thanks for the reply.
Could you please explain the implications of the
exporting (namely- capid, emeng, datuv) & importing parameters you have specified in your
function module?
Regards,
Usha
‎2005 Jul 06 7:42 AM
Hi try this :
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
auskz = ' '
capid = 'PP01'
datuv = sy-datum
emeng = '1.000'
stlan = '1'
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 this helps.
Erwan.
‎2005 Jul 20 9:26 PM
Hi Erwan,
I was trying to search a Function for the multilevel BOM for a material and I could just find it for single level.
The function you specified works perfectly fine showing
all items in one structure and the higher level items in another.
Thanks a lot!
Cheers,
Mp.
Edited by: Mp on Jun 30, 2008 3:54 PM
‎2005 Jul 06 7:56 AM
Hi Erwan,
Thanks for the reply.
Could you please explain the implications of the
exporting (namely- capid, emeng, datuv) & importing parameters you have specified in your
function module?
Regards,
Usha
‎2005 Jul 06 8:19 AM
Capid is an id which indicate the domain area :
BEST Inventory management
PC01 Costing
PP01 Production - general
SD01 Sales and distribution
emeng = 1 as it's the quantity of the "finish product".
Datuv : with this parameter set to sy-datum, it 'll retrieve the valid BOM.
Stlan : 1,2 or 3 as it's a productio bom or sales bom, ...etc ( like in cs03 )
Hope it helps,
Erwan.
‎2005 Jul 08 8:49 AM
Hi Usha,
You can also use function module - CSAP_MAT_BOM_READ.
Import parameters are -
Material Number
Plant
Bom Usage
Valid From
Valid to
Function module will return all related BOMs in T_STKO / T_STPO.
Give a try. If you need more help, please let me know.
Thanks and Warm Regards.
Pras Durafe
‎2005 Jul 08 11:05 AM
the easiest function module is:-
the only input required is matnr and plant ..... hard-core the values of STLAL and STLAN as follows:-
********************
CALL FUNCTION 'CABM_READ_BOM'
EXPORTING
I_MATNR = MATNR
I_WERKS = WERK
I_STLAL = '01'
I_STLAN = '1'
TABLES
EXP_BOM_DATA = IT_CAL
EXP_ITM_DATA = IT_ITM
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*********************************
You shall get the BOM in table itm...... and the matnr as IDNRK.