08-02-2005 2:41 PM
Friends,
My requirement is to display all components related to a top level material. To acheive the same I have written the below code. Although the material i have given in the parameter option has components associated with it in the plant 'HP', nothing is displayed for me.
Please review the code below & help me identify the problem.
data : i_stb type standard table of STPOX,
wa_stb like line of i_stb.
parameters p_MTNRV type mara-matnr.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
MEHRS = 'X'
mmory = '1'
MTNRV = p_mtnrv
auskz = ' '
capid = 'PP01'
datuv = sy-datum
emeng = '1.000'
stlan = '1'
stpst = '0'
werks = 'HP'
TABLES
stb = i_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 sy-subrc <> 0.
MESSAGE ID SY-MSGID NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at i_stb into wa_stb.
write 😕 wa_stb-IDNRK.
endloop.
08-02-2005 2:48 PM
Here is how I have called it in my programs, and it works good.
call function 'CS_BOM_EXPL_MAT_V2'
exporting
capid = 'PP01'
mehrs = 'X'
datuv = sy-datum
mtnrv = matnr
werks = werks
emeng = menge
tables
stb = stpox
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.
Regards,
Rich Heilman
08-02-2005 2:48 PM
Hi Usha,
check out my following weblog.
/people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
08-02-2005 2:48 PM
Here is how I have called it in my programs, and it works good.
call function 'CS_BOM_EXPL_MAT_V2'
exporting
capid = 'PP01'
mehrs = 'X'
datuv = sy-datum
mtnrv = matnr
werks = werks
emeng = menge
tables
stb = stpox
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.
Regards,
Rich Heilman
08-03-2005 4:55 AM
08-03-2005 5:37 AM
Friends,
I have tried with all options suggested.
I am getting the following error
"Object Z_KM_BOM_DISP of class RE and language EN"
where Z_KM_BOM_DISP is my program name.
Regards,
Usha
08-03-2005 5:40 AM
Friends,
Previously I have posted the incomplete error msg,
I am getting the following error
"Object Z_KM_BOM_DISP of class RE and language EN"
does not exist
where Z_KM_BOM_DISP is my program name.
Regards,
Usha
08-04-2005 10:29 AM
Friends,
The problem is now solved which was basically due to the wrong input for BOM Usage parameter.
Regards,
Usha.