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: 

Where Used list for Material

former_member197703
Participant
0 Kudos
381

Hi,

I want to find Header BOM materials corresponding to component on multi-level basis.

This can be acheived by CS15.

How can i fetch the data which is displayed in CS15 in my Program.

Is there any function module available for this?

Thanks,

Vaibhav

1 ACCEPTED SOLUTION

Former Member
0 Kudos
90

Hi Vaibhav,

Check the following func modules:

CS_WHERE_USED_MAT

CS_WHERE_USED_MAT_VIA_CLA

CS_WHERE_USED_MAT_ANY

For more details you can check the following prog:

RCS15001

Reward points if helpful answer.

Asvhender

3 REPLIES 3

Former Member
0 Kudos
91

Hi Vaibhav,

Check the following func modules:

CS_WHERE_USED_MAT

CS_WHERE_USED_MAT_VIA_CLA

CS_WHERE_USED_MAT_ANY

For more details you can check the following prog:

RCS15001

Reward points if helpful answer.

Asvhender

Former Member
0 Kudos
90

I had done this - here is the code -

REFRESH T_WULTB.
  CLEAR T_WULTB.


  CALL FUNCTION 'CS_WHERE_USED_MAT'
    EXPORTING
      DATUB                            = P_DATUB
      DATUV                            = P_DATUV
      MATNR                            = T_STBA-IDNRK
      WERKS                            = T_STBA-WERKS
    TABLES
      WULTB                            = T_WULTB
      EQUICAT                          = T_EQUICAT
      KNDCAT                           = T_KNDCAT
      MATCAT                           = T_MATCAT
      STDCAT                           = T_STDCAT
      TPLCAT                           = T_TPLCAT
     PRJCAT                           =  T_PRJCAT
   EXCEPTIONS
     CALL_INVALID                     = 1
     MATERIAL_NOT_FOUND               = 2
     NO_WHERE_USED_REC_FOUND          = 3
     NO_WHERE_USED_REC_SELECTED       = 4
     NO_WHERE_USED_REC_VALID          = 5
     OTHERS                           = 6
            .
  IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    EXIT.
  ENDIF.

Hope it helps.

former_member197703
Participant
0 Kudos
90

Thanks