前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >IBase component cannot be created and deleted in the same second

IBase component cannot be created and deleted in the same second

作者头像
Jerry Wang
发布2021-02-20 15:06:49
4220
发布2021-02-20 15:06:49
举报

183284 2014

相关的corrective measure是1612172 (2012) 对应的ticket是0120031469 0001427502 2012 regarding dump in include LCRM_UPLOAD_IBASEMBDOCF17.

Scenario

when we create a new IBASE component via IBASE API and then delete it via FM CRM_IBASE_COMP_DELETE in the same session and then save the transaction, then we meet the exception. The issue could be easily reproduced by running report ZTEST_IBASE_CREATE_DELETE1 in CRM713 sandbox system HAM/504 with WANGJER/Sap12345. Just specify an object ID which does not exist in the system yet, the report will create a new object automatically.

Screenshot1

Issue analysis

Screenshot 2

Screenshot 3 # My correction proposal As you see, in screenshot2 the valfr and valto are exactly the same timestamp, because the creation and deletion of the same IBASE component occurred within the same second.

So my proposal is to change the “<” in line 55 and 64 in screenshot 3 to support this scenario.

After I finished this change in HAM/504, there is still the same exception occurred. The reason this time is because the check fails in line 54 instead: the lv_timlo is subtracted by 1 second from iv_valto.

However after I read your memo in ticket 2012 1427502, it seems it is necessary to have the logic to deduct 1 second on valid_to.

However this logic did cause trouble in the case that creation and deletion occurred within the same second. I try to reproduce the issue reported in ticket 2012 1427502. So I revert your correction locally in HAM/504:

I enable the line 44 and 45 which was deleted in ticket correction:

Then I create a new Object component and save it; then change its description and save again. The buffer table:

Then delete the component and save:

This time buffer table has only ONE entry:

That means I could not reproduce the error “wrong access to the buffer” you mentioned.

# Final solution The basic question is, why is it meaningful to create a component and to delete it in the same run.

The coding and also buffers are not designed for this. Therefore errors may come up at several places.

If they do not need the bdoc’s anyway, they could suppress the processing with removing the entry ibcox_something_to_Post/ib_crm_bdoc_fill in table ibbinding. Yes I have already mentioned the approach to remove entry in view V_IBBINDING to suppress the IBASE BDOC generation.

As long as the creation timestamp and deletion timestamp are not the same, there would be no error. This is also the reason why my proposed workaround ( add WAIT UP TO 1 seconds before the deletion FM call ) works since it forces the deletion timestamp to be 1 second later than the creation timestamp. I also consider that the normal customer would never have such issue since it is impossible for them to create and delete one IBASE component within the same very second in webclient UI ( only possible by developing their custom code )

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-08-05 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 183284 2014
  • Scenario
  • Issue analysis
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档