cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Material and material components

Former Member
0 Kudos

Dear users,

I'm struggeling with an issue I can't solve at this moment, hopefully you guys can help me on the right way

In our warehouse we're producing kits out of other materials. What I wan't to create is that we can base on material numbers, check in which kits / componenets / bom's they are used. The result should be a list that contains the level 1 (kit) and level 2 (materials), I've received a list before, see attachment.

I'm now struggeling with the SAP tables STKO, STPO, MAST but I don't get the results that I want to see, also I don't know exactly wich fields to use.

Maybe one of you know which tables and fields to use to get the result as shown in the attachment?

Many thanks to all of you for your help on forehand

Kind regards,

Jeffrey

Accepted Solutions (1)

Accepted Solutions (1)

kakshat
Advisor
Advisor
0 Kudos
  • Use MATNR (and WERKS, if required) to get STLNR from MAST.
  • Use STLNR to get POSNR (BOM item number), IDNRK (Material Name/Number), MENGE (Component quantity) from STPO.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kumar,

I've attached a JPG, but I'll try through this way...

Hope this work, because I wasn't able to upload an Excel file... Maybe because I'm new to this network have to get used with it.

Thanks!

Former Member
0 Kudos

Try to use this FM

  CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

    EXPORTING

      CAPID                 = v_ordem " usually pp01

      DATUV                 = sy-datum

      MEHRS                 = c_X

      MTNRV                 = v_material

      WERKS                 = v_werks

    IMPORTING

      TOPMAT                = e_topmat

    TABLES

      STB                   = t_itens

      matcat                = t_consumos

    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.

Ref.: http://scn.sap.com/thread/38268