Skip to Content
author's profile photo Former Member
Former Member

BAPI for creation of Equipment BOM

Which BAPI is used for creation of Equipment BOM?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2013 at 12:44 PM

    Hi,

    Check this Code, it works:

    DATA ecsin TYPE csin.

    DATA estkob TYPE stkob .

    DATA estzub TYPE stzub .

    DATA astlnr TYPE stzub-stlnr .

    DATA t_stpob TYPE STANDARD TABLE OF stpob WITH HEADER LINE .

    PARAMETERS: pa_equnr TYPE equnr DEFAULT '1500037'. "Your Equipment.

    START-OF-SELECTION.

    ecsin-equnr = pa_equnr.

    ecsin-stlty = 'E' .

    ecsin-stlan = '4' .

    ecsin-werks = 'C002'. "Your Plant.

    ecsin-datuv = '20130101'.

    estkob-bmein = 'ST'.

    estkob-bmeng = 1.

    estkob-stktx = 'TEST'.

    t_stpob-stlty = 'M' .

    t_stpob-postp = 'L' .

    t_stpob-idnrk = '000000000040002882'. "Your Component.

    t_stpob-meins = 'ST' .

    t_stpob-menge = 1 .

    t_stpob-rvrel = 'X' .

    APPEND t_stpob .

    t_stpob-menge = 2.

    t_stpob-idnrk = '000000000040002877'. "Your Component.

    APPEND t_stpob.

    CALL FUNCTION 'CSAI_BOM_CREATE'

    EXPORTING

    ecsin = ecsin

    estkob = estkob

    estzub = estzub

    * FL_NO_CHANGE_DOC = ' '

    * FL_COMMIT_AND_WAIT = ' '

    * FL_NO_COMMIT_WORK = ' '

    * FL_ALE = ' '

    IMPORTING

    * FL_WARNING =

    astlnr = astlnr

    TABLES

    t_stpob = t_stpob

    EXCEPTIONS

    error = 1

    OTHERS = 2.

    IF astlnr IS INITIAL.

    ****ERROR.

    ENDIF.

    IF sy-subrc <> 0.

    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Regards,

    Sergio.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2007 at 01:18 PM

    HI,

    'CSAI_BOM_CREATE' can be used to create the Equipment BOM, only thing is you need to pass STLTY as 'E' in structure STKOB, this will create equipment BOM,

    Chk the below links you might get an idea.

    /people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap

    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm

    Reward points for the helpful answer.

    Regards,

    Sudheer

    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.