Skip to Content

BAPI (BOM) TOP Material

HI all

I have the following problem:

Selection: Material (Component)

I can find the next BOM level with the FM "CS_WHERE_USED_MAT". But I need the TOP level.

Is there a better FM/BAPI that I can use to find the last material number (final assembly)?

Thanks

Alex

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2008 at 03:21 PM

    Hi,

    I know functions that get the structure to the deepest level but on the opposite way not ... and it would interesting to learn.

    I might suggest that you work with a loop in order to get the top-level in the structure:

    DO WHILE SUBRC = 0.

    Call function CS_WHERE_USED_MAT

    exporting

    MATNR = MYMATNR

    importing

    exceptions.

    if sy-subrc = 0.

    read table MATCAT where ....

    move MATCAT-MATNR to MYMATNR.

    else.

    subrc = 4.

    endif.

    ENDDO.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.