Financial Management Blogs by SAP
Get financial management insights from blog posts by SAP experts. Find and share tips on how to increase efficiency, reduce risk, and optimize working capital.
cancel
Showing results for 
Search instead for 
Did you mean: 
yogananda
Product and Topic Expert
Product and Topic Expert
1,661
Dear All,

In this article, you will come to know upcoming release of SAP CPQ 2205 an early alert to Identify your current scripts if there are any warnings in Log with "Scripts timeout" and if any of your scripts is exceeding the Characters limit..

Basically, Scripts are developed in following CPQ workspace

  • Develop (Global Scripts , Custom Actions, Custom Quote Calculations)

  • Quote Tables

  • Products - Scripts

  • Products - Attributes



Automatic Cancellation of Scripts Exceeding 20 Minute Time Limit


With the 2205 release of SAP CPQ, IronPython scripts which take more than 20 minutes to
execute will be automatically canceled. Consequently, the execution time for scripts will no
longer exceed the timeout limit for the HTTP request, which is 20 minutes.


In the period prior to the 2205 release (May 21) starting with January, a warning is recorded in
the log every time a script exceeds the 20 minute time limit.

Actions to Take



Please search your log for warnings caused by scripts exceeding the 20-minute time limit now

to determine if such scripts exist on your environment.

Go to Setup > Developer Tools > Log (alternatively, on the user side of the application, click Setup > Log) and filter the log entries the following way:







  • Level: Warn

  • Labels:Scripts

  • Title:Script execution timeout


Once the filter is applied and the results display, you can find the names of scripts exceeding the time limit in the Description column.

If scripts exceeding the time limit exist on your environment, please optimize the script and shorten the execution time before the 2205 release. After the deployment of 2205 code on May 21, scripts which take longer than 20 minutes to execute will be automatically cancelled and will not execute successfully. In that scenario, a warning and an error will be recorded in the Log








Character Limit Introduced for Scripts in 2205


As of the 2205 release of SAP CPQ, the size of IronPython scripts will be limited to 40,000 characters. New scripts created after the 2205 release will need to adhere to the introduced limit. Existing scripts will continue to work after the deployment of the 2205 release even if they exceed the character limit.

However, if you edit those scripts, you won’t be able to save the changes.

Actions to Take

Please review your existing scripts before the 2205 release and make sure that they aren’t longer than 40,000 characters. You can use the character count feature of a text editor to review the number of characters in a script.

Following that step, modify the scripts so that they don’t exceed the character limit by breaking them down into smaller scripts or importing them as modules. In addition, if you plan to further expand any large scripts in the future, please adjust the plan in accordance with the character limit.The character limit will be the default setting starting with 2205.

However, if there is a significant interference with your existing scripts caused by the character limit, please contact the SAP CPQ Support team with your feedback.




SQL Validation
SELECT 'script name: ' + [Name] 
FROM [SystemEventScript] where LEN([Script]) > 40000
UNION ALL
SELECT 'action name: ' [ACTION_NAME]
FROM [ACTIONS] where LEN(CAST([Script] AS NVARCHAR(MAX))) > 40000
UNION ALL
SELECT 'custom calculation name: ' + [Name]
FROM [CartEditableMathDefn] where LEN(CAST([Script] AS NVARCHAR(MAX))) > 40000
UNION ALL
SELECT 'product name: ' + [product_name]
FROM [PRODUCTS] where LEN([Script]) > 40000
UNION ALL
select 'product name for attribute trigger: ' + [product_name]
from [attrTrigger] inner join products
on
[attrTrigger].product_id = [products].PRODUCT_ID
where LEN(CAST([ActionListC] AS NVARCHAR(MAX))) > 40000

Developer Console Application Parameters set.


How to check your Script through Online Utility ?

https://string-functions.com/length.aspx