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 ''_"
Release : 12.3
21.x
Component: Automation Engine
Sub Component(s): SAP Agent
This is by design based on the default configuration found in the HEADER.SAP object in client 0
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_'