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: 

how to calculate the bom component qunatity based on the component Material

Former Member
0 Kudos

hi expects,

How to calculate the bom quantity based on the component material(stpo-idnrk), like same as the standard tcode CS12 or CK13N. how the calculation has done for the standard tcode.

can any one reply for this thread with the correct answer.

3 REPLIES 3

Former Member
0 Kudos

Hi,

Whether you want to calculate STPO-MENGE by 'Ebeln' wise or 'Matnr' wise.

Former Member
0 Kudos

Use FM 'CS_BOM_EXPLOSION_MAT' , It will give u all the components with quantity.

CALL FUNCTION 'CS_BOM_EXPLOSION_MAT'
            EXPORTING
              CAPID                 = 'PP01'
              DATUV                 = SY-DATUM
              MEHRS                 = 'X'
              MTNRV                 = WA_TEMP-MATNR
              WERKS                 = WA_TEMP-WERKS
            TABLES
              STB                   = I_STB
            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
              OTHERS                = 8.
          IF SY-SUBRC <> 0.
          ENDIF.

I355602
Advisor
Advisor
0 Kudos

Hi,

Refer FM CS_WHERE_USED_MAT

Pass the material number (stpo-idnrk) and check the internal table returned.

Hope this helps you.

Regards,

Tarun