• 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:

     
  • 相关阅读:
    注解方式整合mybatis & SpringBoot整合分页助手 & SpringBoot整合JSP
    xml方式整合mybatis
    @SpringBootApplication&多环境配置&引入外部配置信息
    用例图&类图
    OOP特性介绍&域模型&静态建模和动态建模
    Git标签
    Git分支
    zabbix监控es集群健康状态(python2.7)
    Django使用问题记录
    failed to update local proxy configuration copy: unexpected field "hosts.available"解决
  • 原文地址:https://www.cnblogs.com/hhelibeb/p/6292205.html
Copyright © 2020-2023  润新知