cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

diego_navas
Discoverer
0 Kudos

It may be a little late for you to review this post but it may be helpful for future users looking to solve this issue...

well, I was trying to add or update Item Groups (oItemGroups) using the SDK, the system returned an error about "Invalid Cycle Code"

The error message was completely unrelated to the real problem, the issue is that "Advanced G/L Account Determination" was enabled on the Database (Company Details > Basic Initialization : Enable Advance G/L Account Determination) so, the system will use some rules to post transactions in the accounts.

Therefore, when this feature is enabled DO NOT set a value for any Account

Do not even set empty, null or zeros on the following fields from your object (oItemGroups)

SAP_Object.ExpensesAccount

SAP_Object.RevenuesAccount

SAP_Object.InventoryAccount

SAP_Object.CostAccount

SAP_Object.TransfersAccount

SAP_Object.VarianceAccount

SAP_Object.PriceDifferencesAccount

SAP_Object.NegativeInventoryAdjustmentAccount

SAP_Object.DecreasingAccount

SAP_Object.IncreasingAccount

SAP_Object.ReturningAccount

SAP_Object.ExchangeRateDifferencesAccount

SAP_Object.GoodsClearingAccount

SAP_Object.DecreaseGLAccount

SAP_Object.IncreaseGLAccount

SAP_Object.WIPMaterialAccount

SAP_Object.WIPMaterialVarianceAccount

SAP_Object.WipOffsetProfitAndLossAccount

SAP_Object.InventoryOffsetProfitAndLossAccount

SAP_Object.ExpenseClearingAct

SAP_Object.StockInTransitAccount

SAP_Object.ShippedGoodsAccount

SAP_Object.SalesCreditAcc

SAP_Object.PurchaseCreditAcc

I hope this helps

Diego Navas

2020-07-25

Former Member
0 Kudos

Hi Jasper,

First you need to create one new cycle code.

Then query ocyc table

Find out cycle code and use that code in DTW template to change it in a group.

Cycle code is numeric value.

Regards,

Chintan

Former Member
0 Kudos

Hi Chintan,

I want to unset the cycle code from the item group, so that no default cycle code is filled when I add a warehouse to item master data for a newly created item.

What you're describing, I think, sets a different default cyclecode for an item group, instead of clearing the default cycle group.

Former Member
0 Kudos

Hi Jasper,

You can not change cycle code with  blank. It's a manual job.

Regards,

Chintan

Former Member
0 Kudos

The problem with that is SAP 9.1 is lacking the form to do so:

There is no cycle count setting there anymore.

In a previous SAP version it looked like this:

But that setting seems to be gone now.

Former Member
0 Kudos

Hi,

Could you go through Administration -> setup -> Inventory -> Cycle Code determination and check determination by.

Also double click on row for selection group wise.

Regards,

Chintan

Former Member
0 Kudos

The doubleclick allowed me to clear the cyclecode from most of my inventory-enabled items.

For inventory items the "Cycle Code" isn't automatically filled anymore upon item creation.

For future reference, the blue arrow shows where to doubleclick.

If I now add a new item and have "inventory item" checked in the item master data, then no default cycle code is pre-filled anymore. That's good.

However,

If I disable the "Inventory Item" checkbox, it still seems to fill the cycle code from OITB.CycleCode.

For instance, when only "Purchase Item" or "Sales Item is checked."

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

Furthermore the above query still shows the linked cycle codes to item groups.

I think that's weird.

Why would I ever want to count non-inventory items?

Here's the screenshot:

If i just choose the partgroup (which has cycle code C set in OITB.CycleCode, and then disable "inventory item" and enable "sales item". And if I then add a warehouse, Cycle Code is pre-set to C. Even though it's not an inventory item.

Former Member
0 Kudos

Hi,

It seems it just look at group level. No mater inventory item is ticked or not. But practically only inventory items should have cycle count.

Regards,

Chintan

Former Member
0 Kudos

Hello,

In dtw, instead of leaving the field blank in dtw template, try using forward slash and see if it works for you?

Thanks,

Joseph

Former Member
0 Kudos

Unfortunately that doesn't work. DTW provides the following error message:
"Value must be a whole number in property 'CycleCode' of 'ItemGroups'"