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 TABLES

Former Member
201,003

Hi All,

I need the list of tables relating BOM material which is being created/changed using tcode CS01/CS02 .

1 ACCEPTED SOLUTION
Read only

Former Member
87,958

MAST, STKO, STPO, STAS, STZU are the most important ones, but there will be several others. Why do you need this list? Use some of the BOM read function modules to do any reading of the BOMs. Trying to link all these tables together will be nightmare and most probably inaccurate.

Srinivas

12 REPLIES 12
Read only

FredericGirod
Active Contributor
0 Likes
87,956

Hi Ravi,

use transaction ST05 to trace the SQL actions.

Regards

Frédéric

Read only

Former Member
87,959

MAST, STKO, STPO, STAS, STZU are the most important ones, but there will be several others. Why do you need this list? Use some of the BOM read function modules to do any reading of the BOMs. Trying to link all these tables together will be nightmare and most probably inaccurate.

Srinivas

Read only

0 Likes
87,954

Use fm CS_BOM_EXPL_MAT_V2 ... stpox hass info you want.

Bets!

Jim

Read only

Former Member
0 Likes
87,953

Hi Ravi,

CSAP_MAT_BOM_READ is a also good function module to use.

Regards,

Kasthuri Rangan.

Read only

0 Likes
87,953

Hi Ravi,

The logic to get the BOM data from SAP tables is as follows :

1. Search Material, Plant and Material Description.

Read the material number, plant and material description from join of MARA, MARC and MAKT using the following conditions:

Material Number (MARA-MATNR) in input material (select-options) and

Plant (MARC-WERKS) in input plant (select-options) and

Material type (MARA-MTART) in input material type (select-options).

Note: Proceeding to Step 2 or 3 or 4 depends on the input radio button for Production or Engineering or ALL BOM option.

2. Search for BOM – Engineering.

BOM link search from MAST -

Select material numbers and BOM link from MAST based on the material numbers selected above using the following conditions:

Material (MAST-MATNR) = Materials selected above and

Plant (MAST–WERKS) = As in input and

BOM usage (MAST-STLAN) = 2 (Engineering usage).

Read BOM Header and Item.

Read BOM Header details as per data mapping (Section 5.2) from table STKO using the

conditions:

BOM Number (STKO-STLNR) = BOM number got in previous step and

BOM alternative (STKO-STLAL) = BOM alternative got in previous step.

Read Item details as per data mapping from STOP using the conditions :

BOM number (STOP-STLNR) = STKO-STNLR.

Read BOM text from table STZU.

3. Search BOM – Production.

BOM link search from MAST -

Select material numbers and BOM link from MAST based on the material numbers selected above using the following conditions:

Material (MAST-MATNR) = Materials selected above and

Plant (MAST–WERKS) = As in input and

BOM usage (MAST-STLAN) = 1 (Production usage).

Read BOM Header and Item.

Read BOM Header details as per data mapping (Section 5.2) from table STKO using the

conditions:

BOM Number (STKO-STLNR) = BOM number got in previous step and

BOM alternative (STKO-STLAL) = BOM alternative got in previous step.

Read Item details as per data mapping (Section 5.2) from table STOP using the

conditions:

BOM number (STOP-STLNR) = STKO-STNLR.

Read BOM text from table STZU.

Search for Resource / Production Version (Production BOM’s only)

Read Production Version and Resource as per data mapping (Section 5.2) from table MKAL using the conditions:

Material number (MKAL–MATNR) = Material number from above selection (MAST) And

Plant (MKAL–WERKS) = Plant from above selection (MAST)

And

Alternative BOM (MKAL-STLAL) = Alternative BOM from above selection (MAST)

And

BOM Usage (MKAL-STLAN) = 1 (Production BOM).

Note:

1. If no production version exists for any of the BOM’s write such records at the bottom of the report under the heading “No Production Version Exists (Production BOM’s)”.

2. Sort the output on Plant, Usage and then on Material.

3. If multiple plants then the report will be displayed Plant wise.

• Header to be displayed for Production / Engineering BOM option.

4. Material BOM Comparison.

Search for BOM’s

BOM link search from MAST -

Select material numbers and BOM link from MAST based on the material numbers selected above using the following conditions:

Material (MAST-MATNR) = Materials selected above and

Plant (MAST–WERKS) = As in input.

Read BOM Header’s

Read BOM Header details as per data mapping (Section 5.2) from table STKO using the

conditions:

BOM Number (STKO-STLNR) = BOM number got in previous step and

BOM alternative (STKO-STLAL) = BOM alternative got in previous step.

Read Item details as per data mapping from STPO using the conditions:

BOM number (STPO-STLNR) = STKO-STNLR.

Let me know if this helps ur need.

Regards

Swanand.

Read only

0 Likes
87,952

Dear Swanand,

you seem very knowledgeable in SAP and BOM explosion. We have a problem at our company, which holds us back for some time. The thing is, that we develop an external tool that pulls valid BOMs from SAP. To do that within SAP I can use CS12 transaction, put material, plant, bom application and what's most important, valid from date. The transaction returns the valid material components. I know the data come from STPO table, however I can't figure the logic of returning the components as CS12 does it. I know there's the CS_BOM_EXPL_MAT_V2 function involved, but since it is not RFC enabled we can't use it. So, how does the function returns bom components for a specific material and valid from date?

best regards,

Pawel

Read only

Former Member
0 Likes
87,949

Hi Ravi,

Have you solved this problem?

I'm anxious to know that, coz I'm now trying to join all BOM-related tables too!

Thank you.

Regards,

Celeste

Read only

Former Member
0 Likes
87,948

Hai,

The list of tables are as follows

MAST,MARA,MAKT,MARC,STKO,STAS,CABN,USR21,ADRP,STPO.

Cheers,

Umasankar

Read only

Former Member
0 Likes
87,947

hii

The BOM tables are as follows:

MAST---->Material to BOM Link

STKO -


>BOM Header

STPO----->BOM item

Go and run this tables and you will get the desired detail

The field you are looking for is, in the Table STPO, and field name ITMID, with data element CS_ITMID.

They both refer to the "External identification of an item", which is reserved for the "External system item number" for that BOM (just a guess). In case you are transferring your BOM from an external system.

hope this helps

Thanks & Regards

Naresh

Read only

Former Member
0 Likes
87,947

MAST INNER JOIN INNER JOIN STKO INNER JOIN STPO

Conditions

MAST-WERKS = STKO-WRKAN

MAST-STLNR = STKO-STLNR

MAST-STLAL = STKO-STLAL

STKO-STLTY = STPO-STLTY

STKO-STLNR = STPO-STLNR

However none of this tables gives you the Valid To date for the BOM components and without that you can't have an accurate result. I don't have an answer to that myself (yet). Will post when I find it.

Read only

Former Member
0 Likes
87,947

Hi,

Try transaction CS80 to see all BOM change documents. Perhaps you can trace this t-code with ST05 and see which tables are fetched during CS80 execution.

Hope this will help!

Regards,

Tomi

Read only

Former Member
0 Likes
87,947

T-code  SE16 and Table name  MAST