Fork me on GitHub

i.s.h.med Enhancement for cancelling an appointment

 

This article intends to introduce my experience about enhancement for canceling an appointment. I try writing in English. Maybe there are many syntax errors in the article. This is the first time to do like this for me and I am glad to receive your feedback.

Link to this article: http://www.cnblogs.com/hhelibeb/p/6292205.html

 

As the description in SAP Help Portal, you can define customer-specific enhancements with the following Business Add-Ins (BAdIs) for appointment planning:

Appointments general:

  • BAdI for changing the appointment template (N1_CHG_APP_TEMPLATE)

  • BAdI for the object "Appointment" (N1_APPOINTMENT)

  • BAdI for controlling the planning tool (N1_SET_PLAN_TOOL)

  • Exit for checking an appointment (EXIT_SAPLN1TM_002)

  • BAdI to check when canceling an appointment (N1_CANCEL)

  • BAdI for presetting an appointment (ISH_PLANNING_PREALLOC)

  • Exit for checking an appointment (ISH_PLANNING_CHECK)

  • BAdI for checking for changes to an appointment (ISH_PLANNING_CHECK_CHG)

  • BAdI for saving an appointment (ISH_PLANNING_SAVE)

  • Patient appointment calendar: Define aspects

  • BAdI for appointment lists – Additional fields (ISHMED_APPVIEW_FIELD)

 

In theory, when creating, modifying or cancelling an appointment, the BAdi ISH_PLANNING_SAVE is triggered. So if we want to implement an enhancement for canceling, this BAdi is useful.

But in a certain condition, ISH_PLANNING_SAVE does not work. In the Planning Grid, if we cancel an appoitment by clicking the cancellation button in toolbar instead of "Maintain Appointment" window, the BAdi will not be triggered in canceling process ( also the cancellation option in right click menu of an appointment has same action):

 

To solve the problem, there are two ideas,

  1. Look for another BAdi. ( Actually, there is a "N1_CANCEL" can be used)
  2. Look for a postion which can be enhanced in source code .

I choose the second solution.

Debug the program, we can see when canceling an appointment by the button in toolbar, the program calls CL_ISH_CANCEL-> CANCEL_APPOINTMENT internally:

 

Go to t-code SE24, open this method:

 

Choose Method->Enhance:

 

Then choose Edit->Enhancement operation->Display implicit ehancement option:

 

Editor displays the indicator of the positon where we can insert  enhancement codes in:

 

Choose "Create implemention", and then we can write our own codes in the enhancement:

 

 
posted @   氢氦  阅读(679)  评论(0编辑  收藏  举报
编辑推荐:
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
阅读排行:
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· 【.NET】调用本地 Deepseek 模型
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)
点击右上角即可分享
微信分享提示