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: 

Get Material Determination

Former Member
0 Kudos

Hi experts,

Does anyone know a FM or BAPI to get the material determination? for instance, I have a GENERIC BOM Material but I need to retrieve its component material level.

1000000401 - GENERIC BOM

-> 1000000560 - Component Level Material.

Thanks in advance,

Carlos

5 REPLIES 5

Former Member
0 Kudos

Hi

Use the Tables

<b>MAST,STKO and STPO</b> and write the code to retrive all BOM items

Regards

Anji

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check FM CS_WHERE_USED_MAT.

Regards,

Ferry Lianto

Former Member
0 Kudos

BAPI_MATERIAL_GET_DETAIL

EPORT Z_BIT400_SRFC.

PARAMETERS: L_ID(18) DEFAULT 'p-100',

PA_DEST TYPE RFCDES-RFCDEST.

DATA: L_MAT_GEN_DATA TYPE BAPIMATDOA, MESS_TEXT(200).

INITIALIZATION.

        • Set Destination group specific

DATA H_FDPOS LIKE SY-FDPOS.

IF SY-UNAME CA '-'.

H_FDPOS = SY-FDPOS + 1.

CONCATENATE 'BIT400DEST' SY-UNAME+H_FDPOS(2) INTO PA_DEST.

ELSE.

PA_DEST = 'BIT400XX'.

ENDIF.

START-OF-SELECTION.

CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'

DESTINATION PA_DEST

EXPORTING

MATERIAL = L_ID

IMPORTING

MATERIAL_GENERAL_DATA = L_MAT_GEN_DATA

EXCEPTIONS

SYSTEM_FAILURE = 2 MESSAGE MESS_TEXT

COMMUNICATION_FAILURE = 3 MESSAGE MESS_TEXT

OTHERS = 4.

CASE SY-SUBRC.

WHEN 0.

WRITE: / L_MAT_GEN_DATA-MATL_DESC,

L_MAT_GEN_DATA-MATL_TYPE,

L_MAT_GEN_DATA-IND_SECTOR,

L_MAT_GEN_DATA-MATL_GROUP,

L_MAT_GEN_DATA-IND_SECTOR,

L_MAT_GEN_DATA-UNIT_OF_WT.

WHEN 2. WRITE: 'System failure: ' COLOR 6, MESS_TEXT.

WHEN 3. WRITE: 'Communication-failure: ' COLOR 6, MESS_TEXT.

WHEN 4. WRITE: 'Error Others' COLOR 6.

ENDCASE.

reward points if helpful

0 Kudos

suguna, your BAPI_MATERIAL_GET_DETAIL only fetch the detail but it does not fetch the BOM explosion

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try FM CS_BOM_EXPL_MAT_V2.

Regards,

Ferry Lianto