cancel
Showing results for 
Search instead for 
Did you mean: 

Error Message - Date ranges are Overlapped when validating OITM.FrozenFor through UI

Former Member
0 Kudos

Hi experts,

In Item Master Data Form , I have created a Button with the following functionality:

When the Button is Clicked, the current ItemCode (ParentItem) in Item Master Data is stored into a variable and according to this itemcode, I want to set a Specific Item (ChildItem) as Inactive.

I use the following code for this action, but it returns Message that date ranges are overlapped. I do not want to set any Date Values in Fields Frozen From/To

The code is:

Dim oChildItem As SAPbobsCOM.Items

oChildItem = oCompany5.GetBusinessObject((SAPbobsCOM.BoObjectTypes.oItems))

oChildItem = oCompany.GetBusinessObject((SAPbobsCOM.BoObjectTypes.oItems)) oChildItem.GetByKey(str)

If (oChildItem.ItemCode <> " ") Then

     oChildItem.Frozen = BoYesNoEnum.tYES

     oChildItem.Update()

END IF

I use SAP 8.82 (8.82.067) PL05.

Thanks in Advance,

Vasilis


Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi Vassilis,

Could you please add the following line to your code, before .Update(), and test?

oItem.FrozenFrom = Now()

Regards,

Johan

Former Member
0 Kudos

Hi Johan,

the issue solved with adding the code below:

oChildItem.Frozen = BoYesNoEnum.tYES

oChildItem.Valid = BoYesNoEnum.tNo

Best Regards.

Johan_H
Active Contributor
0 Kudos

Ah, yes of course. Since 8.8 you need to explicitly set both, I forgot about that.

Answers (0)