Delete Iitems of a BOM

Hi,
if there is one item in BOM which needs to be deleted, I use CSAP_MAT_BOM_MAINTAIN function module by using fldelete = 'X' .
But if there are are 2 items which has same item number, then it isnt deleting any one of those 2 items using that function module.  Shd I be mentioning anything more for import parameter other than t_stpodatam-id_item_no,
so that it can recognise each item id.
Or Is there any other function module to delete the items of a BOM. Just let me knowif there are any modules, and how to use them to delete the item of a bom.
regds
Venu

Try function <b>CSAP_BOM_ITEM_MAINTAIN</b>

Similar Messages

  • Delete a range of bom items

    Hi experts,
    I need guidances and solutions on my problem here.
    I retrieve bom level using function 'CS_BOM_EXPL_MAT_V2'. Then it returns all levels of bom components, but here i need to do a checking.
    Loop at table of bom return by function 'CS_BOM_EXPL_MAT_V2', if the matrt = ZHLB and matkl <>WP100 at level 1, then i need to delete all the sub bom items at the following levels(level 2 and level 3) belongs to it.
    How can i do a checking on this and delete all those related bom items?

    u can do by using the table STAB output.

  • Deleted Component appearing in BOM

    Dear Guru's,
    I m facing a strange situation where i have a BOM of material with one component and then i came to knw that,that material is not required any more so i removed the component  and deleted the BOM.
    But when i am running the MRP it is showing the deleted component,i am not able to understand hw it is happening.
    Kindly throw some light on this.
    With Regards.

    check in md04 of that bom component, is there any dependent requirement.May be mrp for that header material
    was carried out earlier before your bom change and later you have run mrp for components individually.
    Do one thing run mrp - single item multi level for your header material again with planing mode 3 - delete and recreate planning data.
    Regards,
    Dhaval

  • Deletion flags for equipment BOM

    Hi,
    In equipment BOM header , there are 2 fields for deletion flag :
    -one is set manually (the one on the right)
    -the other set by the system (the one on the left).
    Can someone explain to me how deletion flag indicator (on the left) work?
    Thanks,
    P.

    Hi,
    To explain this i must say first there is a difference in the Deletion Flag (Right in Header) and Deletion Indicator(Left in Header).
    In SAP term The deletion Indicator shows the item which has already been Deleted from the System and Deletion flag shows that the record has been flagged for deletion and will hence be Archieve (when, depends on the Archieving strategy followed in the company).
    To explain the affect these will have is the Deletion Indicator will not allow you to use the and will show the error as the object has been deleted and is not in the system.
    Deletion flag for BOMs
    Indicator: this BOM will be archived during the next archiving run and, if necessary, deleted from the data base.
    Where as the Deletion Flag will show that the object is ready to be archieved and is set to be deleted.
    Deletion Indicator
    Indicator showing that the BOM header or the BOM item has been deleted with reference to the change number.
    Now there is another difference in the way we can amke the objects active from deletion flag anf the deletion indicator.
    For Deletion flag you have to go to change mode and just remove or untick the deletion flag.
    For Deletion indicator you have to go to Archieve table and pull the object back in to SAP system and it will then show only the deletion flag, which can be removed by the way explained above.
    I hope this was helpful, if yes then please award points.
    Regards
    Anoop

  • Delete ECN for a BOM

    Hi,
    How can we delete ECN along with the BOM to which it is attached? All this is getting affected in future.
    This has got creted by mistake and needs to be removed from SAP.
    Thanks,
    Ravi.

    Ravi,
    I appericiate you having taken time to explain the problem and also how it was solved. This way if the forum continues, it would really help everyone, not only the guys who are posting problems, but also to people like us who answer them, because sometimes, what we suggested may not have been adopted, but alternates would have used.
    That's the greatness of SAP...for one problem multiple approach and solutions possible most of the time. Once again thanks,
    Regards,
    prasobh

  • Tracking of bom deletion information reg :-

    Hi,
    My client has deleted the sale order bom by transaction CS62 for header material.Full bom for that sale order and sale order item material has been deleted.
    Now there is no any bom inside the system.The problem is how to track that information like :-
    1. who has deleted.
    2. when has deleted.
    3. which bom has deleted etc.
    How we can track this information in sap.Which table is getting this information or what can be the other method for getting this information.
    Regards
    Piyush

    Hi,
    You have to implement ECM process
    Refer below link
    http://www.sap-img.com/pp007.htm
    Regards,
    Sankaran

  • Delete sales order BOM

    Is there any possibility to delete sales order bom if sales order is already deleted (archived) (need to set deletion indicator STKO-LOEKZ to X  ).
    If sales order exist in the system I use FMs:
    CSAI_BOM_READ
    CSAI_BOM_MAINTAIN
    and it works nice.
    Is there any FM , BAPIs to do this?  (I don't want to set it using just modify db table)
    Thanks in advance.

    Hi,
    You can delete the slaes order BOM using T-code CS02.
    Regards,
    V. Suresh

  • BOM in which deletion flag is set then it should not show in CS15.

    Hi Experts,
    In BOM where deletion flag is set then also when executing CS15 these are shown , How to restrict this , also need to know for more plants at a time, addition of planner group & it's description and Functional location.
    Pl. guide how to proceed.

    Hi Ashwini,
    First point
    How do you set Deletion Flag to a BOM? (Screen-shot)
    Second Point
    There is an option * (All plants) in Plant field. Select this.
    Jogeswara Rao K

  • BOM Explosion problem

    Hi,
    I have multilevel BOM (almost 10 levels with around 1500 materials), in which many materials repeat at different levels.
    I am facing problem in one of the material during MRP, This material is used at 10 different levels. Altogether to produce a FG it requires in 36 numbers. In different levels quantity of it required is different. Say 8,1,4,2 etc but total qty is 36.
    When MRP is run the requirement generated for this material is same at all levels i.e 36(total qty) / 10  (BOM levels) = 3.6
    But actually system must generate requirements as per BOM quantity. Not sure what is wrong.
    Requesting you all to reply quickly for this issue.
    Regards,
    Pavan

    Hi,
    Below is the little knowledge i have which want to share with all the august people around.Hope it would be helpful enough for you to get the results.
    A BOM is not exploded in the following situations:
    - No BOM is effective:
    -- On the explosion date and in the given area of validity
    For the given effectivity parameters
    - The BOM has a deletion indicator.
    - The BOM is a multiple BOM, and has no alternative that matches the lot size for your required quantity.
    - No BOM matches the selection criteria of the BOM application you selected.
    - This is possible in the following situations, for example:
    -- The application does not take all BOM usages into account.
    For example, the application only takes BOMs that are relevant to production into account, so a BOM that is relevant to sales and distribution is not exploded.
    -- The application selects a specific alternative on the explosion date you require. The material master record supports alternative determination by Explosion date.
    If the specified alternative is not valid on the explosion date, the BOM is not exploded.
    -- The application takes production versions in the material master record into account, but no production version has a BOM that is valid on the explosion date you require. The material master record supports alternative determination by Production version.
    The system only explodes the BOM defined for the production version that matches the alternative and/or usage entered on the explosion date required.
    -- The application only takes BOMs with certain status indicators into account.
    For example, the application for MRP only explodes BOMs that have at least the status Explosion for MRP.
    Further checks:
    - Do the proper Scheduling in Routing (Backward/forward). In md61 give the requirement in next month.check your in-house production, planned delivery time in md02 give MRP Control parameter Rexplode BOM and Routing.
    - Check BOM explosion data in MRP4 view of material master view ( Individual/Coll data).
    Please revert with your response
    Thanking You in Anticipation
    Regards
    Chandra

  • BOM Explosion control based on Procurement type

    Gurus ,
    We have a scenario where we have a Multilevel BOM . During one point of time there is a chnce that one SFG ehich is "E" type gets converted manual into an "F" type due to some practical reasons (I know F part shud not have a BOM). Users do not  delete or inactivate the BOM of this SFG(which has now become F part) .  As a consequence it impacts a report for CUSTOMS wherein a multilevel BOM is exploded for HEADER and reports all the F parts. The result expected is list of all F parts
    EXAMPLE we have FG1 , with Components RM1 and SFG1 .(This SFG1 was [previosly having componets RM1,RM2 and RM3) .
    Scenario 1- if SFG1 was with procurement E , then result iof report after exploding FG1 would be RM1,RM2 and RM3.
    Scenario 2: If SFG1 got converted to F part , then result of report after exploding FG1 should be RM1,SFG1
    Is there a way to control BOM multilevel explosion for only E parts so that BOMs for F parts donot get exploded)
    Ie, BOM application etc...
    THNX
    HKR

    GURU VIVEK
    THANKYOU for the solution, It worked for ME without any issues.
    If you dont mind one small question..when I execute this function module in SE37 I get list of Importa parameters (fields),but do not get its descriptions. HOW TO GET THE DESCRIPTIONS in that sreen.
    THANKYOU LOTSSSS
    Regards,HKR

  • Auto delete Purchase Requisition!!

    Dear,
    I make a Material and attach that material in BOM and run MRP. I got the Purchase Requisition. Again I delete that material from BOM, and Run MRP. But the Purchase Requisition is still there. I want to delete the PR, when the material is deleted from BOM.
    Kandly help me in this.
    Regards
    Biswaranjan

    Just assiging a material to a BOM will not effect that MRP plans this material.
    It plans this material if you e.g. create a production order in reference to this BoM.
    Removing the material from the BoM will not effect the MRP, you would need to change the existing production order  and remove the component there  as well (or delete the entire production order)

  • Re-costing of header material when Sub-item material BOM is updated

    Hi ,
    A sales order is created with a header material (HM) and coressponding sub items (SM1 & SM2 ) got populated automatically from the BOM.Now the costing for this three line items happened as expected i.e.,
    For example :
    Header  Material : HM
              Sub item1 :-      SM1
              Sub item2 :-      SM2
                  MAP of Sub item 1 > SM1  = 20 USD
                  MAP of Sub item 2 > SM2  = 30 USD
    Costing in the main line item appears as 50 USD ( 20 + 30 USD) .
    Now business go to the transaction CU51 and make the changes in the sales order BOM subitem1 ,material SM1 by adding or deleting items in the BOM. After that they are trying to re-cost the sales order and it is observed that only the corresonding sub item (SM1) is getting re-costed with new value.But the header item HM is not getting updated with the new values it still have the old values .
    It would be really helpful if you can let me know what is the issue for this.
    Thanks!
    Regards,
    Dileep.

    Dear Pushpalas,
    IF my understanding is correct then the sub-items is only to split up the exact component quantity and it's usage in the exact
    production or assembly process for information or understanding purpose.
    Sub-items have no operational function in the BOM. They are not copied to the production order. However, you can use sub-
    items to help you create programs for your company (for example, automatic assembly programs).
    http://help.sap.com/erp2005_ehp_05/helpdata/EN/ea/e9b1aa4c7211d189520000e829fbbd/frameset.htm
    Regards
    Mangalraj.S

  • Removal of BOM allocations to plants

    Please send me the sample code for the below program , pls anybody its urgent ... ur help is greatly appreaciated...
    Create a program that removes BOM allocations to plants for a specified range of BOM materials and plants.
    The selection screen should contain the fields:
    Material number (from - to and multiple selection)      - entry should be required/mandatory
    Plant (from - to and multiple selection)
    BOM usage
    Alternative BOM
    The program should utilze the entered information.
    Then remove the BOM allocations specified in the selection screen.
    After the program run  a list is to be displayed that contains the following information:
    1) All errors that have occured while deleting allocations
    2) All BOM - plant - BOM usage - Alternative BOM combinations where the allocation has been deleted.

    Hi saleem,
    Thanks for the reply !!
    could you please email me the code , do I need to use BDC ?? how do I go abt .. please send the code ...
    I'll try from my side but the chances are less as I am totally new to this technology
    if possible please send the entire code .. Either you or any of your friend who knows the solution please send the entire code..
    Rgds,
    Aryan.

  • Turn off BOM explosion

    We have multiple orgs set-up and sometimes our 2nd org needs to purchase material from our main org.
    Our problem is that since we have copied the same BOM's over to the 2nd org, we are driving demand for the piece parts in that org when we really to buy the top level from our main org.
    Instead of either deleting all the extra BOM's or changing makes to buys (which is controlled in the main org) in the 2nd org, we thought we could just change the level that we do not want to explode to "consume" instead of "consume and derive". This does not seem to work. We do not want to turn off the explode entirely in the MRP because we still explode multiple levels, we just want to be able to turn it off where needed. Any suggestions?

    Hi Alex,
    It's been quite some time since I worked with configurable products but I vaguely remember that it's possible to flag BOM components as non-sales-relevant in which case they do not show up in the sales order. Maybe that's worth a try?

  • BAPI to change a BOM copmonent

    Hi gurus,
        I am using a BAPI named by BAPI_BOM_UPLOAD_SAVE.
    With this BAPI i could create a new BOM. But i am not able to change a specific component in the BOM. Is there any indicators to imply the change or is there any BAPI to change the existing BOM component without having the whole structure to be used.
    Regards,
    Nehru.

    FU CSAP_MAT_BOM_MAINTAIN
    Functionality
    You can use function module CSAP_MAT_BOM_MAINTAIN to process simple material BOMs.
    This function module is intended mainly as a tool for changing BOMs. However, it can also be used to create BOMs.
    If you only want to create BOMs, use function module CSAP_MAT_BOM_CREATE.
    To change BOMs, you can also use the following function modules:
    CSAP_MAT_BOM_OPEN
    CSAP_BOM_ITEM_MAINTAIN
    CSAP_MAT_BOM_CLOSE
    For more information and examples, see the documentation of the individual function modules.
    Restrictions:
    To date, you can only process one alternative or variant with this function module. This means that, if you do not enter an alternative for function module CSAP_MAT_BOM_MAINTAIN, the system assumes that you want to process alternative 01.
    To date, changes to the BOM header are not yet supported.
    Please note:
    The item to be changed can be identified in two ways:
    via the fields item category, item number, sort string, and object (depending on the item category, this can be material, document data, or class data).
    The names of these identifying fields begin with 'ID_' and are contained in structure CSIDENT_02. Structure CSIDENT_02 is part of structure STPO_API03.
    You can use any combination of these fields to identify the item, provided the fields identify the item uniquely. Otherwise you see the error message 'Item cannot be identified uniquely'.
    via the BOM node and BOM item counter
    These fields are only known to the system if you have read the BOM before. If you identify the item in this way, you should therefore use function modules CSAP_MAT_BOM_OPEN, CSAP_BOM_ITEM_MAINTAIN, or CSAP_MAT_BOM_CLOSE to change the BOM.
    If the error message 'Item cannot be changed' appears in the log, this can be for the following reasons:
    - The item is not valid on the valid-from date - it becomes valid at a
      later date.
    - The item has already been changed on the same valid-from date
      with a different change number.
    You cannot change the item category of an item that exists already in the system.
    To delete an item, you must identify it as described above for the change function and set the deletion indicator.
    FL_BOM_CREATE (default ' ')
    If you set this indicator to 'X', the system creates a new BOM if it cannot find the BOM you want to change and there is no other error.
    Items can only be created if sufficient data exists to do this.
    The system ignores items with a deletion indicator when creating a BOM.
    FL_NEW_ITEM (default ' ')
    If you set this indicator to 'X', the system creates a new item if it cannot find the item with the identification entered.
    The system ignores items with a deletion indicator.
    Example
    *---- BOM header data structure
    data: begin of tstk2.
              include structure stko_api02.
    data: end of tstk2.
    *---- BOM items table
    data: begin of tstp3 occurs 0.
              include structure stpo_api03.
    data: end of tstp3.
    *---- Object dependencies table
    *     Basis data
    data: begin of tdep2_data occurs 0.
             include structure dep_data.
    data: end of tdep2_data.
    *     Description
    data: begin of tdep2_descr occurs 0.
             include structure dep_descr.
    data: end of tdep2_descr.
    *     Source
    data: begin of tdep2_source occurs 0.
             include structure dep_source.
    data: end of tdep2_source.
    *     Sequence
    data: begin of tdep2_order occurs 0.
             include structure dep_order.
    data: end of tdep2_order.
    *     Documentation
    data: begin of tdep2_doc occurs 0.
             include structure dep_doc.
    data: end of tdep2_doc.
    data: flg_warning like capiflag-warning.
    *- Initialize database log
       call function 'CALO_INIT_API'
            exceptions
                 log_object_not_found     = 1
                 log_sub_object_not_found = 2
                 other_error              = 3
                 others                   = 4.
    *- Fill item data
    *  Exception: items that can be identified uniquely via their item
    *             number
    *  1. Item 0010: change quantity
       clear tstp3.
       tstp3-id_item_no = '0010'.                    "Item identification
       tstp3-comp_qty   = '5.000'.
       append tstp3.
    *  2. Item 0020: delete
       clear tstp3.
       tstp3-id_item_no = '0020'.                    "Item identification.
       tstp3-fldelete   = 'X'.
       append tstp3.
    *- 3. New item 0030 (stock material)
    *  For new items, the ID_ fields, BOM nodes, and BOM item counters are
    *  initial unless they use
    *  FLG_NEW_ITEM
       clear tstp3.
       tstp3-item_no    = '0030'.
       tstp3-component  = 'MAT200'.
       tstp3-item_categ = 'L'.
       tstp3-comp_qty   = '1'.
       tstp3-rel_prod   = 'X'.
       tstp3-sortstring = 'A1'.
       append tstp3.
    *  3. Item 0040: change component
       clear tstp3.
       tstp3-id_item_no = '0040'.                    "Item identification
       tstp3-component  = 'MAT500'.
       append tstp3.
    *- Change BOM
       call function 'CSAP_MAT_BOM_MAINTAIN'
            exporting
                 material   = 'MAT100'
                 plant      = '0001'
                 bom_usage  = '1'
                 valid_from = '14.10.1996'
                 fl_bom_create = ' '
                 fl_new_item = ' '
                 i_stko  = tstko
            importing
                 fl_warning = flg_warning
                 o_stko     = tstk2
            tables
                 t_stpo       = tstp3
            exceptions
                 others  = 1.
       if sy-subrc eq 1.
    *---- Error
    *     Please see log
       endif.
       if flg_warning eq 'X'.
    *---- Please see log for information, warning messages, and success
    *     messages.
       Endif.
    Parameters
    MATERIAL
    PLANT
    BOM_USAGE
    ALTERNATIVE
    VALID_FROM
    CHANGE_NO
    REVISION_LEVEL
    I_STKO
    FL_NO_CHANGE_DOC
    FL_COMMIT_AND_WAIT
    FL_CAD
    FL_BOM_CREATE
    FL_NEW_ITEM
    FL_COMPLETE
    FL_DEFAULT_VALUES
    FL_IDENTIFY_BY_GUID
    FL_WARNING
    O_STKO
    T_STPO
    T_DEP_DATA
    T_DEP_DESCR
    T_DEP_ORDER
    T_DEP_SOURCE
    T_DEP_DOC
    T_DOC_LINK
    T_DMU_TMX
    T_LTX_LINE
    T_STPU
    Exceptions
    ERROR
    Function Group
    CSAP

Maybe you are looking for

  • Ical list view comes up blank

    has anybody had the following issue: opening the ical app on the phone, if it is in 'List' view, then the screen will be blank. if you switch to Day or Month view and then back to List again, then the entries display normally. i didnt have this issue

  • My iphone4 lost the camera and app store icon.

    1. my iphone4 lost the camera and app store icon. how can i get it back? 2. i try to restore the phone through the itunes. but it showed that there is a connection error (with the internet?!!)

  • Using XML to import/export large datasets

    Hi, I have a large customer who is using serveral aplications which exchange data. Now they use MQUE Series to put some data on the line. Each external application has his own interface. We would like to use one interface which uses XML and depending

  • Controls on headphones freeze up in cold weather

    This has been troubling me since the beginning of winter and it's only getting worse. Everytime i go outside and try to use the click controls on the headset they don't work as they they should. They don't click or compress, and it's near impossible

  • Assigning large number if character to a Codepage

    Do  we have a tool / process  which can assign large number of character to a code page, which cannot be done by SAP SPUM4. There are 18 languages and 10 code pages. Languages listed below, French,English,German,Italian,Spanish,Portuguese,Bulgarian,J