SAP R3 Variant name truncates if underscore used as last character
search cancel

SAP R3 Variant name truncates if underscore used as last character

book

Article ID: 256694

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

If we use an underscore '_' as the last character of the variant name - It is cut off independent of the length of the name.

Example : If the variant is named as SAP_TEST_  When the job is executed the ''_" is truncated and the job fails as it looks for SAP_TEST instead of the actual variant with the ''_"

Environment

Release : 12.3

                 21.x

Component: Automation Engine

Sub Component(s): SAP Agent

Cause

This is by design based on the default configuration found in the HEADER.SAP object in client 0 

Resolution

In the object, HEADER.SAP in Client 0 by default there is a line (as below)

:JCL_CONCAT_CHAR "_"

The '_' is a default value, so that longer lines are broken down in the editor, Which is why the last '_' is always removed by default.
You  can either change or remove this in the HEADER.SAP object from client 0.

Note: Changes in the HEADER.SAP would cascade the settings to all the SAP jobs across clients. If you do not wish to make this change please follow the below workaround.

Workaround:

If you are using an underscore as the last character in your Variant Name then put the Variant under quotes.

When you choose the variant from the interactive menu a process line is generated in the process tab - This is where you will have add the quotes ' '  ( As shown in the example below ) 

Example:

R3_ACTIVATE_REPORT REPORT=RSPARAM,VARIANT=SAP_TEST_

Change To:

R3_ACTIVATE_REPORT REPORT=RSPARAM,VARIANT='SAP_TEST_'

Additional Information

https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/21.0.4/Automic%20Automation%20Guides/Content/Script/Reference/JCL_CONCAT_CHAR.htm?Highlight=%3AJCL_CONCAT_CHAR