Delete BOM items via DI API

hello,,,
I want to ask can i delete my bom items through DI API.
Will the changes of addings and deleting of items through DI API(coding n sdk)be reflected in our SBO.

Dim objBOM As SAPbobsCOM.ProductTrees
Dim intCnt As Integer
Dim strCode As String
Dim objItem As SAPbobsCOM.Items
Dim objRS As SAPbobsCOM.Recordset
Dim boolFlag As Boolean
objItem = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
            objRS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            objRS.DoQuery("Select Code from  OITM ")
            If (objRS.RecordCount > 0) Then
                For intI = 0 To objRS.RecordCount - 1
                    strCode = objRS.Fields.Item(0).Value
                    boolFlag = objItem.GetByKey(strCode)
                    If boolFlag = True Then
                        lngStatus = objBOM.Remove()
                    End If
                    objRS.MoveNext()
                Next
            End If
Note - This code will delete all BOM's.Change the as per u r requirement.

Similar Messages

  • Track Deleted BOM item in Process Order

    Hi Guys,
    I am facing one issue which is described as below.
    when user is converting the Planned order into Process order at that time he has deleted 1 BOM item.
    Now i he is saying that i have not deleted that item and after that he released and done the GI conf GR.
    Now i want to track the change history but i am not able to find the changes done by him.
    I have check so many blogs but i come to know that if he is deleting BOM item during creation we will not able to find.
    Pls help

    Hi D R,
    To the best of my knowledge at the time of creation if some component has been deleted, you can not  track. Because up to that time table entry has not happened. After saving you can see the component.
    If you have some existing process order which is without item deletion, you can compare and check. As well Check the BOM in CS03 and check the BOM inside process order. You can easily find out the component.
    Hope this clarifies and at per your requirement.
    Success.
    Regards,
    Krishnendu.

  • Change BOM warehouse via DI API

    Hi,
    I have developed a POS add-on which uses the SDK to add invoices to SAP. When we use Bill of Materials items of type sales I can only seem to select the warehouse of the parent item. I would like the items which are automatically added to use the same warehouse as the parent. Is there a way to do this?
    thanks

    HI,
    I seem to be having a similar issue.  I add a bom of the template type to an AP invoice.  The template represents a "kit" that our vendor lists that contains two items with catalog numbers that we sometimes purchase separately from the vendor.   Assigning the correct warehouse works fine for the BOM item (which is a phantom item), but the child items go to a different warehouse.  Does anyone know how to make the children go to the same warehouse that i selected?

  • Missing Functionality - Price List on BOM Header via DI API

    short: Cannot access Price List (oitt.pricelist) OR Show BOM components (oitt.showcomp) fields from SDK or DTW on BOM Header.
    longer: issue where we are creating Bills of Material using the DI API. We are unable to fill the Price List on the header (oitt.pricelist) via the DI API. This does not affect functionality of the BOM or any production orders created from the BOM. However it is a problem when we try to rollup prices using Update Parent Item Prices Globally. This utility is looking for the relevant price list in the Bill of Material Header and thus ignoring all of our items that were created via the DI API.

    Are you serious ?
    They use this property to change the Price List of a Goods Receipt ?
    I mean I understand that this is a Marketing Document but the lack of a property for disctinct values like Price List
    is not that good.

  • 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.

  • Delete an ITEM from B1 2 B1

    Hi all,
    i need to maintain the alignement of the Items between 2 companies B1.
    I can insert and update the Items, but when i try to delete an item, i receive the following error in a message monitor B1i:
    com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.bizprocessor.BizProcException: BPE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: java.lang.RuntimeException: Try to retrieve a business object with empty Id!
    Is possible avoid the return of an empty ID, and delete correctly the Item? I need to invoke the DI API with an call?
    Thanks for help

    Hi Marco,
    Deleting function is available in BIU since B1iSN PL10.
    The only trick is that the sender section(<b1im:Payload ObjectRole="S">) is empty in message, thus you can't retrieve the ItemCode from sender section, but retrieve the itemcode from (<b1im:Payload ObjectRole="A">)
    You can refer the attachment for completed solution for BP (Insert, Update and Delete)
    Note: There is no "/BOM" in Xpath
    <xsl:template match="/">
    <xsl:apply-templates select="b1im:B1IMessage/b1im:Body/b1im:Payload[./@ObjectTypeId='B1.2007_BP']"/>
    </xsl:template>
    <xsl:template match="b1im:B1IMessage/b1im:Body/b1im:Payload[./@ObjectTypeId='B1.2007_BP']">
    Kind Regards, yatsea
    Removed the attachment, since it can't be viewed. If anyone needs it, just let me know. I'll create a blog for this soon.
    Edited by: Yatsea Li on Feb 3, 2010 2:42 PM

  • How to delete an item in the table

    hi all ,
    Is anyone there to give me an idea , how to delete the item in the table , by selecting the row. , for the what i have to do , is there any documentation to follow , guide me itys really urgent.

    Hai Madhu,
    It is pretty simple.
    First u define a button. and in onAction  Event of the button write the following code.
    process is as follows:
    1)get the node
    2)get the element
    3)using the method remove_element() ,remove the element.
    <u><b>The Sample Code is as follows</b></u>
    DATA:
          node_flighttab                      TYPE REF TO if_wd_context_node,
          elem_flighttab                      TYPE REF TO if_wd_context_element.
        node_flighttab = wd_context->get_child_node( 'FLIGHTTAB' ).
      get element via lead selection
        elem_flighttab = node_flighttab->get_element(  ).
        node_flighttab->remove_element( element = elem_flighttab ).
    Follow the above code ,it will definately help you.

  • Why I can't delete an item in iCal on iPad 2?

    Why I can't delete an item in iCal on iPad 2? The user manual says: click on the item, choose 'Edit' or something like that and then 'Delete'.
    But clicking on the item only shows the details and not any window for Editing the item.
    I wanted to delete an item in a calendar that is synchronized via Google.
    Thanks for help!

    If you are In the "Day"view in the calendar app, tap on the event  and a window opens up with a red "Delete Event" button at the bottom of the window. Tap that button and then another "Delete Event" button pops up. Tap that to delete.
    In the week view, tap the event and then a window pops up with "Edit" in it - it is in the upper right corner of that window - tap edit, and then repeat the process described above.
    I do not use the Google calendar and maybe the way you have that set up will not allow you to do this directly on the Calendar app on the iPad.

  • Deleting Limit Items on PO even though follow on documents exist

    Dear SRM Experts
    I am hoping someone can explain the below behaviour:
    Where PO's have follows on documents i.e. confirmation and /or invoice you cannot delete PO's items on a PO. This makes sense.
    However we also have PO's with Limit items(created via limit type shopping carts) and even though the PO's have been confirmed and invoiced we can still delete the items on the PO. Is this standard behavior or a bug?
    Why then can you not delete normal items but can delete limit type items where follow on documents have been posted for a PO?
    Thanks
    Nishad.

    Hi
    Which SRM version are you using ?
    Incase of Limit Items, it is a bug.
    We have raised a similar issue with SAP some time back and still waiting for SAP to get back on this.
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Problem in Partial delivery BOM - items not copied in subsequent delivery

    Hi,
    We are using BOM in Sales order and we have activated delivery group for the BOM header item category.
    When we create first delivery we change the BOM header item quantity in delivey ( all the components quantity change accordingly) and save the delivery.
    Now when we try to create second delivery with reference to the same delivery for the left out qunatity in sales order, system is not copying the components of BOM items ( it is only copying BOM header) from sales order to delivery.
    Please let us know how can we create subsequent delivery with reference to the same sales order and delivery should get all the BOM items from SO to delivery.
    Please let me know if you need further information.
    Thanks
    Venkata Rama Reddy,K

    Hi,
    We already set the delivery group to A, and still having the same result.  We change the BOM header quantity only and automatically the component quantity is updated.
    This happens only if there are two header BOM in the Sales Order.  See example below:
    Bom Header 1 = 100
    Bom Component 1a - 80 (partial delivered)
    Bom Component 1b - 20 (partial delivered)
    Bom Header 2 = 200
    Bom Component 2a - 150
    Bom Component 2b - 50
    When creating outbound delivery, initially all the materials are copied to the outbound document.  If we want to delivery only Bom Header 2, then we will delete the Bom Header 1 line item.
    Upon deletion, the status of the component becomes fully delivered in the SO, but the Bom header is still partial delivered.
    Please confirm how to correct this.
    **If there is only one BOM Item in the order, then partial delivery is ok..
    Thank you,

  • Add or Delete Line Item in Billing Creation (VF01)

    Hi,
    During the billing document creation (VF01) for Order-Related Billing (example: Doc Type F5 - Pro Forma for Order), can you
    manually add or delete line items?
    Let's say if Sales Order was created with 3 line items and only 2 line items should be included in Billing Doc F5.  During the
    billing document creation (VF01), it automatically copies all 3 line items.  How can I delete the line item that I don't want
    to be included in Billing Doc F5?  Only way that I know is to put a billing block on Sales Order item so it won't automatically
    copied into a billing document.  But this process is inconvenient.  After F5 document is created, my user will then need to
    remember to go back to Sales order and remove a billing block from that line item.
    Also vice verse, can an item be manually added to a billing document during the creation mode (VF01)?  Is there somewhere
    in the configuration that I can change to allow this?  Or is it a standart SAP practice all items on a billind document have to
    be Order or Delivery-Related?
    Thanks,
    Michelle

    Hi,
    While creating the invoice via VF01. Please go to selection list icon. this will take to you another screen. here you can select the line item you want to copy/bill.
    Please try and let us know.
    Thanks,
    Vishal

  • How to delete an item in adept database

    I would like to know how to delete an item in my adept Inventory or/and in my Distributor with a script putting the ID as a variable.
    What woud you advise ?
    Thanks

    Hai Madhu,
    It is pretty simple.
    First u define a button. and in onAction  Event of the button write the following code.
    process is as follows:
    1)get the node
    2)get the element
    3)using the method remove_element() ,remove the element.
    <u><b>The Sample Code is as follows</b></u>
    DATA:
          node_flighttab                      TYPE REF TO if_wd_context_node,
          elem_flighttab                      TYPE REF TO if_wd_context_element.
        node_flighttab = wd_context->get_child_node( 'FLIGHTTAB' ).
      get element via lead selection
        elem_flighttab = node_flighttab->get_element(  ).
        node_flighttab->remove_element( element = elem_flighttab ).
    Follow the above code ,it will definately help you.

  • BOM Item Details fetching  issue

    Hello Friends,
    Actually I am fetching BOM item details data, with the use of STAS  & STPO tables but to my surprise I am not getting all counter values in STPO tables i.e. first I am passing BOM NO, Alternate & Item ID To STAS table to get counter details and then passing these counter values in STPO table to get item data like qty , variable size item data etc.  But I am unable to find all counters which are available in STAS are present in STPO table e.g. in STAS table there are 113 counters but in case of STPO table only 37 counter values are found.
    Kindly provide your valuable inputs for above mentioned issue.
    Thanks in advance.
    Regards,
    Tejas

    Hi Vivek,
    Thanks for your reply.
    Request if you can elaborate your answer.
    Right now I am taking counter values from STAS and then passing them to STPO but many of counter values are not available even I checked deletion indicator it is not marked with X still those are not available in STPO.
    Regards,
    Tejas

  • Can not delete outbox item on PC

    there are several items in the folder: Nokia phone Browser—〉Nokia N70—〉Messages—〉Outbox, and they can not be deleted on my pc, however, my N70 phone has no these items!
    I can use other functions normally,such as send sms on PC via usb connection, can also delete inbox items on pc via usb/Bluetooth connection.
    How can I delete the “outbox” items?
    My pcsuit: 6.80.22, my windows Xp+sp2, thanks
    btw,you can get more detail through the attached pic.

    Hi,
    I think that it is "feature" that you can not delete messages from Outbox -> I can not do that also. But message is deleted automatic from my Outbox folder when I press button "update" (and phone has sent that message)
    If you go to folder: C:\Documents and Settings\%username%\Phone Browser\Nokia E70\Messages\Outbox\
    And press delete to one of message, what is not working?

  • 2007A PL8 UOMs are missing when creating a document via DI-API

    If a document is created via DI-API the UOMs are missing.
    The behavior till PL8 was that UOMs were taken from the item master when creating a new document.
    Regards

    This is a confirmed Bug. The DI-Api always uses the Inventory UoM. As work around you have to put the Sales UoM into the Inventory UoM.
    I hope they we will fix this soon.
    Regards

Maybe you are looking for