Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

Using function module CS_BOM_EXPL_MAT_V2 for exploding BOM .

Former Member
0 Likes
638

Hi

I have created an AFS material in LUMF category and attached two components to it in the ratio 1: 2.

I want to use CS_BOM_EXPL_MAT_V2 function module to read this ratio .

But I am  not getting the results .

I am not sure if I am correctly passing all the required parameters .

Could you please tell me how to use it ?

Also  , is there any documentation available on its usage ?

Thanks .

Regards

Varsha

1 REPLY 1
Read only

Former Member
0 Likes
416

data lv_matnr  type mgv_rfc_matnr.
data lv_capid  type tc04-capid.
data lv_datuv  type stko-datuv.
data lv_ehndl  type csdata-xfeld.
data lv_mehrs  type csdata-xfeld.
data lv_mmory  type csdata-xfeld.
data lv_stlal  type stko-stlal.
data lv_werks  type marc-werks.
data lt_stb    type table of stpox.
data lt_matcat type table of cscmat.


lv_matnr = '000000000100000000'.
lv_capid = 'PP01'.
lv_datuv = sy-datum.
lv_ehndl = '1'.
lv_mehrs = 'X'.
lv_mmory = '1'.
lv_stlal = '1'.
lv_werks = '1000'.


call function 'CS_BOM_EXPL_MAT_V2'
  exporting
    capid                 = lv_capid
    datuv                 = lv_datuv
    ehndl                 = lv_ehndl
    mehrs                 = lv_mehrs
    mmory                 = lv_mmory
    mtnrv                 = lv_matnr
    stlal                 = lv_stlal
    werks                 = lv_werks
  tables
    stb                   = lt_stb
    matcat                = lt_matcat
  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.