Importing SAP Calendars
This procedure describes how to import single or multiple SAP calendars into your Control-M environment.
SAP calendars are converted into a JSON file when they are imported and are deployed using the Control-M Automation API Deploy service.
Begin
-
Do one of the following:
-
Windows: From a Control-M/Agent machine , open the command prompt, and navigate to AgentFolder\CM\SAP\EXE\
-
UNIX: Log in as a Control-M/Agent user.
-
-
Type one of the following commands:
-
To import a single SAP calendar to Windows:
ctmr3req.exe -SAPR3-ACTION IMPORT_CLNDR_JSON -SAPR3_EXP_CLNDR_PATH <output_path> [-SAPR3-ACCOUNT <connection profile> -SAPR3-CALENDAR_NAME <calendar name> -SAPR3-CALENDAR_YEAR <calendar year>] [-SAPR3_CALENDAR_DESCRIPTION <calendar description>]
-
To import a single SAP calendar to UNIX:
ctmr3req -SAPR3-ACTION IMPORT_CLNDR_JSON -SAPR3_EXP_CLNDR_PATH <output_path> [-SAPR3-ACCOUNT <connection profile> -SAPR3-CALENDAR_NAME <calendar name> -SAPR3-CALENDAR_YEAR <calendar year>] [-SAPR3_CALENDAR_DESCRIPTION <calendar description>]
-
To import multiple SAP calendars to Windows:
ctmr3req.exe -SAPR3-ACTION IMPORT_CLNDR_JSON -SAPR3_EXP_CLNDR_PATH <output_path> [SAPR3-CLNDR_FILE <file in JSON format> ]
-
To import multiple SAP calendars to UNIX:
ctmr3req -SAPR3-ACTION IMPORT_CLNDR_JSON -SAPR3_EXP_CLNDR_PATH <output_path> [SAPR3-CLNDR_FILE <file in JSON format> ]
A successful import returns a 0.
An unsuccessful import returns an appropriate error message, such as Connection profile not found.
-
You can import an unlimited amount of SAP calendars in one JSON file.
-
Even if errors occur for specific SAP calendars, all SAP calendars that can be imported are imported.
A payroll controller wants to import existing SAP calendars to Control-M running on Windows. The calendars are used to calculate appropriate payment for days when employees are paid for a half day of work (holiday eve), and when employees are paid in full (holiday).
Example command:
ctmr3req.exe -SAPR3-ACTION IMPORT_CLNDR_JSON -SAPR3-EXP_CLNDR_PATH C:\Users\user\Documents\Calendars -SAPR3-CLNDR_FILE C:\Users\user\Desktop\SAPHolidaysCal.txt
Example contents of the JSON file:
Copy{
"Calendars" :
[
{
"cp": "PAYROLL",
"years" : ["2021","2022"],
"name" : "IL",
"alias" : "Hol_Eve",
"description" : "Half day paid leave"
},
{
"cp": "PAYROLL",
"years" : ["2021","2022","2023"],
"name" : "US",
"alias" : "Full_Hol",
"description" : "Full day paid leave"
}
]
} -
-
Single SAP Calendar Import Parameters
The following table lists the parameters to specify in the ctmr3req command when you import a single SAP calendar:
Parameter |
Description |
---|---|
-SAPR3-EXP_CLNDR_PATH |
Defines the output path for the SAP calendar. |
-SAPR3-ACCOUNT |
Defines the connection profile name to use for exporting the SAP calendar. |
-SAPR3-CALENDAR_NAME |
Defines the name of the SAP calendar. |
-SAPR3-CALENDAR_YEAR |
Defines the year that the SAP calendar refers to. |
-SAPR3-CALENDAR_DESCRIPTION |
Describes the purpose of the SAP calendar. Optional. Max length: 4000 characters |
Multiple SAP Calendars Import Parameters
The following table lists the parameters to specify in the ctmr3req command when you import multiple SAP calendars:
Parameter |
Description |
---|---|
-SAPR3-EXP_CLNDR_PATH |
Defines the output path to send the SAP calendars. |
-SAPR3-CLNDR_FILE |
Specifies the JSON file that contains multiple calendars. See the example below. Parameters:
|