zoukankan      html  css  js  c++  java
  • 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:

     
  • 相关阅读:
    Git——快速安装Git及初始化配置【二】
    Git——Git的简单介绍【一】
    web scraper——简单的爬取数据【二】
    web scraper——安装【一】
    PHP——实现随机打乱一个二维数组
    Vue——显示微信用户名称中enjoin表情
    Vue——轻松实现vue底部点击加载更多
    微信报错——10003
    Java_myBatis_逆向工程
    Java_myBatis_XML代理_动态SQL
  • 原文地址:https://www.cnblogs.com/hhelibeb/p/6292205.html
Copyright © 2011-2022 走看看