Skip to Content
avatar image
Former Member

Have to delete BOM in order to deselect "Sales Item"

My company has done away with ABAS and is switching to SAP B1. Our SAP rep was told that certain bulk products of ours, should not be listed as sales items, however, he failed to mention that it was mandatory to deselect this little box. As a result, I am having to go in and delete the BOM and then delete the bulk from the other packaging types of the same product as well, in order to deselect the "sales item" box. There has to be a way to fix this issue without redoing every single BOM. Any help is great. Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 10, 2017 at 03:14 PM

    Hi Matt,

    If I am getting you right, you can write a DI API program which can Delete the BOM for you in Bulk and the same time it can update your Item Master Data.

    Here is an example to do it:

    SAPbobsCOM.ProductTrees oPT = (SAPbobsCOM.ProductTrees)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductTrees);
    oPT.GetByKey("A00001");
    int R = oPT.Remove();
    
    if (R != 0)
    {
        MessageBox.Show(oCompany.GetLastErrorDescription());
    }
    else
    {
        SAPbobsCOM.Items oItem = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
        oItem.GetByKey("A00001");
        oItem.SalesItem = SAPbobsCOM.BoYesNoEnum.tNO;
        int U = oItem.Update();
    
        if (R != 0)
        {
            MessageBox.Show(oCompany.GetLastErrorDescription());
        }
    }
    

    Kind regards,

    ANKIT CHAUHAN

    SAP SME Support

    Add comment
    10|10000 characters needed characters exceeded