This blog aims to show how SAP Calendar Import could be done through Workload Automation. Workload Automation as a product has ready made integration with SAP since the 90’s leveraging the SAP RFC Libraries of SAP using the SAP R/3 Batch Access Method. 

Now , we would see how we can use this same access method to import Freeday Calendars or Workday Calendars from an SAP R/3 System into Workload Automation. 

The r3batch access method can be invoked from TWS/methods Directory(in the older versions) or from the TWSDATA/methods directory in the Newer versions . The export can be for both Freeday Calendars as well as Workday Calendars. The below example is an export of a Freeday Calendar referenced by the Factory Calendar ID 02 exported into a text file /tmp/calendar_03.dat with the name HLI : 

wauser@wa-server:/opt/wa/TWS/methods$ ./r3batch -t RSC -c S4HANAR3BW — ” –calendar_id 02 –year_from 2020 –year_to 2021 –tws_name HLI –getfreedays -filename ‘/tmp/calendar_03.dat’ “ 

Tue Mar 10 09:48:58 2020 

-t RSC represents that the import is for an RFC SAP Calendar. 

-c CalendarName represents that the Calendar name which is imported from the specific SAP System. 

calendar_id XX denotes a 2 Character identifier of the SAP R/3 Calendar to be imported. 

year_from XXXX denotes the Start year from which to start exporting the dates. 

year_to XXXX denotes the End Year upto which you can export dates. 

getfreedays indicates that the export is for Freedays. 

-filename ‘<PATH>/CalendarFileName indicates the name of the file to which export is to be done on the Host OS where you are issuing the command. 

The exported Calendar can be viewed in the File as shown below : 

wauser@wa-server:/opt/wa/TWS/methods$ cat /tmp/calendar_03.dat 

$CALENDAR 

HLI 

  “” 

  01/01/2020 01/04/2020 01/05/2020 01/11/2020 01/12/2020 01/18/2020 01/19/2020 

  01/25/2020 01/26/2020 02/01/2020 02/02/2020 02/08/2020 02/09/2020 02/15/2020 

  02/16/2020 02/22/2020 02/23/2020 02/29/2020 03/01/2020 03/07/2020 03/08/2020 

  03/14/2020 03/15/2020 03/21/2020 03/22/2020 03/28/2020 03/29/2020 04/04/2020 

  04/05/2020 04/10/2020 04/11/2020 04/12/2020 04/13/2020 04/18/2020 04/19/2020 

  04/25/2020 04/26/2020 05/01/2020 05/02/2020 05/03/2020 05/09/2020 05/10/2020 

  05/16/2020 05/17/2020 05/21/2020 05/23/2020 05/24/2020 05/30/2020 05/31/2020 

  06/01/2020 06/06/2020 06/07/2020 06/13/2020 06/14/2020 06/20/2020 06/21/2020 

  06/27/2020 06/28/2020 07/04/2020 07/05/2020 07/11/2020 07/12/2020 07/18/2020 

  07/19/2020 07/25/2020 07/26/2020 08/01/2020 08/02/2020 08/08/2020 08/09/2020 

  08/15/2020 08/16/2020 08/22/2020 08/23/2020 08/29/2020 08/30/2020 09/05/2020 

  09/06/2020 09/12/2020 09/13/2020 09/19/2020 09/20/2020 09/26/2020 09/27/2020 

  10/03/2020 10/04/2020 10/10/2020 10/11/2020 10/17/2020 10/18/2020 10/24/2020 

  10/25/2020 10/31/2020 11/01/2020 11/07/2020 11/08/2020 11/14/2020 11/15/2020 

  11/21/2020 11/22/2020 11/28/2020 11/29/2020 12/05/2020 12/06/2020 12/12/2020 

  12/13/2020 12/19/2020 12/20/2020 12/24/2020 12/25/2020 12/26/2020 12/27/2020 

  12/31/2020 01/01/2021 01/02/2021 01/03/2021 01/09/2021 01/10/2021 01/16/2021 

  01/17/2021 01/23/2021 01/24/2021 01/30/2021 01/31/2021 02/06/2021 02/07/2021 

  02/13/2021 02/14/2021 02/20/2021 02/21/2021 02/27/2021 02/28/2021 03/06/2021 

  03/07/2021 03/13/2021 03/14/2021 03/20/2021 03/21/2021 03/27/2021 03/28/2021 

  04/02/2021 04/03/2021 04/04/2021 04/05/2021 04/10/2021 04/11/2021 04/17/2021 

  04/18/2021 04/24/2021 04/25/2021 05/01/2021 05/02/2021 05/08/2021 05/09/2021 

  05/13/2021 05/15/2021 05/16/2021 05/22/2021 05/23/2021 05/24/2021 05/29/2021 

  05/30/2021 06/05/2021 06/06/2021 06/12/2021 06/13/2021 06/19/2021 06/20/2021 

  06/26/2021 06/27/2021 07/03/2021 07/04/2021 07/10/2021 07/11/2021 07/17/2021 

  07/18/2021 07/24/2021 07/25/2021 07/31/2021 08/01/2021 08/07/2021 08/08/2021 

  08/14/2021 08/15/2021 08/21/2021 08/22/2021 08/28/2021 08/29/2021 09/04/2021 

  09/05/2021 09/11/2021 09/12/2021 09/18/2021 09/19/2021 09/25/2021 09/26/2021 

  10/02/2021 10/03/2021 10/09/2021 10/10/2021 10/16/2021 10/17/2021 10/23/2021 

  10/24/2021 10/30/2021 10/31/2021 11/06/2021 11/07/2021 11/13/2021 11/14/2021 

  11/20/2021 11/21/2021 11/27/2021 11/28/2021 12/04/2021 12/05/2021 12/11/2021 

  12/12/2021 12/18/2021 12/19/2021 12/24/2021 12/25/2021 12/26/2021 12/31/2021 

 

The exported Calendar in the text file can be imported into Workload Automation using a composer add as shown below : 

HCL Workload Automation(UNIX)/COMPOSER 9.5.0.01 (20190703) 

Licensed Materials – Property of IBM* and HCL** 

5698-WSH 

(C) Copyright IBM Corp. 1998, 2016 All rights reserved. 

(C) Copyright HCL Technologies Ltd. 2016, 2019 All rights reserved. 

* Trademark of International Business Machines 

** Trademark of HCL Technologies Limited 

Installed for user “wauser“. 

Locale LANG set to the following: “en 

User: wauser, Host:127.0.0.1, Port:31116 

User: wauser, Host:localhost, Port:31114 

/ 

-add /tmp/calendar_03.dat 

AWSJCL003I The command “add” completed successfully on object “cal=HLI”. 

AWSBIA302I No errors in /tmp/calendar_03.dat. 

AWSBIA288I Total objects updated: 1 

wauser@wa-server:/opt/wa/TWS/methods$ 

So , with the above Steps a Factory Freeday Calendar with ID 02 was imported Successfully into Workload Automation under the name HLI . 

The below example is an export of a Factory Workday Calendar referenced by the Workday Calendar ID 02 exported into a text file /tmp/calendar_02.dat with the name NEW : 

wauser@wa-server:/opt/wa/TWS/methods$ ./r3batch -t RSC -c S4HANAR3BW — ” –calendar_id 02 –year_from 2020 –year_to 2021 –tws_name NEW –tws_description ‘SAP Calendar 02’ –getworkdays -filename ‘/tmp/calendar_02.dat’ “ 

Tue Mar 10 09:43:43 2020 

The exported Calendar can be displayed and viewed as follows : 

wauser@wa-server:/opt/wa/TWS/methods$ cat /tmp/calendar_02.dat 

$CALENDAR 

NEW 

  “SAP Calendar 02” 

  01/02/2020 01/03/2020 01/06/2020 01/07/2020 01/08/2020 01/09/2020 01/10/2020 

  01/13/2020 01/14/2020 01/15/2020 01/16/2020 01/17/2020 01/20/2020 01/21/2020 

  01/22/2020 01/23/2020 01/24/2020 01/27/2020 01/28/2020 01/29/2020 01/30/2020 

  01/31/2020 02/03/2020 02/04/2020 02/05/2020 02/06/2020 02/07/2020 02/10/2020 

  02/11/2020 02/12/2020 02/13/2020 02/14/2020 02/17/2020 02/18/2020 02/19/2020 

  02/20/2020 02/21/2020 02/24/2020 02/25/2020 02/26/2020 02/27/2020 02/28/2020 

  03/02/2020 03/03/2020 03/04/2020 03/05/2020 03/06/2020 03/09/2020 03/10/2020 

  03/11/2020 03/12/2020 03/13/2020 03/16/2020 03/17/2020 03/18/2020 03/19/2020 

  03/20/2020 03/23/2020 03/24/2020 03/25/2020 03/26/2020 03/27/2020 03/30/2020 

  03/31/2020 04/01/2020 04/02/2020 04/03/2020 04/06/2020 04/07/2020 04/08/2020 

  04/09/2020 04/14/2020 04/15/2020 04/16/2020 04/17/2020 04/20/2020 04/21/2020 

  04/22/2020 04/23/2020 04/24/2020 04/27/2020 04/28/2020 04/29/2020 04/30/2020 

  05/04/2020 05/05/2020 05/06/2020 05/07/2020 05/08/2020 05/11/2020 05/12/2020 

  05/13/2020 05/14/2020 05/15/2020 05/18/2020 05/19/2020 05/20/2020 05/22/2020 

  05/25/2020 05/26/2020 05/27/2020 05/28/2020 05/29/2020 06/02/2020 06/03/2020 

  06/04/2020 06/05/2020 06/08/2020 06/09/2020 06/10/2020 06/11/2020 06/12/2020 

  06/15/2020 06/16/2020 06/17/2020 06/18/2020 06/19/2020 06/22/2020 06/23/2020 

  06/24/2020 06/25/2020 06/26/2020 06/29/2020 06/30/2020 07/01/2020 07/02/2020 

  07/03/2020 07/06/2020 07/07/2020 07/08/2020 07/09/2020 07/10/2020 07/13/2020 

  07/14/2020 07/15/2020 07/16/2020 07/17/2020 07/20/2020 07/21/2020 07/22/2020 

  07/23/2020 07/24/2020 07/27/2020 07/28/2020 07/29/2020 07/30/2020 07/31/2020 

  08/03/2020 08/04/2020 08/05/2020 08/06/2020 08/07/2020 08/10/2020 08/11/2020 

  08/12/2020 08/13/2020 08/14/2020 08/17/2020 08/18/2020 08/19/2020 08/20/2020 

  08/21/2020 08/24/2020 08/25/2020 08/26/2020 08/27/2020 08/28/2020 08/31/2020 

  09/01/2020 09/02/2020 09/03/2020 09/04/2020 09/07/2020 09/08/2020 09/09/2020 

  09/10/2020 09/11/2020 09/14/2020 09/15/2020 09/16/2020 09/17/2020 09/18/2020 

  09/21/2020 09/22/2020 09/23/2020 09/24/2020 09/25/2020 09/28/2020 09/29/2020 

  09/30/2020 10/01/2020 10/02/2020 10/05/2020 10/06/2020 10/07/2020 10/08/2020 

  10/09/2020 10/12/2020 10/13/2020 10/14/2020 10/15/2020 10/16/2020 10/19/2020 

  10/20/2020 10/21/2020 10/22/2020 10/23/2020 10/26/2020 10/27/2020 10/28/2020 

  10/29/2020 10/30/2020 11/02/2020 11/03/2020 11/04/2020 11/05/2020 11/06/2020 

  11/09/2020 11/10/2020 11/11/2020 11/12/2020 11/13/2020 11/16/2020 11/17/2020 

  11/18/2020 11/19/2020 11/20/2020 11/23/2020 11/24/2020 11/25/2020 11/26/2020 

  11/27/2020 11/30/2020 12/01/2020 12/02/2020 12/03/2020 12/04/2020 12/07/2020 

  12/08/2020 12/09/2020 12/10/2020 12/11/2020 12/14/2020 12/15/2020 12/16/2020 

  12/17/2020 12/18/2020 12/21/2020 12/22/2020 12/23/2020 12/28/2020 12/29/2020 

  12/30/2020 01/04/2021 01/05/2021 01/06/2021 01/07/2021 01/08/2021 01/11/2021 

  01/12/2021 01/13/2021 01/14/2021 01/15/2021 01/18/2021 01/19/2021 01/20/2021 

  01/21/2021 01/22/2021 01/25/2021 01/26/2021 01/27/2021 01/28/2021 01/29/2021 

  02/01/2021 02/02/2021 02/03/2021 02/04/2021 02/05/2021 02/08/2021 02/09/2021 

  02/10/2021 02/11/2021 02/12/2021 02/15/2021 02/16/2021 02/17/2021 02/18/2021 

  02/19/2021 02/22/2021 02/23/2021 02/24/2021 02/25/2021 02/26/2021 03/01/2021 

  03/02/2021 03/03/2021 03/04/2021 03/05/2021 03/08/2021 03/09/2021 03/10/2021 

  03/11/2021 03/12/2021 03/15/2021 03/16/2021 03/17/2021 03/18/2021 03/19/2021 

  03/22/2021 03/23/2021 03/24/2021 03/25/2021 03/26/2021 03/29/2021 03/30/2021 

  03/31/2021 04/01/2021 04/06/2021 04/07/2021 04/08/2021 04/09/2021 04/12/2021 

  04/13/2021 04/14/2021 04/15/2021 04/16/2021 04/19/2021 04/20/2021 04/21/2021 

  04/22/2021 04/23/2021 04/26/2021 04/27/2021 04/28/2021 04/29/2021 04/30/2021 

  05/03/2021 05/04/2021 05/05/2021 05/06/2021 05/07/2021 05/10/2021 05/11/2021 

  05/12/2021 05/14/2021 05/17/2021 05/18/2021 05/19/2021 05/20/2021 05/21/2021 

  05/25/2021 05/26/2021 05/27/2021 05/28/2021 05/31/2021 06/01/2021 06/02/2021 

  06/03/2021 06/04/2021 06/07/2021 06/08/2021 06/09/2021 06/10/2021 06/11/2021 

  06/14/2021 06/15/2021 06/16/2021 06/17/2021 06/18/2021 06/21/2021 06/22/2021 

  06/23/2021 06/24/2021 06/25/2021 06/28/2021 06/29/2021 06/30/2021 07/01/2021 

  07/02/2021 07/05/2021 07/06/2021 07/07/2021 07/08/2021 07/09/2021 07/12/2021 

  07/13/2021 07/14/2021 07/15/2021 07/16/2021 07/19/2021 07/20/2021 07/21/2021 

  07/22/2021 07/23/2021 07/26/2021 07/27/2021 07/28/2021 07/29/2021 07/30/2021 

  08/02/2021 08/03/2021 08/04/2021 08/05/2021 08/06/2021 08/09/2021 08/10/2021 

  08/11/2021 08/12/2021 08/13/2021 08/16/2021 08/17/2021 08/18/2021 08/19/2021 

  08/20/2021 08/23/2021 08/24/2021 08/25/2021 08/26/2021 08/27/2021 08/30/2021 

  08/31/2021 09/01/2021 09/02/2021 09/03/2021 09/06/2021 09/07/2021 09/08/2021 

  09/09/2021 09/10/2021 09/13/2021 09/14/2021 09/15/2021 09/16/2021 09/17/2021 

  09/20/2021 09/21/2021 09/22/2021 09/23/2021 09/24/2021 09/27/2021 09/28/2021 

  09/29/2021 09/30/2021 10/01/2021 10/04/2021 10/05/2021 10/06/2021 10/07/2021 

  10/08/2021 10/11/2021 10/12/2021 10/13/2021 10/14/2021 10/15/2021 10/18/2021 

  10/19/2021 10/20/2021 10/21/2021 10/22/2021 10/25/2021 10/26/2021 10/27/2021 

  10/28/2021 10/29/2021 11/01/2021 11/02/2021 11/03/2021 11/04/2021 11/05/2021 

  11/08/2021 11/09/2021 11/10/2021 11/11/2021 11/12/2021 11/15/2021 11/16/2021 

  11/17/2021 11/18/2021 11/19/2021 11/22/2021 11/23/2021 11/24/2021 11/25/2021 

  11/26/2021 11/29/2021 11/30/2021 12/01/2021 12/02/2021 12/03/2021 12/06/2021 

  12/07/2021 12/08/2021 12/09/2021 12/10/2021 12/13/2021 12/14/2021 12/15/2021 

  12/16/2021 12/17/2021 12/20/2021 12/21/2021 12/22/2021 12/23/2021 12/27/2021 

 

The Calendar exported can be imported using a composer add command as follows: 

HCL Workload Automation(UNIX)/COMPOSER 9.5.0.01 (20190703) 

Licensed Materials – Property of IBM* and HCL** 

5698-WSH 

(C) Copyright IBM Corp. 1998, 2016 All rights reserved. 

(C) Copyright HCL Technologies Ltd. 2016, 2019 All rights reserved. 

* Trademark of International Business Machines 

** Trademark of HCL Technologies Limited 

Installed for user “wauser“. 

Locale LANG set to the following: “en 

User: wauser, Host:127.0.0.1, Port:31116 

User: wauser, Host:localhost, Port:31114 

/ 

-add /tmp/calendar_02.dat 

AWSJCL003I The command “add” completed successfully on object “cal=NEW“. 

AWSBIA302I No errors in /tmp/calendar_02.dat. 

AWSBIA288I Total objects updated: 1 

wauser@wa-server:/opt/wa/TWS/methods$ 

So, with the above Steps a Factory Workday Calendar with ID 02 was imported Successfully into Workload Automation under the name NEW.

So, in this way, you can import any SAP Factory Calendar into Workload Automation easily or import all SAP Calendars needed for managing SAP Jobs, this greatly reduces any efforts needed in replicating SAP Calendars which are already defined on SAP Side to WA Side. 

 Author’s Bio

Sriram V

Sriram is working with Workload Automation for the last 11.5 years. Started out as a Scheduler, later as an Administrator, SME and India SME of the Product. He has been part of the Product Team in the last few years supporting Workload Automation on SaaS before moving to the Tech Sales and Lab Services of WA. 

LinkedIn: https://www.linkedin.com/in/sriram-v-4163b820/ 

 

Comment wrap
Further Reading
Automation | August 28, 2020
Manage your AWS resources by using AWSCloudFormation with Workload Automation
Let us begin with understanding of AWSCloudformation what it is all about before moving to our AWSCloudformation plugin and how it is benefits to our workload automation users.   AWS CloudFormation provides a common language for you to model and provision AWS and third-party application resources in your cloud environment. AWS CloudFormation allows you to use programming languages or a simple text file to model and provision, in an automated and secure manner, all the resources needed for your applications across all regions and accounts. This gives you a single source of truth for your AWS and third-party resources. Coming to our AWSCloudformation, below diagram summarizes what is our plugin can perform, so our workload customers can make use of this to simplify their infrastructure management as well as easy to implement changes to infrastructure.   To give more clarity on its benefits let us understand with below example,   For a scalable web application that also includes a back-end database, you might use an Auto Scaling group, an Elastic Load Balancing load balancer, and an Amazon Relational Database Service database instance. Normally, you might use each individual service to provision these resources. And after you create the resources, you would have to configure them to work together. All these tasks can add complexity and time before you even get your application up and running.   Instead, you can create or modify an existing AWS CloudFormation template. A template describes all your resources and their properties. When you use that template to create an AWS CloudFormation stack, AWS CloudFormation provisions the Auto Scaling group, load balancer, and database for you. After the stack has been successfully created, your AWS resources are up and running. You can delete the stack just as easily, which deletes all the resources in the stack....
Automation | August 28, 2020
Simplify The Data Loading Using Oracle UCM and HCM Data Loader plugins with Workload Automation
Customers using Oracle Human Resources Cloud face the challenge of continuous bulk loading of large amounts of data at regular intervals. Oracle Human Resources Cloud provides the tools like HCM Data Loader which address this business use case. Now you can automate data loading into Oracle Human Resources cloud using the Oracle UCM and Oracle HCM Data Loader plugins which leverage the HCM Data Loader for the Workload automation users. Business Process automated:       Source: https://docs.oracle.com/en/cloud/saas/human-resources/20a/faihm/introduction-to-hcm-data-loader.html#FAIHM1372446 The above diagram shows the business process automated through these plugins: This process is divided into 2 steps and hence the 2 plugins: A .zip file containing .dat files is placed on the Oracle WebCenter Content server. Here the Oracle WebCenter Content server acts as a staging infrastructure for files that are loaded and processed by the HCM Data Loader. HCM Data Loader imports the data first into its stage tables and then into application tables. Any errors that occur during either the import phase or load phase are reported in the job status and details in job log.   Technical description and workflow Oracle UCM plugin The Oracle UCM enables you to stage data files for processing to HCM Data Loader. It provides easier integration with other business processes by using the Oracle Universal Content Management (UCM) integration. The Oracle UCM Data Loader automates the process of bulk-loading of data. You can load the data files and monitor them from a single point of control. The data is uploaded as zip files to Oracle UCM, which is processed by the HCM Data Loader. This integration helps you save time, resources, and speed up data loading in a secure manner. Prerequisite for the plugins to work: - Oracle Human Resources Cloud service account with correct permissions to access File Import and Export task...
Automation | August 19, 2020
Workload Automation – Customer-centric approach
A customer-centric company is more than a company that offers good customer service. Customer-centric is our HCL Software business philosophy based on putting our customers first and at the core of business in order to provide a positive experience and build long-term relationships. In today’s uncertain world, not even the best contract can capture what will change tomorrow. A contract can only convert to business advantage through a value centric relationship. In the Workload Automation family, we strongly believe in customer collaboration and we have several programs that helps us to nurture relationship with our customers and involve them in the product design and evolution. The Client Advocacy Program is aimed to accelerate customer’s success and to create strategic relationships with HCL’s technical, management and executive leaders. The mission of our Client Advocacy Program is to build a direct relationship with our customers. We really want to be able to hear their voice. The User experience (UX) design in HCL is based on the Design Thinking approach, that relies on users to stay in touch with real-world needs. We work with users to design and build the solution to their needs through continuous participation of the same users in the design process. We really want to bring the user voice in the product design and development.   What this actually means? We take care of the relationship with each customer, no matter of the program. The programs are often just the first engagement: everything can start from a specific request or by pure chance. From the very first meeting with our customer we focus on addressing her/his needs and building trust, no matter if it happens in an Ask the Expert or in a Design Thinking session. We have tons of successful stories that have started from a simple question or even complaint. The entire product team takes care of each customer by looking for the subject matter expert to answer each question. The Customer Advocates often are the first point of contact in the entire organization. They are the customer best buddy; they nurture the relationship with constant...
a/icon/common/search Created with Sketch.