SAP BOM Items, Read BOM items details for STPO Example

SAP BOM Tables details how SAP BOMs (Bill Of Material) are stored in SAP’s database.
Go There SAP BOM Tables for BOM Header, Items and components and Category

  select *
    from mkal
      "inner join cdhdr on
       "          cdhdr~objectid = mkal~matnr
      inner join mast on
                 mkal~werks = mast~werks and
                 mkal~stlal = mast~stlal and
                 mkal~stlan = mast~stlan and
                 mkal~matnr = mast~matnr
      inner join materialid on
                 materialid~matnr_int = mast~matnr
      inner join stko on
                 stko~stlnr = mast~stlnr and
                 stko~stlal = mast~stlal
      inner join stas on
                 stas~stlnr = mast~stlnr and
                 stas~stlal = mast~stlal
      inner join stpo on
                 stpo~stlnr = stas~stlnr and
                 stpo~stlkn = stas~stlkn
    into corresponding fields of table et_specifications_hdr
    where "cdhdr~langu = 'R' and
          mksp = space
          and stas~STLKN = '50'
          and adatu <= sy-datum
          and bdatu >= sy-datum
          "and udate > iv_date
          and mast~stlnr = '00155162'
          and stko~STLST = '1'
    order by mkal~matnr stpo~IDNRK.

Добавить комментарий