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

BOM Fun module CS_BOM_EXPL_MAT_V2

Former Member
0 Likes
853

Hi team,

can someone help on this. i need to BW extractor FM using above standardized functional module..

Hi team,

can someone help on this. i need to BW extractor FM using above standardized functional module..

2 REPLIES 2
Read only

Abinathsiva
Active Contributor
729

Hi,

Sample code for FM given below

data : it_stb2    like stpox occurs 0 with header line,
       wa_stb2    like          stpox,
       it_matcat  like cscmat occurs 0 with header line.


loop at It_mast into wa_mast.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
      exporting
      capid                 = 'XXXX'
      datuv                 = sy-datum
      mktls                 = 'X'
      mehrs                 = 'X'
      mmory                 = '1'
      mtnrv                 = wa_mast_t-matnr
      werks                 = wa_mast_t-werks
    tables
      stb                   = it_stb2
      matcat                = it_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
      others                = 8.

*collect it_stb2 and it_matcat into another internal table or as required cusomize the code without loop..
endloop. 
Read only

RaymondGiuseppi
Active Contributor
0 Likes
729

Did you also search in online help for Extracting BOM Data from SAP ECC