on 07-31-2007 9:57 AM
hi guys,
I'm doing a report using cs_where_used_mat to retrieve upper level component.
please advise how to get multiple level (like what we can do in cs15) from cs_where_used_mat?
thanks & regards,
BK.
Hi,
CS_WHERE_USED_MAT does not get multilevel BOM. But you can run CS15 in background as below.
cl_salv_bs_runtime_info=>set( display = abap_false
metadata = abap_false
data = abap_true ).
SUBMIT rcs15001 WITH pm_idnrk = iv_idnrk
WITH pm_werks = iv_werks
WITH pm_mehrs = 'X' "Multilevel
AND RETURN .
TRY.
cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = DATA(lobj_data) ).
ASSIGN lobj_data->* TO FIELD-SYMBOL(<lfs_data>).
CATCH cx_salv_bs_sc_runtime_info.
ENDTRY.
IF <lfs_data> IS ASSIGNED.
DATA: lt_stpov_alv TYPE TABLE OF stpov_alv.
lt_stpov_alv = CORRESPONDING #( <lfs_data> ).
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you guys, i'll try the options given here and update to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this. This is what I am using to get multi-level BOM explosion. export parameter says that this is a multi level BOM when set. Please comment stpst in the export parameter.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = 'PP01'
datuv = sy-datum
mtnrv = wa_mast-matnr
mehrs = 'X'
stlan = wa_mast-stlan
stlal = wa_mast-stlal
werks = wa_mast-werks
ehndl = '1'
mmory = '1'
stpst = 1
TABLES
stb = it_stb
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 you want to use the same function module for a purticular level of BOM say just for the first level then remove MEHRS and add STPST = 1.
Thanks.
MGS.
Message was edited by:
mg s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use CS_BOM_EXPL_MAT_V2, search the forum for sample code using that function module name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Use this FM , and give the parameters .
This will give least level( how many level it have ) of component of perticular material.
CALL FUNCTION 'CK_F_CSTG_STRUCTURE_EXPLOSION'
EXPORTING
klvar = keko-klvar
kalnr = keko-kalnr
kadky = keko-kadky
tvers = keko-tvers
werk = p_bwkey
sicht = '01'
s_losgr = 'X'
s_bezugsmenge = keko-losgr
s_aufloesungstiefe = '0'
s_read_only_db = 'X'
s_only_mat_pos = 'X'
s_skip_totals = 'X'
TABLES
strukturtabelle = sa_tabin
EXCEPTIONS
invalid_bzobj = 1
keko_not_found = 2
meta_model_error = 3
ckhs_not_found = 4
OTHERS = 5 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
try the function module "CSAP_MAT_BOM_OPEN".
regards,
Navneeth K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.