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?…”

 

In details we have the following schema:

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.

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_LOG Internal access authorizations for XMI log
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

o   System administration function: Full authorization

S_APPL_LOG Activity: Display

o   Application log Object name: Full authorization

o   Application log subobject: Full authorization

S_BTCH_ADM Background processing: Background administrator

o   Background administrator ID: Full authorization

S_BTCH_JOB Background processing: Operations on background jobs

o   Job operations: Full authorization

o   Summary of jobs for a group: Full authorization

S_BTCH_NAM Background processing: Background user name

o   Background user name for authorization check: Full authorization

S_PROGRAM ABAP: Program run checks

o   User action ABAP/4 program: Full authorization

o   Authorization group ABAP/4 program: Full authorization

S_RFC Authorization check for RFC access

o   Activity: Full authorization

o   Name of RFC to be protected: Full authorization

o   Type of RFC object to be protected: Full authorization

S_RZL_ADM Activity: Full authorization
S_SPO_ACT Spool: Actions

o   Authorization field for spool actions: Full authorization

o   Value for authorization check: Full authorization

S_SPO_DEV Spool: Device authorizations

o   Spool – Long device names: Full authorization

S_XMI_LOG Internal access authorizations for XMI log

o   Access method for XMI log: Full authorization

S_XMI_PROD Authorization for external management interfaces (XMI)

o   XMI logging – Company name: ABC*

o   XMI logging – Program name: MAESTRO*

o   Interface ID: Full authorization

  1. Save the authorizations.
  2. Generate a profile. Use the same name that you wrote in Role Name.
  3. Exit the authorization management panel and select User.
  4. Add the Workload Scheduler user to the role.
  5. Save the role.
  • Copying correction and transport files

 

SAP UNICODE NW 7.1, or later:

  • K900044.TV1 (for standard jobs scheduling)
  • R900044.TV1 (for standard jobs scheduling)
  • K900751.TV1 (for IDoc monitoring and job throttling)
  • 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/”

From SAPGUI run transaction STMS Go to SAP transaction STMS on your development system and use menu path:

Extras -> Other Requests -> Add

as shown below:

 

The following screen will appear as a popup as below.
Enter the Transport Request number (TV1K900044 in my example) and hit enter.

 

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 …

Fill the mandatory fields and save it

 

Download from SAP support portal the RFC libraries related to the Workload automation platform.

https://support.sap.com/en/index.html [SAP ID required]

 

Searching with RFC key word

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

All is complete now!!!

In case the “Test Connection” is failing the following troubleshooting part will guide into resolution.

Workload Automation uses the SAP RFC Communication library to connect to SAP.

 

When the connection fails, SAP RFC library generates a trace file on the working dir (usually <TWSDIR>\methods):

  • 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

 

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:

B) Wrong Instances

C) Not Existing Client

D) Wrong Username or password

E) Not Existing Logon Group.

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.

  1. 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

port).

  1. 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

Author’s BIO

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.

LinkedIn profile: www.linkedin.com/in/marco-borgianni-b7a1833

Comment wrap
Further Reading
Automation | November 18, 2020
Manage your message delivery system by using Amazon Simple Notification Service (SNS) with Workload Automation
Amazon Simple Notification Service (SNS) is a managed service that provides message delivery from publishers to subscribers (also known as producers and consumers). Publishers communicate asynchronously with subscribers by sending messages to a topic, which is a logical access point and communication channel. Clients can subscribe to the SNS topic and receive published messages using a supported protocol, such as Amazon SQS, AWS Lambda, HTTP, email, mobile push notifications, and mobile text messages.
Automation | November 18, 2020
Simplify Your Queue Service using AWS SQS Plugin with Workload Automation
Let us understand first about AWS Simple Queue Service (SQS), how Amazon SQS works, it is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications.
Automation | November 18, 2020
Manage Your Blue Prism Process by using Blue Prism Plugin with Workload Automation
Before moving into Blue Prism plugin, let us understand what it is all and how it is benefits our workload automation users.Note: Blue Prism is an experimental plugin in our Automation Hub and it may support limited features.
a/icon/common/search Created with Sketch.