SAP /SCMTMS/BAPI_SCHEDULE_SAVEMULT Function Module for Create and Change TM Schedules
/SCMTMS/BAPI_SCHEDULE_SAVEMULT is a standard /scmtms/bapi schedule savemult SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create and Change TM Schedules 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 /scmtms/bapi schedule savemult FM, simply by entering the name /SCMTMS/BAPI_SCHEDULE_SAVEMULT into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SCMTMS/BAPI_SCHEDULE
Program Name: /SCMTMS/SAPLBAPI_SCHEDULE
Main Program: /SCMTMS/SAPLBAPI_SCHEDULE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function /SCMTMS/BAPI_SCHEDULE_SAVEMULT 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 '/SCMTMS/BAPI_SCHEDULE_SAVEMULT'"Create and Change TM Schedules.
EXPORTING
LOGICAL_SYSTEM = "Logical System
* BUSINESS_SYSTEM_GROUP = "Business System Group
* DETERMINE_DISTANCES = ABAP_FALSE "If true ('X'), the distance between locations is calculated
* DEPARTURE_GENERATION = "BAPI Structure for Departure Generation Parameter
TABLES
* SCHEDULE_ROOT = "BAPI structure for TM Schedule Root
* SCHEDULE_ID_CREATED = "BAPI Structure for TM Schedule Description
* SCHEDULE_ID_UPDATED = "BAPI Structure for TM Schedule Description
* RETURN = "Return Parameter
* SCHEDULE_DEP = "BAPI Structure for TM Schedule Departure
* SCHEDULE_DEP_LOC = "BAPI Structure for TM Schedule Location
* SCHEDULE_DEP_RULES = "BAPI Structure for TM Schedule Departure Rule
* SCHEDULE_DEP_RL_STG = "BAPI Structure for TM Schedule Departure Rule Stage
* SCHEDULE_DESC = "BAPI Structure for TM Schedule Description
* SCHEDULE_LOC = "BAPI Structure for TM Schedule Location
* EXTENSION_IN = "Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
* EXTENSION_OUT = "Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
IMPORTING Parameters details for /SCMTMS/BAPI_SCHEDULE_SAVEMULT
LOGICAL_SYSTEM - Logical System
Data type: BAPISCMBGENFIELDS-LOGICAL_SYSTEMOptional: No
Call by Reference: No ( called with pass by value option)
BUSINESS_SYSTEM_GROUP - Business System Group
Data type: BAPISCMBGENFIELDS-LOGQSOptional: Yes
Call by Reference: No ( called with pass by value option)
DETERMINE_DISTANCES - If true ('X'), the distance between locations is calculated
Data type: BOOLE_DDefault: ABAP_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DEPARTURE_GENERATION - BAPI Structure for Departure Generation Parameter
Data type: /SCMTMS/S_SCH_BAPI_GEN_DEPOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for /SCMTMS/BAPI_SCHEDULE_SAVEMULT
SCHEDULE_ROOT - BAPI structure for TM Schedule Root
Data type: /SCMTMS/S_SCH_BAPI_ROOTOptional: Yes
Call by Reference: Yes
SCHEDULE_ID_CREATED - BAPI Structure for TM Schedule Description
Data type: /SCMTMS/S_SCH_BAPI_DESCRIPTIONOptional: Yes
Call by Reference: Yes
SCHEDULE_ID_UPDATED - BAPI Structure for TM Schedule Description
Data type: /SCMTMS/S_SCH_BAPI_DESCRIPTIONOptional: Yes
Call by Reference: Yes
RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
SCHEDULE_DEP - BAPI Structure for TM Schedule Departure
Data type: /SCMTMS/S_SCH_BAPI_DEPOptional: Yes
Call by Reference: Yes
SCHEDULE_DEP_LOC - BAPI Structure for TM Schedule Location
Data type: /SCMTMS/S_SCH_BAPI_DEP_LOCOptional: Yes
Call by Reference: Yes
SCHEDULE_DEP_RULES - BAPI Structure for TM Schedule Departure Rule
Data type: /SCMTMS/S_SCH_BAPI_DEP_RULESOptional: Yes
Call by Reference: Yes
SCHEDULE_DEP_RL_STG - BAPI Structure for TM Schedule Departure Rule Stage
Data type: /SCMTMS/S_SCH_BAPI_DEP_RL_STGOptional: Yes
Call by Reference: Yes
SCHEDULE_DESC - BAPI Structure for TM Schedule Description
Data type: /SCMTMS/S_SCH_BAPI_DESCRIPTIONOptional: Yes
Call by Reference: Yes
SCHEDULE_LOC - BAPI Structure for TM Schedule Location
Data type: /SCMTMS/S_SCH_BAPI_LOCATIONOptional: Yes
Call by Reference: Yes
EXTENSION_IN - Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
EXTENSION_OUT - Ref. structure for BAPI parameter ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for /SCMTMS/BAPI_SCHEDULE_SAVEMULT 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: | ||||
| lt_schedule_root | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_ROOT, " | |||
| lv_logical_system | TYPE BAPISCMBGENFIELDS-LOGICAL_SYSTEM, " | |||
| lt_schedule_id_created | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_DESCRIPTION, " | |||
| lt_schedule_id_updated | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_DESCRIPTION, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lt_schedule_dep | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_DEP, " | |||
| lv_business_system_group | TYPE BAPISCMBGENFIELDS-LOGQS, " | |||
| lt_schedule_dep_loc | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_DEP_LOC, " | |||
| lv_determine_distances | TYPE BOOLE_D, " ABAP_FALSE | |||
| lt_schedule_dep_rules | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_DEP_RULES, " | |||
| lv_departure_generation | TYPE /SCMTMS/S_SCH_BAPI_GEN_DEP, " | |||
| lt_schedule_dep_rl_stg | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_DEP_RL_STG, " | |||
| lt_schedule_desc | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_DESCRIPTION, " | |||
| lt_schedule_loc | TYPE STANDARD TABLE OF /SCMTMS/S_SCH_BAPI_LOCATION, " | |||
| lt_extension_in | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_extension_out | TYPE STANDARD TABLE OF BAPIPAREX. " |
|   CALL FUNCTION '/SCMTMS/BAPI_SCHEDULE_SAVEMULT' "Create and Change TM Schedules |
| EXPORTING | ||
| LOGICAL_SYSTEM | = lv_logical_system | |
| BUSINESS_SYSTEM_GROUP | = lv_business_system_group | |
| DETERMINE_DISTANCES | = lv_determine_distances | |
| DEPARTURE_GENERATION | = lv_departure_generation | |
| TABLES | ||
| SCHEDULE_ROOT | = lt_schedule_root | |
| SCHEDULE_ID_CREATED | = lt_schedule_id_created | |
| SCHEDULE_ID_UPDATED | = lt_schedule_id_updated | |
| RETURN | = lt_return | |
| SCHEDULE_DEP | = lt_schedule_dep | |
| SCHEDULE_DEP_LOC | = lt_schedule_dep_loc | |
| SCHEDULE_DEP_RULES | = lt_schedule_dep_rules | |
| SCHEDULE_DEP_RL_STG | = lt_schedule_dep_rl_stg | |
| SCHEDULE_DESC | = lt_schedule_desc | |
| SCHEDULE_LOC | = lt_schedule_loc | |
| EXTENSION_IN | = lt_extension_in | |
| EXTENSION_OUT | = lt_extension_out | |
| . " /SCMTMS/BAPI_SCHEDULE_SAVEMULT | ||
ABAP code using 7.40 inline data declarations to call FM /SCMTMS/BAPI_SCHEDULE_SAVEMULT
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 LOGICAL_SYSTEM FROM BAPISCMBGENFIELDS INTO @DATA(ld_logical_system). | ||||
| "SELECT single LOGQS FROM BAPISCMBGENFIELDS INTO @DATA(ld_business_system_group). | ||||
| DATA(ld_determine_distances) | = ABAP_FALSE. | |||
Search for further information about these or an SAP related objects