Skip to Content
0
Former Member
Apr 17, 2015 at 08:35 AM

How to clear Cycle Code setting for Item Group (DTW, DI API or GUI)

329 Views

We recently migrated to SAP B1 9.1 from an older version.

It seems that default inventory cycle codes are defined in the item groups, running the following query confirms this:

SELECT T0.[ItmsGrpCod], T0.[ItmsGrpNam], T0.[CycleCode] FROM OITB T0

The results will show some item groups with a cycle code defined, and others for which a cycle code has not been defined.

When I create new items for item groups which have a cycle code defined in the item group, the cycle code will get pre-filled according to the item group setting when I add a warehouse to the inventory tab of the item master data. I don't want this to happen.

Some guides and other topics suggest you can change the cycle code per item group in
setup->inventory->item groups.

However, the cycle code setting is unavailable in the item group settings.

There is simply no such setting in my SAP 9.1 installation.

How do I remove the cycle group setting from the item group?

Methods I've tried so far:

1. Using the Data Transfer Wizard with the following CSV:

Number;CycleCode
Number;CycleCode
100;
101;
102;

It says updated, but the cyclecode remains set when i run the query again.

2. Use the DI API
But I can't figure out how to unset the cyclecode parameter. The DI won't accept 0 as a new value.
Even though 0 is the returned result when I fetch the CycleCode from item groups which do not have a cycle group defined, I cannot set a 0 value.

ItemGroups oItemGroup= (SAPbobsCOM.ItemGroups)oCompany.GetBusinessObject(BoObjectTypes.oItemGroups);
if (oItemGroup.GetByKey(100))
{
    logMsg("ItemGroup CycleCode: " + oItemGroup.CycleCode.ToString());  //Shows numeric result
    int newCycleCode = 0;
    oItemGroup.CycleCode = newCycleCode;               
    int retVal = oItemGroup.Update();
    if (retVal != 0)
    {
        logMsg("Problem while updating cyclecode for group " + oItemGroup.GroupName + ": " + oCompany.GetLastErrorDescription());
    }
}

This script will show an invalid cyclecode error message.

Is there another way to 'unset' the oItemGroup.CycleCode?

Any help would be appreciated!

Thanks.