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

Get Material Determination

Former Member
0 Likes
1,030

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
Read only

Former Member
0 Likes
619

Hi

Use the Tables

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

Regards

Anji

Read only

Former Member
0 Likes
619

Hi,

Please check FM CS_WHERE_USED_MAT.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
619

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

Read only

0 Likes
619

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

Read only

Former Member
0 Likes
619

Hi,

Please try FM CS_BOM_EXPL_MAT_V2.

Regards,

Ferry Lianto