cancel
Showing results for 
Search instead for 
Did you mean: 

Function module to get the BOM details for a material-plant combination

Former Member
0 Kudos

hi

Is there any function module to get the BOM details such as

BOM Usage -STLAN

Alternative BOM -STLAL

Items -POSNR

Required Quantity-EMENG

Resulting Quantity-MENGE

Unit of measure -BMEIN

Base unit of measure-MEINS

for a given material-plant combination

if so please suggest me some FMs.................

Awaiting for ur reply..............

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

try the below fm it may be useful for you

DATA : BEGIN OF I_BOM OCCURS 0.

INCLUDE STRUCTURE STPOX.

DATA : END OF I_BOM.

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

CAPID = 'PP01'

DATUV = SY-DATUM

MEHRS = 'X'

MTNRV = P_MATNR

WERKS = P_WERKS

TABLES

STB = I_BOM

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.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

just befor use it check your application area.for my case it is PP01. you can find it in CS12 when you are exploding the bom the value you are giving in BOM application that is the value for CAPID.

Just go to se37 and checkout the fm it has lot of options here I am using the minimum things.

regards

shiba dutta