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:

     
  • 相关阅读:
    hutool 解析 Excel
    上传文件
    Cannot construct instance of `com.**` (although at least one Creator exists)
    Java8之Optional
    java8之Stream
    java8之Lambda
    springboot+mybatis事务管理
    queryWrapper in like
    Java 组装 Tree
    JWT
  • 原文地址:https://www.cnblogs.com/hhelibeb/p/6292205.html
Copyright © 2011-2022 走看看