Application Development 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: 

FM for Equipment list for a Material

Former Member
0 Kudos

Hi,

I have to develop a report for material Consupmtion.

where in i need to get all the Equipments in which this material is used.

Some one told me that there is a standard function module existing,in which the input is material and the ouput,all the equipments.

Do anyone know which FM..if they have worked with this before.

Thanks in advance...

5 REPLIES 5

Former Member
0 Kudos

Hi Salz,

Check out CS_BOM_EXPL_EQU_V2.

If that is not what your are after, there are a lot of FMs for BOMs, check out the function group CSS4 (make sure to use the latest versions!).

Do a where used list for actual code examples of how it is called.

Cheers,

Brad

0 Kudos

Hello Salz,

I dont know if there is any function module, but I think you can get the equipments in which a material is used by a simple query on table 'EQUI'.

Thanks,

Jitendar

Former Member
0 Kudos

Hi All,

Thanks for ur replies.

In table EQUI,material number field is empty in all the records.

Also tried to check this FM,but no break thru yet....

0 Kudos

Hi Salz,

This may help you decode the function module.

But a soft break point in the first line of the function module, and then from within the same session (so that your break point is recognised) run the transaction CS12/CS13 and display the equipment list of your BOM.

You should trigger the break point in the function module, and then you can check the data that is passed to it via the parameters.

You can then pass the same data when you call it from your custom program.

That should help you with its use.

Cheers,

Brad

Former Member
0 Kudos

Table EQST gives you the Equipment to BOM link. (easier than going to EQUI as it has the BOM number)

<b>Scenario 1</b>

Use FM CS_BOM_EXPL_EQU_V2 to get the Materials involved in the Equipment BOM after selecting equipments from EQST.

Long drawn approach as you will have to look at all Equipments.

<b>Scenario 2</b>

An alternative (complex, but time saving) approach is to look at table STPO where

STLTY = 'E' (Equipment BOM)

IDNRK = <u>Your Material</u>

LKENZ = SPACE (Not deleted)

DATUV >= SY-DATUM (Valid-from Date)

Link to table STKO to get STLAL (Alternative BOM, if multiple BOM versions exist)

This will narrow the search to the Materials you are interested in.

Link back to the table EQST to get the Equipment.

<b>CAUTION: Check for validity of the BOM by using FM CS_BOM_EXPL_EQU_V2 as STPO may contain entries that are obsolete or invalid</b>

Cheers!

Rishi