WORKLOAD AUTOMATION COMMUNITY
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
    • IWA 9.5 Roadshows
  • About
  • Contact
  • What's new

All you need to know about how to setup SAP connection in Workload Automation

11/5/2020

0 Comments

 
Picture
The SAP batch access method enables communication between an external SAP system and Workload Automation and provides a single point of entry for automating the launching of jobs, monitoring the status of jobs, and managing exceptions and recovery.
“ …Which are the steps you need to follow to setup faster your Workload Automation environment to the target SAP system?...”
​
Picture
​In details we have the following schema:
Picture
​Workload Automation can use the Gateway Service, listening on port 33XX where XX is the instance number, to connect to a given Application Server instance.
Picture
​Object.                                             Description                                       Authorization
S_RFC                                             Auth. check for RFC access             S_RFC_ALL

 
·S_RFC                   Authorization check for RFC access
Ø Activity:                                                         full authorization
Ø Name of RFC to be protected:                   full authorization
Ø Type of RFC object to be protected:         full authorization

In SAP environment you must:
  • Creating a Workload Automation RFC user with one of the following attributes: CPIC, Communications, or DIALOG, depending on the SAP release.
  • Create the authorization profile with PFCG profile generator

​Perform the following steps: 
  1. Write a name, for example ZTWS, in Role Name.
  2. Click Create Role and write a description for the role, such as "Role for the TWS user."
  3. Save the role.
  4. Select Authorizations.
  5. Click Change Authorization Data.
  6. In the pop-up, select Templates.
  7. Manually add the following authorization objects: ​​
Object ​
Description
S_ADMI_FCD
System authorizations
S_APPL_LOG
Application logs
S_BTCH_ADM ​
Background processing: Background administrator
S_BTCH_JOB ​
Background processing: Operations on background jobs
S_BTCH_NAM ​
Background processing: Background user name
S_PROGRAM
ABAP: Program run checks
S_DEVELOP
ABAP Workbench: full authorization to modify objects of type PROG
S_LOG_COM
Authorization to run external commands
S_RFC ​
Authorization check for RFC access
S_RZL_ADM
CCMS: System Administration
S_SPO_ACT ​
Spool: Actions ​
S_SPO_DEV ​
Spool: Device authorizations
S_XMI_PROD ​
Authorization for external management interfaces (XMI)
8. Fill in the values according to the following scheme: 
Object
Description
S_ADMI_FCD ​
System authorizations 
  • System administration function: Full authorization
S_APPL_LOG ​
Activity: Display 
  • Application log Object name: Full authorization
  • Application log subobject: Full authorization
S_BTCH_ADM
Background processing: Background administrator 
  • Background administrator ID: Full authorization
S_BTCH_JOB
Background processing: Operations on background jobs 
  • Job operations: Full authorization
  • Summary of jobs for a group: Full authorization
S_BTCH_NAM
Background processing: Background user name 
  • Background user name for authorization check: Full authorization
S_PROGRAM
ABAP: Program run checks 
  • User action ABAP/4 program: Full authorization
  • Authorization group ABAP/4 program: Full authorization
S_RFC
Authorization check for RFC access 
  • Activity: Full authorization
  • Name of RFC to be protected: Full authorization
  • Type of RFC object to be protected: Full authorization
S_RZL_ADM
Activity: Full authorization
S_SPO_ACT
Spool: Actions 
  • Authorization field for spool actions: Full authorization
  • Value for authorization check: Full authorization
S_SPO_DEV
Spool: Device authorizations 
  • Spool - Long device names: Full authorization
S_XMI_LOG
Internal access authorizations for XMI log 
  • Access method for XMI log: Full authorization
S_XMI_PROD
Authorization for external management interfaces (XMI) 
  • XMI logging - Company name: ABC*
  • XMI logging - Program name: MAESTRO*
  • Interface ID: Full authorization
9. Save the authorizations.
10. Generate a profile. Use the same name that you wrote in Role Name.
11. Exit the authorization management panel and select User.
12. Add the Workload Scheduler user to the role.
13. Save the role.
  • Copying correction and transport files
 
SAP UNICODE NW 7.1, or later:
 
  1. K900044.TV1 (for standard jobs scheduling)
  2. R900044.TV1 (for standard jobs scheduling)
  3. K900751.TV1 (for IDoc monitoring and job throttling)
  4. R900751.TV1 (for IDoc monitoring and job throttling)
 
SAP Transport Request contains 2 files: 
first one starts with "R" character and second one stars with "K" character. 
First one should be placed in server folder: 
 
"/usr/sap/trans/data/"

and second one should be placed in server folder: 
 
"/usr/sap/trans/cofiles/"
 
Extras -> Other Requests -> Add
 
as shown below:
Picture
​The following screen will appear as a popup as below. 
Enter the Transport Request number (TV1K900044 in my example) and hit enter.
Picture
​Transport Request will be added to the queue, now you can select and import it to your system. Installation completed.
 
 
In Workload Automation environment you must:
Create your connection settings from “SAP Connection DATA” panel
clicking on New …
Picture
​ 
Fill the mandatory fields and save it
Picture
Download from SAP support portal the RFC libraries related to the Workload automation platform.
 
  •  [SAP ID required]
Picture
​Searching with RFC key word
Picture
​You must download based on your SAP release
 
Check the following SAP notes for details:
 
2451423 - End of support date for SAP RFC SDK
2573790 - Installation, Support and Availability of the SAP NetWeaver RFC Library 7.50

Patch-Level:

If you want to determine the exact Patch Level that you have currently installed, you can do so be executing the following OS command on the binary (replace the placeholder <sapnwrfc> with the platform-dependent name of the shared library, e.g. "libsapnwrfc.so" on most UNIXs or "libsapnwrfc.dylib" on MacOS):

  • Unix/Linux/MacOS:  strings libsapnwrfc.so | grep Patch
  • Microsoft Windows:  findstr Patch sapnwrfc.dll
 
Unpack the SAP RFC package and copy the libraries present in “lib” folder to Workload Automation “methods” folder, in TWSDATA path, assigning the correct owner and grants
Picture
 
All is complete now!!!
​
Picture
​In case the “Test Connection” is failing the following troubleshooting part will guide into resolution.
Picture
​Workload Automation uses the SAP RFC Communication library to connect to SAP.
Picture
When the connection fails, SAP RFC library generates a trace file on the working dir (usually <TWSDIR>\methods):
Ø  dev_rfc.trc (and rfcxxxxx_yyyyy.trc) on Windows
Ø  dev_rfc (and CPICTRCxxxxx) on Unix.
 
These text files contain the RFC Error message that allows you to understand the problem occurred
 
To activate the rfc trace you have the following ways:
 
1) Adding debug and trace options via DWC UI
​
Picture
​2) Setting the following variables in the environments.
RFC_TRACE_DIR=$R3BATCH_DIR
CPIC_TRACE_DIR=$R3BATCH_DIR
 
With the following lines:
 
DEBUG=TRUE
RFC_TRACE=99
CPIC_TRACE=3
 
RFC_TRACE_DIR=$R3BATCH_DIR
CPIC_TRACE_DIR=$R3BATCH_DIR
 
export DEBUG RFC_TRACE CPIC_TRACE RFC_TRACE_DIR CPIC_TRACE_DIR
 
Suppose the SAP system (system number: XYZ) has just one ABAP Application Server instance (instance number: 00) with two clients (000 and 100).
 
Message Server and Gateway Service are listening on ports 3600 and 3300 respectively.
Here it is a most common connection issue due to wrong configuration settings

A. Unknown hostname:
Picture
B. Wrong Instances
Picture
C. Not Existing Client
Picture
D.  Wrong Username or password
Picture
E. Not Existing Logon Group.
Picture
​Ensure that the file services 
- on UNIX:                 /etc/services
- on Windows:        C:\Windows\system32\drivers\etc\services
contain an entry for the message server port of the SAP system to which r3batch connects. The entry has the following format: 
 
sapmsSID 36system_number/tcp 
 
where: SID is the SAP system ID, and system number is the SAP system number.
 
RFC_ERROR_COMMUNICATION with error “service sapmsXYZ unknown"         
Likely Causes:                                                          
1. The R/3 which you are trying to connect to is down or overloaded.    
Please login through the SAPLogon  to check if this works.                                                
2. The most likely reason could be that the RFC communication service is not maintained for the R/3  system you want to use on the J2EE.                                     
 
The solution is with respect to Point 2) above                           
1. In the file %windir%\system32\drivers\etc\services add an entry      
sapms<SID> <PORT>/tcp" (<SID> = R/3 system ID, <PORT> = message server  




2. Run "Update SAPPCADM" in Windows Start / SAPPCADM. This will (among other things) update the above mentioned file with data for SAP internal R/3 systems. This is only for Internal SAP use.                                              
 
The error only occurs for "load balanced" connections as only these need this message server entry.

F. Wrong System ID
Picture
Author's BIO
Picture
​Marco Borgianni, Enterprise Architect
 
I'm currently an Enterprise Architect working in HCL services team for Workload Automation, an IBM + HCL product. I'm been working in the Workload Automation area since 2000 as a developer, test, Level 3 support and Customer Service Specialist. Covering several aspect of this product. A long customer experience as part of services team, I have acquired a deep knowledge of customers' needs in that area. I'm interested in everything that is strongly related to supporting customers in their technological challenges. I have a background in computer science technologies, in the design and development of integrations with ERP and Business Intelligent and Analytic tools.
View my profile on LinkedIn
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Archives

    March 2023
    February 2023
    January 2023
    December 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    January 2020
    December 2019
    November 2019
    October 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017

    Categories

    All
    Analytics
    Azure
    Business Applications
    Cloud
    Data Storage
    DevOps
    Monitoring & Reporting

    RSS Feed

www.hcltechsw.com
About HCL Software 
HCL Software is a division of HCL Technologies (HCL) that operates its primary software business. It develops, markets, sells, and supports over 20 product families in the areas of DevSecOps, Automation, Digital Solutions, Data Management, Marketing and Commerce, and Mainframes. HCL Software has offices and labs around the world to serve thousands of customers. Its mission is to drive ultimate customer success with their IT investments through relentless innovation of its products. For more information, To know more  please visit www.hcltechsw.com.  Copyright © 2019 HCL Technologies Limited
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
    • IWA 9.5 Roadshows
  • About
  • Contact
  • What's new