Skip to Content
0

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

Aug 10, 2017 at 02:19 PM

38

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

ANKIT CHAUHAN
Aug 10, 2017 at 03:14 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded