SAP ISH_APPOINTMENTS_MOVE Function Module for IS-H: Move Visit Appointments from Planning Object A to Planning Object B
ISH_APPOINTMENTS_MOVE is a standard ish appointments move SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for IS-H: Move Visit Appointments from Planning Object A to Planning Object B processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for ish appointments move FM, simply by entering the name ISH_APPOINTMENTS_MOVE into the relevant SAP transaction such as SE37 or SE38.
Function Group: NAMB
Program Name: SAPLNAMB
Main Program: SAPLNAMB
Appliation area: N
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISH_APPOINTMENTS_MOVE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'ISH_APPOINTMENTS_MOVE'"IS-H: Move Visit Appointments from Planning Object A to Planning Object B.
EXPORTING
CRITERIA_SOURCE = "Criteria for Appointments to Be Moved
* I_CONDENSE = 'X ' "Move Time Slots Together in Calendar (ON/OFF)
CRITERIA_TARGET = "Criteria for Target Area
* SAVE_IMMEDIATLY = ' ' "Test Mode (ON/OFF)
* LOG = ' ' "Log Appointment Move (ON/OFF)
* TEST_MOVING = ' ' "Test Appointment Move ON/OFF
* PLANNING_INSTANCE = "Instance of Current Appointment Planning
* DIALOG = ' ' "Enter Appointment Move Criteria via a Dialog (ON/OFF)
* DIALOG_COL = '5' "Column Specification of Upper Left Corner of Dialog Box
* DIALOG_ROW = '11' "Row Specification of Upper Left Corner of Dialog Box
IMPORTING
LAST_OKCODE = "Most Recent User Command Executed
CHANGING
* CR_ENV = "Class for Collecting All Objects in Memory
TABLES
* MOVING_LOG = "Results Table for Appointment Move
* TARGET_FACHR = "Specification of Specialties for Target
* EXCL_FCT_LOG = "Exclude Functions from Appointment Move Log
* EXCL_FCT_DIALOG = "Exclude Functions from Appointment Move Dialog Box
* SOURCE_DSPTY = "Specification of Scheduling Type for Source
* SOURCE_ORGFA = "Specifcation of Dept. OUs for Source
* SOURCE_ORGPF = "Specification of Treatment OUs for Source
* SOURCE_FACHR = "Specification of Specialties for Source
* SOURCE_CLASS = "Specification of Patient Classes for Source
* TARGET_DSPTY = "Specification of Scheduling Type for Target
* TARGET_ORGFA = "Specification of Dept. OUs for Target
* TARGET_ORGPF = "Specification of Treatment OUs for Target
EXCEPTIONS
NO_APPOINTMENTS_FOUND = 1 NO_TIME_SLOTS_FOUND = 2 NO_PLANNING_OBJECT_FOUND = 3 INCOMPLETE_CRITERIA = 4 SOURCE_AND_TARGET_EQUAL = 5
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLNAMB_001 IS-H: PAI Exit at Creation/Change of Appointment in Visit Scheduling
EXIT_SAPLNAMB_002 IS-H: PBO Exit At Create/Change Appointment in Visit Scheduling
EXIT_SAPLNAMB_003 IS-H: Create Calendar Entry for Output in Visit Scheduling
IMPORTING Parameters details for ISH_APPOINTMENTS_MOVE
CRITERIA_SOURCE - Criteria for Appointments to Be Moved
Data type: RNAPP4Optional: No
Call by Reference: No ( called with pass by value option)
I_CONDENSE - Move Time Slots Together in Calendar (ON/OFF)
Data type: ISH_ON_OFFDefault: 'X '
Optional: Yes
Call by Reference: No ( called with pass by value option)
CRITERIA_TARGET - Criteria for Target Area
Data type: RNAPP5Optional: No
Call by Reference: No ( called with pass by value option)
SAVE_IMMEDIATLY - Test Mode (ON/OFF)
Data type: RNPB2-SAVE_APPDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOG - Log Appointment Move (ON/OFF)
Data type: RNPB2-PROT_APPDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEST_MOVING - Test Appointment Move ON/OFF
Data type: ISH_ON_OFFDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
PLANNING_INSTANCE - Instance of Current Appointment Planning
Data type: CL_ISH_PRC_PLANNINGOptional: Yes
Call by Reference: No ( called with pass by value option)
DIALOG - Enter Appointment Move Criteria via a Dialog (ON/OFF)
Data type: ISH_ON_OFFDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
DIALOG_COL - Column Specification of Upper Left Corner of Dialog Box
Data type: SY-CUCOLDefault: '5'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DIALOG_ROW - Row Specification of Upper Left Corner of Dialog Box
Data type: SY-CUROWDefault: '11'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ISH_APPOINTMENTS_MOVE
LAST_OKCODE - Most Recent User Command Executed
Data type: SY-UCOMMOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for ISH_APPOINTMENTS_MOVE
CR_ENV - Class for Collecting All Objects in Memory
Data type: CL_ISH_ENVIRONMENTOptional: Yes
Call by Reference: Yes
TABLES Parameters details for ISH_APPOINTMENTS_MOVE
MOVING_LOG - Results Table for Appointment Move
Data type: RNAPP6Optional: Yes
Call by Reference: No ( called with pass by value option)
TARGET_FACHR - Specification of Specialties for Target
Data type: RNRANGEFACHROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCL_FCT_LOG - Exclude Functions from Appointment Move Log
Data type: ISH_T_EXCL_FUNCOptional: Yes
Call by Reference: Yes
EXCL_FCT_DIALOG - Exclude Functions from Appointment Move Dialog Box
Data type: ISH_T_EXCL_FUNCOptional: Yes
Call by Reference: Yes
SOURCE_DSPTY - Specification of Scheduling Type for Source
Data type: RNRANGEDSPTYOptional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_ORGFA - Specifcation of Dept. OUs for Source
Data type: RNRANGEORGFAOptional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_ORGPF - Specification of Treatment OUs for Source
Data type: RNRANGEORGPFOptional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_FACHR - Specification of Specialties for Source
Data type: RNRANGEFACHROptional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_CLASS - Specification of Patient Classes for Source
Data type: RNRANGECLASSOptional: Yes
Call by Reference: No ( called with pass by value option)
TARGET_DSPTY - Specification of Scheduling Type for Target
Data type: RNRANGEDSPTYOptional: Yes
Call by Reference: No ( called with pass by value option)
TARGET_ORGFA - Specification of Dept. OUs for Target
Data type: RNRANGEORGFAOptional: Yes
Call by Reference: No ( called with pass by value option)
TARGET_ORGPF - Specification of Treatment OUs for Target
Data type: RNRANGEORGPFOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_APPOINTMENTS_FOUND - No Appointments to Be Moved Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_TIME_SLOTS_FOUND - No Time Slots Found in Target Area
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PLANNING_OBJECT_FOUND - Planning Object A or B Does not Exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INCOMPLETE_CRITERIA - Insufficient Criteria for Appointment Move
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SOURCE_AND_TARGET_EQUAL - Criteria for Source and Target Are Same; Appointment Move not Possible
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ISH_APPOINTMENTS_MOVE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_cr_env | TYPE CL_ISH_ENVIRONMENT, " | |||
| lt_moving_log | TYPE STANDARD TABLE OF RNAPP6, " | |||
| lv_last_okcode | TYPE SY-UCOMM, " | |||
| lv_criteria_source | TYPE RNAPP4, " | |||
| lv_no_appointments_found | TYPE RNAPP4, " | |||
| lv_i_condense | TYPE ISH_ON_OFF, " 'X ' | |||
| lt_target_fachr | TYPE STANDARD TABLE OF RNRANGEFACHR, " | |||
| lt_excl_fct_log | TYPE STANDARD TABLE OF ISH_T_EXCL_FUNC, " | |||
| lt_excl_fct_dialog | TYPE STANDARD TABLE OF ISH_T_EXCL_FUNC, " | |||
| lt_source_dspty | TYPE STANDARD TABLE OF RNRANGEDSPTY, " | |||
| lv_criteria_target | TYPE RNAPP5, " | |||
| lv_no_time_slots_found | TYPE RNAPP5, " | |||
| lt_source_orgfa | TYPE STANDARD TABLE OF RNRANGEORGFA, " | |||
| lv_save_immediatly | TYPE RNPB2-SAVE_APP, " ' ' | |||
| lv_no_planning_object_found | TYPE RNPB2, " | |||
| lv_log | TYPE RNPB2-PROT_APP, " ' ' | |||
| lt_source_orgpf | TYPE STANDARD TABLE OF RNRANGEORGPF, " | |||
| lv_incomplete_criteria | TYPE RNRANGEORGPF, " | |||
| lv_test_moving | TYPE ISH_ON_OFF, " ' ' | |||
| lt_source_fachr | TYPE STANDARD TABLE OF RNRANGEFACHR, " | |||
| lv_source_and_target_equal | TYPE RNRANGEFACHR, " | |||
| lt_source_class | TYPE STANDARD TABLE OF RNRANGECLASS, " | |||
| lv_planning_instance | TYPE CL_ISH_PRC_PLANNING, " | |||
| lv_dialog | TYPE ISH_ON_OFF, " ' ' | |||
| lt_target_dspty | TYPE STANDARD TABLE OF RNRANGEDSPTY, " | |||
| lv_dialog_col | TYPE SY-CUCOL, " '5' | |||
| lt_target_orgfa | TYPE STANDARD TABLE OF RNRANGEORGFA, " | |||
| lv_dialog_row | TYPE SY-CUROW, " '11' | |||
| lt_target_orgpf | TYPE STANDARD TABLE OF RNRANGEORGPF. " |
|   CALL FUNCTION 'ISH_APPOINTMENTS_MOVE' "IS-H: Move Visit Appointments from Planning Object A to Planning Object B |
| EXPORTING | ||
| CRITERIA_SOURCE | = lv_criteria_source | |
| I_CONDENSE | = lv_i_condense | |
| CRITERIA_TARGET | = lv_criteria_target | |
| SAVE_IMMEDIATLY | = lv_save_immediatly | |
| LOG | = lv_log | |
| TEST_MOVING | = lv_test_moving | |
| PLANNING_INSTANCE | = lv_planning_instance | |
| DIALOG | = lv_dialog | |
| DIALOG_COL | = lv_dialog_col | |
| DIALOG_ROW | = lv_dialog_row | |
| IMPORTING | ||
| LAST_OKCODE | = lv_last_okcode | |
| CHANGING | ||
| CR_ENV | = lv_cr_env | |
| TABLES | ||
| MOVING_LOG | = lt_moving_log | |
| TARGET_FACHR | = lt_target_fachr | |
| EXCL_FCT_LOG | = lt_excl_fct_log | |
| EXCL_FCT_DIALOG | = lt_excl_fct_dialog | |
| SOURCE_DSPTY | = lt_source_dspty | |
| SOURCE_ORGFA | = lt_source_orgfa | |
| SOURCE_ORGPF | = lt_source_orgpf | |
| SOURCE_FACHR | = lt_source_fachr | |
| SOURCE_CLASS | = lt_source_class | |
| TARGET_DSPTY | = lt_target_dspty | |
| TARGET_ORGFA | = lt_target_orgfa | |
| TARGET_ORGPF | = lt_target_orgpf | |
| EXCEPTIONS | ||
| NO_APPOINTMENTS_FOUND = 1 | ||
| NO_TIME_SLOTS_FOUND = 2 | ||
| NO_PLANNING_OBJECT_FOUND = 3 | ||
| INCOMPLETE_CRITERIA = 4 | ||
| SOURCE_AND_TARGET_EQUAL = 5 | ||
| . " ISH_APPOINTMENTS_MOVE | ||
ABAP code using 7.40 inline data declarations to call FM ISH_APPOINTMENTS_MOVE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single UCOMM FROM SY INTO @DATA(ld_last_okcode). | ||||
| DATA(ld_i_condense) | = 'X '. | |||
| "SELECT single SAVE_APP FROM RNPB2 INTO @DATA(ld_save_immediatly). | ||||
| DATA(ld_save_immediatly) | = ' '. | |||
| "SELECT single PROT_APP FROM RNPB2 INTO @DATA(ld_log). | ||||
| DATA(ld_log) | = ' '. | |||
| DATA(ld_test_moving) | = ' '. | |||
| DATA(ld_dialog) | = ' '. | |||
| "SELECT single CUCOL FROM SY INTO @DATA(ld_dialog_col). | ||||
| DATA(ld_dialog_col) | = '5'. | |||
| "SELECT single CUROW FROM SY INTO @DATA(ld_dialog_row). | ||||
| DATA(ld_dialog_row) | = '11'. | |||
Search for further information about these or an SAP related objects