Upgrade Guide | PUBLIC Document Version: 1.0.0 – 2021-02-02

SAP CPQ Troubleshooting company. All rights reserved. affiliate

THE BEST RUN 2021 SAP SE or an SAP © Content

1 Integrations Troubleshooting...... 3 1.1 Netsuite Integration Troubleshooting...... 3 1.2 Integration Troubleshooting...... 4 1.3 Salesforce Package Integration Troubleshooting...... 5 1.4 SAP for Customer Integration Troubleshooting...... 8 Error Diagnostics - SAP Cloud for Customer Integration...... 10 1.5 Variant Configuration Integration Troubleshooting...... 12 Error Diagnostics - SAP Variant Configuration and Pricing Integration ...... 14 Error Codes from SAP Variant Configuration and Pricing...... 16

2 Configurator Troubleshooting...... 17

3 Document Generation Troubleshooting...... 18

4 Federation Troubleshooting...... 20

5 Catalog Troubleshooting...... 22

6 Quote Troubleshooting...... 23

7 User Interface Troubleshooting...... 26 7.1 General UI Troubleshooting...... 26 7.2 Responsive Design Troubleshooting...... 26

8 Setup Troubleshooting...... 33

9 Login Troubleshooting...... 34

10 Scripting Troubleshooting...... 36

11 Performance Troubleshooting...... 38

SAP CPQ Troubleshooting 2 PUBLIC Content 1 Integrations Troubleshooting

This section contains topics in which you can learn more about the common issues that may occur during integration of SAP CPQ with other applications.

Netsuite Integration Troubleshooting [page 3] This section provides more information about common issues that may occur during Netsuite integration with SAP CPQ.

Salesforce Integration Troubleshooting [page 4] This section provides more information about common issues that may occur during Salesforce integration with SAP CPQ.

Salesforce Package Integration Troubleshooting [page 5] This section contains the common errors that occur during Salesforce integration with SAP CPQ via the Salesforce package, and the workarounds to these errors.

SAP Cloud for Customer Integration Troubleshooting [page 8] This section provides more information about common issues that may occur when SAP CPQ is integrated with SAP Cloud for Customer, and when using the SAP Cloud for Customer IFlow on SAP Cloud Platform Integration as middleware for other integrations.

Variant Configuration Integration Troubleshooting [page 12] This section provides more information about common issues that may occur when integrating Variant Configuration with SAP CPQ.

1.1 Netsuite Integration Troubleshooting

This section provides more information about common issues that may occur during Netsuite integration with SAP CPQ.

1. When landing to SAP CPQ from NetSuite in Explorer 11, SAP CPQ always opens in Classic Design, even though it is set to open in Responsive Design. Attempting to switch to Responsive Design results in an error Sorry, that page doesn’t exist!

In Internet Explorer 11, go to Internet Options Privacy Advanced . Enable all cookies by selecting Accept radio buttons for First-party Cookies and Third-party Cookies and selecting the Always allow session cookies check-.

Related Information

Netsuite Integration With SAP CPQ

SAP CPQ Troubleshooting Integrations Troubleshooting PUBLIC 3 1.2 Salesforce Integration Troubleshooting

This section provides more information about common issues that may occur during Salesforce integration with SAP CPQ.

1. When integrating SAP CPQ with Salesforce, an Error 401 - Unauthorized message appears.

Make sure that the parameter Enables Visualforce pages to be served from the salesforce.com domain on the Salesforce side is turned on.

2. The following error message appears: Maximum number of duplicate updates in one batch (6 allowed)… Error Status Code: DUPLICATE_VALUE.

After creating or updating an opportunity, SAP CPQ goes through all the items in the quote and checks whether matching products exist in Salesforce (the part number is used for product identification). If a product doesn't exist, it is then created in Salesforce. Following that, opportunity line items are created for all these Salesforce products (SAP CPQ quote items).

The issue indicated by this error message occurs when the application is set to update products in Salesforce even if they already exist. If the application parameter Update existing products in Salesforce when sending data from CPQ items is set to YES, SAP CPQ will try to create a new product whether the product already exists in Salesforce or not. If the parameter is disabled, SAP CPQ will still work as described above - new products will be added and opportunity line items will be created. By disabling the parameter, new Salesforce products will be created only when needed, and not all the time.

3. Should multiple SAP CPQ markets be mapped to the same Salesforce pricebook?

It is not recommended to map multiple SAP CPQ Markets to the same SFDC ( Pricebook because it can cause problems when landing to an SAP CPQ quote from Salesforce. There is a chance that the wrong market will be applied. Therefore, the best practice is to map one SFDC Pricebook to only one SAP CPQ market.

4. How can the Salesforce organization ID be found?

To find the Salesforce organization ID, go to Setup Develop Custom Settings Edit and you will see the TenantKey field, which contains the organization ID.

Integration Setup Troubleshooting

● If you are not able to connect to SAP CPQ and it advises you to contact SAP CPQ administrator, check the VisualForce Page and ensure everything is correct, especially the domain name. ● Also check the Quote identifiers (e.g. Quote_ID__c). Make sure they match exactly, remember they are case sensitive and it is a double underscore, __c. ● If it connects to SAP CPQ but doesn’t log you in, check the user mapping and the password in CRM integration General . Try removing the password or entering it. ● When you're landing to SAP CPQ from SalesForce in Safari on iPad, you may not be able to scroll up and down the iFrame window in which SAP CPQ is opened if you've previously interacted with the SalesForce area until you tap on the empty screen area of the iFrame first. This also applies to the scenarios in which you're scrolling through the SalesForce area after interacting with the iFrame. By tapping on the empty

SAP CPQ Troubleshooting 4 PUBLIC Integrations Troubleshooting screen area of the application you're currently working in, you're focusing that part of the screen and the scroll works correctly.

Related Information

Salesforce Integration Instructions

1.3 Salesforce Package Integration Troubleshooting

This section contains the common errors that occur during Salesforce integration with SAP CPQ via the Salesforce package, and the workarounds to these errors.

1. In case the following error message appears: Oops, there was an error rendering Force.com Canvas application [CPQOAuth2]. Force.com Canvas cannot locate an installed canvas app with the namespace and API name [CPQOAuth2]. It is likely that an older version of the package has been installed (when there was a dedicated package for each installation).

2. In case you do not see anything and pressing the F12 button results in a Refused to display… error message. ● It is necessary to set Permitted users to Admin approved users are pre-authorized for the connected application.

● Check if the remoteaccess request is changing when refreshed multiple times.

SAP CPQ Troubleshooting Integrations Troubleshooting PUBLIC 5 ● Check for allowed domains in proxy.jsp in the network.

● If the URLs listed in RemoteAccessAuthorizationPage.apexp are not in ALLOWED_REFERRER_DOMAINS, go to SFDC Setup Domain Management My domain . Edit My Domain Settings and switch to Not redirected (recommended).

● If that option is already selected, modify and save the settings a few times. ● If the issue persists despite completing these steps, try clicking the link from the console. It should open in a new window, where you need to click Allow so that Salesforce allows IFrame to be loaded.

SAP CPQ Troubleshooting 6 PUBLIC Integrations Troubleshooting 3. In case the following error message appears: Oops, there was an error rendering Force.com Canvas application (undefined). Error: Insufficient container and/or app parameter information passed in. Force.com Canvas requires the API name or reference Id of the canvas app. It is likely that the CPQ URL in custom settings for the CPQ Settings field is wrong. It should be one of the values listed in the environments table described in SAP CPQ Package for SalesForce.

4. In case the following error message appears: User type does not exist. Please contact your administrator. Make sure the profile name of the Salesforce user matches a user type in SAP CPQ.

5. In case the following error message appears: Login Data is incorrect. Please contact your SalesForce administrator.

Go to sandbox.webcomcom.cpq or rs.webcomcpq.com and navigate through Setup CRM Integration General and make sure that Security password for verifying entrance to CPQ through CRM backdoor is empty.

6. In case the following error messages appear: https://namespace.my.salesforce.com refused to connect. in Google Chrome, or SFDCPACKAGE.CompanyDoesNotExist in Mozilla Firefox, there are 3 things that needs to be checked: ● Check if the domain you are trying to connect to is present in the Domains list.

SAP CPQ Troubleshooting Integrations Troubleshooting PUBLIC 7 ● Check if the Return URL is correct.

● Find ALLOWED_REFERRER_DOMAINS and check if the domain is present there.

If error isn't present in any of the listed steps, contact the Salesforce Support team as this is probably occurring due to an issue on Salesforce end.

1.4 SAP Cloud for Customer Integration Troubleshooting

This section provides more information about common issues that may occur when SAP CPQ is integrated with SAP Cloud for Customer, and when using the SAP Cloud for Customer IFlow on SAP Cloud Platform Integration as middleware for other integrations.

1. The IFlow defined on SAP Cloud Platform Integration for the integration SAP CPQ - SAP Cloud for Customer is used as middleware for API calls in an integration with another CRM. getQuoteContent API is used for fetching the quote content and the endpoint in Providers is set up accordingly. However, the log shows that SAP CPQ is calling the getoppdetailsfornewquote API instead. What may be the cause of this?

To solve this, remove the opportunity ID from the URL and the getQuoteContent API will be used. SAP CPQ is calling the getoppdetailsfornewquote API because the opportunity ID is passed within the URL to SAP CPQ. Currently, SAP CPQ has two integrations with SAP Cloud for Customer. In the legacy integration, users land to SAP CPQ from an opportunity, while in the new integration, users land to SAP CPQ from a sales quote. Consequently, if the opportunity ID is passed to SAP CPQ, the system automatically calls the getoppdetailsfornewquote API used in the legacy integration.

SAP CPQ Troubleshooting 8 PUBLIC Integrations Troubleshooting 2. Why is custom field data missing in SAP CPQ on quote creation? If data is missing on quote creation, make sure that all the necessary custom fields are created on the SAP CPQ side. See Field Mapping.

3. The error message (500) Internal Server Error appears when landing to SAP CPQ. What is causing this? This error most likely occurs on the SAP Cloud Platform Integration side. You should check which endpoint is set for the Replicate Quote to SAP CPQ artifact and check the logs for the artifact. On the SAP CPQ side, verify that the same endpoint is set in Setup Providers Providers SAP Cloud Platform in C4C CRM Setttings and that the REST API base URL address has the correct SAP Cloud Platform Integration base URL set as a value in Common Settings.

4. When creating a new sales quote or editing an existing one in SAP Cloud for Customer, the SAP CPQ IFrame can't be loaded and the quote can't be accessed. How can this be fixed? Two scenarios are possible here depending on the exact error:

1. If, in the browser console ( F12 ), the following error message appears: Refused to frame 'https:// dev.webcomcpq.com/' because an ancestor violates the following Content Security Policy directive: "frame- ancestors 'self' *.dev.sapbydesign.com *.crm.ondemand.com *.c4c.sapbybriscloud.cn *.visual.force.com", the issue is that SAP CPQ is not allowed to load in SAP Cloud for Customer. To fix this, go to Setup General Application Parameters Security and edit the application parameter URLs that may Embed CPQ so that it includes the SAP Cloud for Customer domain. For example, if the SAP Cloud for Customer URL is https://my311386- sso.vlab.sapbydesign.com/, you should change the parameter value from: *.dev.sapbydesign.com *.crm.ondemand.com *.c4c.sapbybriscloud.cn *.visual.force.com to: *.dev.sapbydesign.com *.crm.ondemand.com *.c4c.sapbybriscloud.cn *.visual.force.com *.vlab.sapbydesign.com. 2. If, in the browser console ( F12 ), the following error message appears: Refused to display in a frame because ‘X-Frame-Options’ is set to ‘deny’. check the URL in the error message. If the URL contains a SAMLRequest parameter or anything related to SAML, that is probably the URL to the Identity Provider, such as ADFS or SAP ID. The Identity Provider is used when federated single sign-on is enabled, and it verifies whether the SAP Cloud for Customer user can be authenticated in SAP CPQ. In this case, it is necessary to review Identity Provider settings (see Federation Settings) and allow the Identity Provider URL to load in an IFrame. Here is an example of such a URL: https://login.microsoftonline.com/0e17f90f-88a3-4f93- a5d7-cc847cff307e/saml2?SAMLRequest=jZJNT%2BMwFEX%2FSmTWjh07NInVmore%23rsa- sha256&Signature=YkzxFF5dzOyO%2BZh7FS69eQ7y

Error Diagnostics - SAP Cloud for Customer Integration [page 10] If there is an error when saving a new sales quote in SAP Cloud for Customer while landing to SAP CPQ, or if you want to see the payload received in SAP CPQ, use the Developer Console to troubleshoot the communication between SAP CPQ and SAP Cloud for Customer or SAP Cloud Platform Integration.

SAP CPQ Troubleshooting Integrations Troubleshooting PUBLIC 9 1.4.1 Error Diagnostics - SAP Cloud for Customer Integration

If there is an error when saving a new sales quote in SAP Cloud for Customer while landing to SAP CPQ, or if you want to see the payload received in SAP CPQ, use the Developer Console to troubleshoot the communication between SAP CPQ and SAP Cloud for Customer or SAP Cloud Platform Integration.

Procedure

1. At least once, land from SAP Cloud for Customer to SAP CPQ, so that you get logged in (even if there is an error on landing). 2. In another tab of the same browser window, open the SAP CPQ environment with which the SAP Cloud for Customer environment is integrated. 3. Open the Developer Console in SAP CPQ in full mode. 4. In the browser tab where SAP Cloud for Customer is open, try to open the sales quote again. 5. In the browser tab where the Developer Console is open, find the action Proceed to Quote.

6. In the filter field Logger, use SAPCommunicator. 7. Click the Info icon next to the highlighted message.

SAP CPQ Troubleshooting 10 PUBLIC Integrations Troubleshooting You are now able to see the data SAP CPQ received from SAP Cloud for Customer.

SAP CPQ Troubleshooting Integrations Troubleshooting PUBLIC 11 1.5 Variant Configuration Integration Troubleshooting

This section provides more information about common issues that may occur when integrating Variant Configuration with SAP CPQ.

1. Why was my product not added to the quote?

It is possible that the product is not flagged as salesRelevant (sales relevant) in the configuration response arriving from SAP Variant Configuration and Pricing. The flag needs to be set in SAP Variant Configuration and Pricing. The item which is not sales-relevant and that item’s child items can’t be added to the quote.

Alternatively, it is possible that some of the child products were not synchronized properly. In that case, you should repeat the knowledge base synchronization job. For more information see the Technical Overview.

2. Prices in SAP CPQ are not identical to the prices arriving from SAP Variant Configuration and Pricing. Why?

There are several reasons why prices in SAP CPQ can appear different from the prices from SAP Variant Configuration and Pricing. Make sure the suggestions from the following list are met:

● Make sure all the products are properly synchronized. Synchronized products have the knowledge base ID, knowledge base effective date and other knowledge-base-related data populated for their product versions in the Setup. ● Check if all the parameters are properly set up in SAP General Attribute Mappings. ● If Base Price and Selected Options are not properly set up and have their default values (BASE and VARC), the prices for products will be 0. However, the surcharges (attribute prices) may display in the Configurator, because they are taken straight from the SAP Variant Configuration and Pricing pricing response. ● For catalog prices to display, Pricing Procedure Name for Catalog Prices must be properly set and all products must have the correct unit of measure. If some of the products on the page are missing the unit od measure, none of the products on the page will have the prices displayed. ● For pricing in the Configurator, the Unit of Measure is taken from the configuration response, and not from product definition. If there is an error stating that the unit of measure is incorrect, SAP Variant Configuration and Pricing didn’t return the correct unit of measure value in the configuration response. ● If Market and Currency factors are applied on top of the prices from SAP Variant Configuration and Pricing, the total price in SAP CPQ may be lower than the price in SAP Variant Configuration and Pricing. In this scenario, the market and currency factors need to be set to 1 for the correct prices to display in SAP CPQ. ● If no quote context is used, make sure all the parameters are populated on the SAP General Attribute Mappings provider page in Attributes (No Quote). ● If the prices are still incorrect after you have applied all the steps, check the response payload for details. See Error Diagnostics - SAP Variant Configuration and Pricing Integration [page 14].

3. Product configuration is behaving differently than expected, errors occur during configuration and subitems are not added to the quote.

If product configuration is behaving differently for Variant Configuration products and errors are displaying, make sure the suggestions from the following list are met:

● Check if everything works with a different effective date. If the product behaves normally with a different effective date, that means that the version of the product active for the current date was not synchronized successfully. In that case, repeat or fix the knowledge base synchronization job to resolve the issue.

SAP CPQ Troubleshooting 12 PUBLIC Integrations Troubleshooting ● Are all products from the knowledge base successfully synchronized? If there is a product missing, there may be null reference errors in the Developer Console, the user may not be able to edit the configuration, an invalid flag may be displayed next to the item, and so on. Repeat or fix the knowledge base synchronization job to resolve the issue. ● If there are rules or triggers on the product, or attributes used as line items or containers in SAP CPQ, you may experience issues because those features are currently not supported. ● If unexpected behavior keeps occurring during product configuration, check the response payload for details. See Error Diagnostics - SAP Variant Configuration and Pricing Integration [page 14].

4. Why is a synchronized product not visible in the Catalog?

Only simple products and configurable root products are visible in the Catalog. It is possible that the configurable product is not flagged as a root item.

Additionally, check which product version is used for the effective date that is selected. Maybe the product is not a root item in that product version.

5. A synchronized product was created in SAP CPQ with some product tabs, but other product tabs are missing from it. Why?

Product tabs in SAP CPQ are global – the same tab, with the same ID, can be used in different products. However, in SAP Variant Configuration and Pricing, product tabs have IDs that start from 1 for each product. See Technical Overview for more information.

6. What do I do if my knowledge base synchronization is incomplete or unsuccessful?

If a knowledge base synchronization job fails, first make sure that the SAP Variant Configuration and Pricing provider is properly configured in the Setup. If products are not synchronized even when the job is manually triggered via Execute Job, for the Sync from date, choose any date which is older than the effective date of the product in the knowledge base. Additionally, synchronizing products can fail if the products have rules or triggers, because this is currently not supported.

7. How do I correctly import simple products?

Before the knowledge base synchronization, import all the simple products to SAP CPQ, either automatically via ImportMaterialsFromERP API or manually. All products must exist in SAP CPQ before the synchronization, regardless of whether they are sales-relevant or not.

Simple products must contain the following information:

● the product system ID must have the value of the material number, ● the product must be marked as Synced from back office in Setup Products/Products 2.0 , ● unit of measure must be populated for catalog pricing to work.

Error Diagnostics - SAP Variant Configuration and Pricing Integration [page 14] Use the Developer Console to troubleshoot the communication between SAP CPQ and SAP Variant Configuration and Pricing.

Error Codes from SAP Variant Configuration and Pricing [page 16] These are the error codes for errors from SAP Variant Integration and Pricing, listed with the issues that cause them to appear and possible fixes.

SAP CPQ Troubleshooting Integrations Troubleshooting PUBLIC 13 1.5.1 Error Diagnostics - SAP Variant Configuration and Pricing Integration

Use the Developer Console to troubleshoot the communication between SAP CPQ and SAP Variant Configuration and Pricing.

Context

SAP CPQ only interprets the SAP Variant Configuration and Pricing response and applies it in the Configurator. If there is an issue (for example, if an attribute is not visible or missing, or the price is not as expected), it is necessary to check if the SAP Variant Configuration and Pricing response matches what is happening in SAP CPQ. If a match exists, the issue is on the SAP ERP/SAP Variant Configuration and Pricing side. If it doesn't match, the issue is in SAP CPQ.

Procedure

1. Before trying to configure a product, open the Developer Console in full mode. 2. Filter a trace with the logger CPSCommunicator.

The initial configuration request and response display in records from the Configurator trace.

The initial pricing request and response display in records from the GetModel trace.

SAP CPQ Troubleshooting 14 PUBLIC Integrations Troubleshooting When you change an attribute value, the pricing request and response display in records from the ChangeAttributeValue trace.

If no logs display when using the CPSCommunicator filter, make sure that the integration is properly set up.

SAP CPQ Troubleshooting Integrations Troubleshooting PUBLIC 15 1.5.2 Error Codes from SAP Variant Configuration and Pricing

These are the error codes for errors from SAP Variant Integration and Pricing, listed with the issues that cause them to appear and possible fixes.

Error Code Issue Fix

400 Bad request. Some field may not be set Check if pricing and reference attrib­ or there may be a context-related issue. utes are properly set up in the Setup. This error can appear if, for example, a market is created without a pricebook, and pricebook code is part of the sales area.

401, 403 There is an issue with the authentica­ Check the client ID and secret in the tion. Setup.

404 The knowledge base was not found in Check if the knowledge base exists in SAP Variant Configuration and Pricing. SAP Variant Configuration and Pricing, This can occur when trying to configure and check the request sent from SAP a product. CPQ [page 14].

500 An error happened in SAP Variant Con­ Check the request sent from SAP CPQ figuration and Pricing. [page 14].

503 SAP Variant Configuration and Pricing Check SAP Variant Configuration and is not responding. Pricing.

Related Information

Variant Configuration Integration Troubleshooting [page 12]

SAP CPQ Troubleshooting 16 PUBLIC Integrations Troubleshooting 2 Configurator Troubleshooting

This section provides more information about common issues that may occur in the product configurator, and ways to fix them.

1. An attribute is not changing its value, although the value is expected to change. Why?

An attribute might retain its value because of calculations that are assigned to it in the Hint field in Setup Products Product Attributes/Options or Products 2.0 Attributes Edit . For example, an attribute may always be set to the value 17 in the configurator because it has the hint assigned to it in product administration.

2. An attribute is not visible in the Configurator. Why?

Check Setup Product Catalog Attribute Visibility Restrictions . The attribute in question might be set to invisible for one or more user types.

3. When editing an item, child container columns are not populated, but, when editing a single row and going back, all the columns are populated.

This may occur because rules are not being executed on the child product, which can be fixed via an application parameter.

Go to Setup Application Parameters Configurator Execute rules in child products (found in attribute container) when adding parent product to the quote and set the value to True.

4. The configurator UI is not properly refreshed after an action is performed. For example, although a container is loaded from the scripting on a button click, it is not properly displayed upon clicking, but only on browser refresh.

It may be necessary to enable the Refresh Configurator on change toggle switch in Products 2.0 Edit Attributes or Products Product Attributes/Options Edit Additional Attribute Definition .

5. Why is data from one tab in the configurator not visible in other tabs referencing the same data in Responsive Design?

This is expected behavior due to the fact that, in Responsive Design, data is loaded only for the current tab. Therefore, data from one tab cannot be simultaneously used in another tab.

Related Information

Products Product Editor Products Layout Tab

SAP CPQ Troubleshooting Configurator Troubleshooting PUBLIC 17 3 Document Generation Troubleshooting

This section provides more information about common issues that may occur in the document generation setup, and ways to fix them.

1. An Illegal character in path error occurred when trying to preview a document.

Names of additional files added to section templates are defined by formulas. If that formula contains an additional row, an Illegal character in path error will occur when trying to preview the document.

2. How to prevent tables in document generation templates from stretching?

When adding tables to a document in a word processing program, columns are automatically resized and adjusted to their sibling columns by default. To set up a fixed column size in the template, open the word processing program and go to Table Tool Layout Properties (in the Table section of the ribbon) Options and uncheck the Automatically Resize to Fit Contents checkbox.

3. What is the best way to reproduce a corrupted template issue?

To reproduce a corrupted template issue, it is not necessary to generate a document each time. Instead, it is enough to identify the problematic template, section or additional file, and then preview it in the Setup with the appropriate cart composite number as an input.

4. What is the quickest fix for a corrupted template in the old document generation engine?

Try the following steps:

1. Set the same font and font size for tags. A possible quick fix is to select the entire document body and set the same font and font size for the document. 2. Illegal characters or pdf files may cause issues when processing documents in the old engine. In the document itself, you can click File Info Check for Issues to remove special characters from the header or footer.

5. There is a problem with displaying the value of a quote date field (either standard or custom) in document generation. For example, the value in a quote date field is 02.01.2020 (the date format is irrelevant), but in the generated document, the value in the field is 03.01.2020. What is causing this and how to fix it?

First check the user time zone, which is probably set to -08:00. Additionally, go to Application Parameters and set Disable timezone conversion for date field to TRUE.

6. The document generation tag <>)>> is supposed to retrieve a document from a custom table column. Why is the tag not parsing properly?

It is not possible to use another document generation tag inside <. You can only use CTX, TABLE and other tags from the SyntaxChecker.

SAP CPQ Troubleshooting 18 PUBLIC Document Generation Troubleshooting 7. What do I do if document generation template upload is unsuccessful or lasts too long? An issue may occur with uploading a document generation template in the Setup. Upload may last too long, or you may be logged out from the application. In case you experience this issue, you need to analyze the template and look for incorrect line breaks.

In Microsoft Word, two types of line breaks exist: hard breaks, created by pressing Enter and soft breaks, created by pressing Shift + Enter . Only hard breaks should be used in document generation templates. To check which breaks are used in your template, open the document template in Microsoft Word, turn on the option Show paragraph and inspect the document. Notice that different symbols are used for displaying a hard break and a soft break. These symbols are visible when Show paragraph is enabled. Remove all soft breaks from the document and retry the upload.

8. Why can't I download a generated document from the Generated Documents quote tab? If a user is unable to download a generated document from the Generated Documents tab on the quote, they may have restricted visibility permissions for that document template. The user needs to have the appropriate visibility permissions for a document generation template in order to download generated documents which used that template.

Related Information

Document Generation Create Document Generation Template

SAP CPQ Troubleshooting Document Generation Troubleshooting PUBLIC 19 4 Federation Troubleshooting

This section provides more information about common issues that may occur while setting up the federated single sign-on (FSSO).

1. Federation settings are configured and saved in Setup Providers Federation Settings , but the FSSO does not work properly. Why?

It is not enough to only save your settings. You also need to click Activate after saving your settings for them to be applied.

2. The error message Creating user environment failed appears in SAP CPQ. What is causing the issue?

First, make sure that the toggle switch Must Change Password at Next Login is turned off in Setup Users Edit Password Settings . Additionally, this error happens when the attributes sent to SAP CPQ via assertions are not mapped correctly. The solution is to add the correct attribute mappings. For more information on Attribute mapping, see Federation Settings. Moreover, make sure that the correct value is chosen for ReadUIDFrom and that the federation URL is correct. For more information on federation URL, see Forming the FSSO URL. Federation Settings

Other than that, iPad users receiving this error message may be specifically experiencing a problem with iPad browser settings. To fix this, follow the steps below:

1. Open the IPad Settings. 2. Find Safari on the list of apps (below the Settings headline). 3. On the right-hand side, find the Privacy and Security section. 4. Make sure that Prevent Cross-Site Tracking is turned off. Chrome for IPad doesn’t support this option. For more information, see https://support.google.com/chrome/answer/2790761 .

3. When landing from SAP Cloud for Customer to a sandbox environment, the error message Creating user environment failed appears in SAP CPQ and the browser console returns the error: Requested an insecure resource 'http://sandbox.webcomcpq.com/fed/DOMAIN_NAME/ sapcrm/saplogin.aspx?opportunityID=OPPORTUNITYID&accountID=ACCOUNTID'. This request has been blocked; the content must be served over HTTPS. What is causing the issue?

This error occurs when the federation URL was not correctly added in SAP Cloud for Customer. In case the sandbox environment is used, the URL should always contain rssandbox (not sandbox), and it should follow the pattern https://rssandbox.webcomcpq.com/fed/domain_name. For any other environment, use the URL listed in Setup Providers Federation Settings to form the federation URL. For more information on federation URL, see Forming the FSSO URL.

4. Once FSSO is enabled, the user keeps landing on the default tenant, instead of the tenant they want to land on. What is causing the issue?

This happens when the Sign on relay state field is left blank in Setup Providers Federation Settings . To fix this issue, select your tenant in the dropdown menu as the value for this field. Save and activate your settings.

SAP CPQ Troubleshooting 20 PUBLIC Federation Troubleshooting 5. The error message C4C.Landing.InvalidLogin; Message: Invalid login appears in SAP CPQ. What is causing the issue? This error may occur because routings are not set properly. Alternatively, federation may not be activated. Please make sure you add the correct routings and click the Activate button to apply your settings. For more information on routings, see Federation Settings.

6. The message Access denied! You are not authenticated to access this application appears when logging into SAP CPQ. What is causing the issue? If you received this message, make sure to disable the Must Change Password at Next Login toggle switch in Setup Users Create New User/Edit Password Settings for all users who will be using FSSO.

7. An error appeared, stating that the User Mapping or Assertion is invalid or missing (example error message: UserIdentifier Attribute must be supplied!). On the Federation Settings page, if Assertion is selected in ReadUidFrom, and nothing is defined in Attribute Mappings, then the Uid is read from the SAML as per default and must be provided in the response. To use something else from Assertion (such as a username, name, or email) for obtaining the Uid, Attribute Mappings must be defined. The Uid must be mapped in SAP CPQ as the user's FederationId or username, otherwise the user receives an Access Denied message and the login page is displayed.

8. The error message Authentication response validation failed due to an invalid condition related to the target audience. appears. Why is the message appearing and how do I fix the issue?

Make sure that the request node in the SAML contains the same value as the Entity ID in the SAP CPQ sp.xml file. The tag must contain the same value that’s found is in the sp.xml file.

 Note

The values need to be identical – for example, http://cpq/ is not the same as http://cpq (due to the / symbol at the end).

Related Information

Federated Single Sign-On (FSSO) Federation Settings

SAP CPQ Troubleshooting Federation Troubleshooting PUBLIC 21 5 Catalog Troubleshooting

This section provides more information about common issues that may occur in the product catalog, and ways to fix them.

1. A favorite was added, but it is not visible on the Favorites page.

Make sure that the product is assigned an Active status in Setup Products/Products 2.0 .

2. Why is the price not appearing properly for a product?

If a price is not showing up properly on the user side, edit the product in the Setup and check Attributes Edit Attribute Values . If prices are retrieved from a pricebook, Use Pricebook should be selected, and clicking on View Prices will allow you to check the pricebook values. It is possible that values are missing here or that the part number is incorrect, and consequently, prices are not showing up on the user side.

Related Information

Favorites

SAP CPQ Troubleshooting 22 PUBLIC Catalog Troubleshooting 6 Quote Troubleshooting

This section provides more information about common issues that may occur on quotes, and ways to fix them.

1. Changing the custom field is expected to trigger the Save action, but that doesn’t happen.

Make sure the application parameter found in Application Parameters Shopping Carts and Quotes Automatically save quote on custom field change is enabled. This parameter is used to trigger the Save action when a custom field is changed. However, in Responsive Design, it is also necessary to make sure the Save quote on change checkbox is checked in Setup Custom Fields Edit .

2. An editable quote item custom field isn’t displayed in the classic design (in Quote 1.0), but it’s normally displayed in responsive design. Why?

If this is the case, it’s necessary to check the quote template set for the user type. Quote item custom fields have to be added to the template .xslt file in order to be displayed. Namely, in classic design, quote item custom field visibility is defined in the .xslt file, while in responsive design, it’s defined via layouts and layout permissions.

3. How to make a visible custom field not editable?

In order to be editable, a custom field needs to be made editable in the Setup and the visibility conditions need to be set to true. However, to make a custom field visible and not editable, an additional step is needed. Namely, after the visibility is set to true, we need to add an additional line in scripting to set the editable status to false as well:

if Quote.GetCustomField("TEST").Content is None or Quote.GetCustomField("TEST").Content == '':

Quote.GetCustomField("TEST 2").Visible = False else: Quote.GetCustomField("TEST 2").Visible = True

Quote.GetCustomField("TEST 2").Editable = False

4. A part number can’t be found in a quote, but it can be found in another quote with the same status and quote owner. What is causing the problem?

The problem is caused by the different markets and pricebooks that correspond to these two quotes. The part number has no price defined in any pricebook for the market corresponding to the first quote. The product can’t be seen in the first quote because two fields are checked for pricebooks in Setup Pricing Calculations Pricebooks: Hide simple products without prices when using pricebook lookups and Prevent users from quoting part numbers that haven't got a price in pricebooks.

5. A quote custom field value is calculated with the Eval tag and the result is an empty value.

If a quote custom field value is calculated via the Eval tag, it should display a number. Having an empty value as a result means that the Eval function wasn’t performed successfully. If that quote custom field formula depends on other custom field values, the formulas of those fields should be checked, too. Those formulas may contain trailing spaces that cause the evaluated value to become a string instead of a number, and as a result, the Eval tag doesn’t return any value.

SAP CPQ Troubleshooting Quote Troubleshooting PUBLIC 23 6. Quote item description doesn't have the expected value. What should be done to correct this? ● If the quote item is the main item (product), the product definition page should be reviewed. Namely, Product Description under the Product Data section, Long Product Description under the Additional Product Data section and Dynamic Description under the Advanced Formulas section are the standard fields that are used to populate the product description field and may contain dynamic formulas that should be reviewed and modified. ● Quote item description could be set via scripting. Therefore, product scripts, global scripts, product attribute triggers, custom quote calculations and custom actions should be checked. ● Quote layout could be customized and the product description may be another quote item custom field that is used to present item description, so the used template should be checked.

7. Values not evaluated when MarketDisplay is used in calculations. How can this be fixed? Values may not be evaluated when MarketDisplay is used for calculations. Instead, MarketDecimal should be used. Here is an example of a tag that doesn’t work:

$</ <*CTX( Quote.CurrentItem.Quantity.MarketDisplay)*> )*>,2)*>)>>

When the given tag is used, values may not be evaluated because MarketDisplay is used for calculations instead of MarketDecimal. MarketDisplay and DefaultDisplay should never be used for calculations because they’re converting field values into the current user's format. On the other hand, MarketDecimal returns the non-formatted value, so the result of calculation can be displayed in the current user's format. With that in mind, the formula above should be replaced with the following:

Unit NRC:

$</ <*CTX( Quote.CurrentItem.Quantity.MarketDecimal )*> )*>,2)*>).Format)*>)>>

8. Why does the total amount appear to be an incorrect number? If the total sum appears incorrect, total amount values can be found after multipliers and additional discount.

9. Why is the updated value of a Quote Item Custom Field not saved (in Quote 1.0)? When a user tries to update a quote item custom field, if that field doesn’t belong to the default editable group, the new value won't be saved and it will be reset to the old value. The field can be moved to the editable group in Setup Pricing and Calculations Cart Fields Administration (for the appropriate user type and quote status).

10. The Upgrade to new version action is executed, but nothing happens. This may happen if the new product version has attributes that are marked as Required (so the configuration is initially incomplete as a result of that) and the Allow adding incomplete items checkbox is unchecked for the user type. In that case, the application attempts to upgrade the item to the new version, but, as it’s incomplete, it isn’t added to quote and so the action isn’t performed successfully.

11. Why is a quote still in the Waiting for Approval status even after it was approved? When two approval rules are triggered for one quote, even if the quote is approved in regard to one of these rules, it still is in the status Awaiting for Approval if there’s AND logic between the two rules. Furthermore, when the quote is rejected according to either one of these approval rules, the status changes to Rejected.

SAP CPQ Troubleshooting 24 PUBLIC Quote Troubleshooting 12. Extended Amount isn’t properly calculated. What may be the cause?

If Quote.Item.ExtendedAmount has been set up through scripting, Quote.Item.ExtendedAmountInMarket may not be calculated as Quote.Item.ExtendedAmount * Market.MarketFactor * Market.CurrencyRate, as expected. This depends on the value selected in the Fix Quote Amount After Currency Conversion parameter ( Setup Pricing/Calculations Rounding Setup ).

This parameter checks if there’s a difference between the total net price and the summed (and rounded) extended amount. For example, if the total net price is 100 and the price of each item is 33.33 (99.99 in total for three items), there will be a difference of 0.01 between the total net price and the extended amount. If there’s a difference, that amount is added to either the item with the highest extended amount or to the total net price, depending on the selected parameter value:

● If Fix Items is selected, the item with the highest Quote.Item.ExtendedAmount is recalculated by adding the delta, which is calculated as Quote.Total.TotalNetPriceInMarket - sum of the extended amount for all items. If this option is selected and you haven’t refreshed the total net price of the quote after changing the extended amount, the Quote.Item.ExtendedAmount will be different from Quote.Item.ExtendedAmountInMarket. ● If Fix Totals is selected, Quote.Item.ExtendedAmountInMarket is calculated using this formula: Quote.Item.ExtendedAmount * Market.MarketFactor * Market.CurrencyRate.

13. The error message No action available displays when trying to change a custom field or the quantity field on the quote. Why? Make sure that the Reprice action is enabled for that user type and that quote status in the Workflow.

14. When importing quote tables via Microsoft Excel, why the value of the column of type Money is sometimes different from what I defined in the uploaded document? The solution to this issue is to set the decimal places for the column to three or more in Setup.

If the column is set to two decimal places and the default market is set to any market other than USD, the system recalculates the value, rounds it to 2 decimals and stores it like that in the database (all money values in SAP CPQ are stored in USD dollars in the database). Afterwards, if you change the default market, the value in the database is recalculated again from USD dollars to the newly selected default market. After multiple recalculations and the value being rounded to two decimals, the value in the quote table is sometimes different from the value in the Microsoft Excel uploaded document.

SAP CPQ Troubleshooting Quote Troubleshooting PUBLIC 25 7 User Interface Troubleshooting

This section provides more information about common issues that may occur in relation to the user interface, and ways to fix them.

General UI Troubleshooting [page 26] This section provides more information about general issues that may occur in relation to the user interface, and ways to fix them.

Responsive Design Troubleshooting [page 26] This section provides more information about common issues that may occur in relation to the responsive design, and ways to fix them.

7.1 General UI Troubleshooting

This section provides more information about general issues that may occur in relation to the user interface, and ways to fix them.

Why do I have issues with scrolling when SAP CPQ is opened in iFrame on a mobile or a tablet device?

To be able to scroll a page properly when SAP CPQ is opened in iFrame on a mobile or tablet device, you must focus the page in iFrame. For example, if you’ve tapped in a pop-up dialog, you first need to tap the empty area on the page, outside the pop-up, to be able to scroll the entire page.

7.2 Responsive Design Troubleshooting

This section provides more information about common issues that may occur in relation to the responsive design, and ways to fix them.

SAP CPQ’s responsive design (RD) templates are a powerful tool for adjusting the user interface to the client’s business model. However, sometimes it is necessary to apply fixes and corrections to RD templates or the accompanying CSS files. There are many factors that need to be considered when attempting to fix user interface issues in SAP CPQ. This topic details the ways in which you can isolate problematic responsive design templates and CSS files, as well as apply the necessary corrections.

 Note

Prior knowledge of CSS, HTML, JavaScript and KnockoutJS is highly recommended for troubleshooting.

SAP CPQ Troubleshooting 26 PUBLIC User Interface Troubleshooting 1. Localize the Issue - Core or Customized Templates

The first thing you need to do is check whether the issue is related to custom RD templates. To do this:

1. Open the page you wish to investigate. 2. Open the Developer Console in the second tab of your browser. 3. In Developer Console, select the Disable UI Customizations checkbox. 4. Navigate to the page where the problematic element is located and click Ctrl + F5 on keyboard. This will enforce page content to reload and SAP CPQ will use only core/native RD templates and CSS files. 5. If the issue persists, then it is not related to UI customizations and you should look for the source of the problem elsewhere (custom calculations, scripts, rules and so on).

To revert the disabled UI customizations, go back to Developer Console, uncheck the Disable UI Customizations, navigate back to the page and click Ctrl + F5 . If the issue is still there, then it is related to the customizations made to the page.

2. Narrow down the Issue to Element in Customized Template

Once you are certain that UI customizations are causing the issue, you need to narrow down the problem to a specific SAP CPQ segment/page (Configurator, Catalog, Cart and so on) and then to a specific HTML element.

1. Right-click on the problematic element and select Inspect from the dropdown list (the name of this button may vary depending on the web browser you are using). 2. Identify RD templates involved in the page content rendering Template names are in the HTML comment (between Begin src and End src). It is important to note that RD templates are responsible for rendering segments (or sections) of a web page, therefore rendering a full-page content is a joint operation in which several templates (core or custom) are used. In the web page source (accessible via browser inspection feature) SAP CPQ stores names of the page sections and custom RD templates (if they are used) responsible for rendering content within a section. 3. Identify CSS files containing style options for HTML elements. 4. Once the problematic templates or CSS files are identified, you can proceed with applying the corrective measures.

SAP CPQ Troubleshooting User Interface Troubleshooting PUBLIC 27 3. Example - Custom RD Template Troubleshooting

In the following text, the solution for fixing the issue with undesired text displayed in the Cart page is provided:

1. Inspect the HTML element in which the problematic text is present. The problematic text is in the red box.

The name of the custom template potentially responsible for the issue (rendering Cart page section Items) is TroubleshootinExample. 2. Access Setup UI Design Responsive Templates . Here, you can look up responsive templates by their names. The following image contains code for the custom RD template which renders the Items section of the SAP CPQ Cart page.

SAP CPQ Troubleshooting 28 PUBLIC User Interface Troubleshooting 3. To resolve the issue with unwanted text, you should apply corrective measures to the template code.

You can also see which user applied the problematic customization by accessing the Template Versions tab.

Furthermore, you can disable the custom template by deselecting the Default checkbox. By doing this, you are instructing SAP CPQ to use the core RD template instead of a custom one for rendering content in the given section. This approach is also useful for confirming that the template in question is indeed the problematic one, as the template’s code should no longer be visible on the web page once it is deselected.

4. Troubleshooting when the Issue is Not in Customized Template

If, on initial inspection, the custom template does not have a name, but only a reference to the section to which the problematic HTML element belongs, the issue is not rooted in the custom RD template, since no RD custom template is defined for the given section. If that is the case, there are two possible sources of the issue:

● The core SAP CPQ RD template If the problematic content/element is defined in the core RD template unless the issue is not breaking UI to the point in which the page is unusable, all corrections should be applied in form of a custom RD template, which extends to the core one. Otherwise, contact the Support team, as there may be an issue in the core RD template. ● CSS used for adding style options to the problematic HTML element If the problematic behavior is caused by CSS, you should inspect the problematic page element. This will show all CSS style options applied to the given element, stemming from both the default and custom CSS files. These are the names of default CSS files ○ fiori3CSS – controls the style options related to SAP’s Fiori UX. ○ responsiveCSSCore – controls the style options required for RD to work properly.

The custom CSS file is present only if the inspected element has a CSS option defined in the custom CSS file. Location of the custom CSS file is provided later in the text.

SAP CPQ Troubleshooting User Interface Troubleshooting PUBLIC 29 If the problematic behavior is caused by style options controlled by default CSS files (indicated with green arrows in the previous image), then the solution is to apply modifications to the custom CSS file. This is a valid option in case the UI is not broken beyond repair, in which case you should contact the Support team. The custom CSS file can be found (or added, if not defined) in Setup UI Design Branding .

5. Issues Caused by New Code Version

A frequent problem occurs as a result of core RD templates extended by custom templates being altered during the development of the latest code version. These changes may not be compatible with the previously applied customizations. If the core template is altered during the development of the latest code version and those changes are now breaking the customizations introduced by administrators, you have a couple of options:

1. If there is not enough time to resolve the issues, you can temporarily freeze the newly introduced changes in the core template. Use this only as a temporary measure to give yourself enough time to troubleshoot and resolve the issues in RD templates. 2. Apply the corrective action to the custom RD template code. The best practice is to obtain a fresh copy of the core RD template and reapply the custom code.

SAP CPQ Troubleshooting 30 PUBLIC User Interface Troubleshooting To identify custom code in an RD template, you need to resort to template versioning (in the Template Versions tab) and look for changes made by administrators, as indicated in the following image:

In this image, administrator-made changes (or versions) are marked with green arrows, while the system changes refer to modifications made by the SAP CPQ Development team. You should only observe the non- system changes, as those records contain information on custom solutions. It is also mandatory to use Fiori styles for some of the newly introduced UI features (or templates). To do this, tick the Use Fiori styles checkbox in Setup UI Design Responsive Templates .

6. Define Custom Binding

If you need to define custom binding, it should be registered in the CustomScripts responsive template customization in the following way:

Then, it can be used in any responsive template as:

%

SAP CPQ Troubleshooting 32 PUBLIC User Interface Troubleshooting 8 Setup Troubleshooting

This section provides more information about common issues that may occur in Setup.

1. What could be causing an error message to appear when importing products via XML? When products are being imported via API, the XML note with the language name cannot contain brackets. For example, Portuguese (Brasil) should be written as PortugueseBrasil.

2. When exporting custom tables, what is the best way to prevent trailing zeros from being removed from text type columns in custom table column definition? The application parameter Export All Custom Table Data as Strings by Default needs to be set to True. That way, all data is treated as text data by the spreadsheet application. This parameter only influences data formatting when exporting custom tables.

Related Information

Custom Tables

SAP CPQ Troubleshooting Setup Troubleshooting PUBLIC 33 9 Login Troubleshooting

This section provides more information about common issues that may occur during the login, and ways to fix them.

1. In case the following error message displays: Your browser needs to be configured to accept session cookies. Check the browser configuration before proceeding. If you need any assistance, contact the SAP CPQ Support Team.

You should follow the provided instructions depending on the browser you're using:

Internet Explorer

1. Click the gear icon in the upper-right corner. 2. Click Internet Options from the dropdown list. 3. Click the Privacy tab. 4. Make sure that the Accept radio buttons for First-party Cookies and Third-party Cookies are selected. 5. Make sure that Always allow session cookies checkbox is ticked.

Microsoft Edge

1. Click on the three dots in the upper-right corner of the browser window. 2. Select Settings at the bottom of the menu. 3. In the settings, click Site permissions. 4. Make sure that the Allow sites to save and read cookie data (recommended) toggle switch is activated. 5. Make sure that the Block third-party cookies toggle switch isn't activated.

Firefox

1. Click the three lines in the upper-right corner. 2. Click Options. 3. Click Privacy and Security. 4. Under Enhanced Tracking Protection 5. Make sure that the Cookies checkbox isn't selected if the Custom radio button is selected.

Google Chrome

 Note

Google Chrome incognito mode contains the Block third party cookies toggle switch which is enabled by default. You need to disable it in order to allow SAP CPQ to save and read cookie data if you're accessing it in the incognito mode.

1. Click the three lines in the upper-right corner. 2. Click Settings. 3. Under Privacy and security click Site Settings. 4. Click Cookies and site data. 5. Make sure that the Allow sites to save and read cookie data (recommended) checkbox is ticked.

SAP CPQ Troubleshooting 34 PUBLIC Login Troubleshooting 6. Make sure that the Block third-party cookies checkbox isn't ticked.

Apple Safari on OS X 1. Open the Preferences by clicking on the Safari menu. 2. Click the Privacy tab. 3. Under Cookies and website data click Always allow. 4. Make sure that the Ask websites not to track me checkbox isn't selected.

Apple Safari on iOS 1. On Safari for iPhone, iPad, iPod Touch, tap open the Settings. 2. Tap Safari. 3. Under Privacy & Security, make sure that the Do Not Track feature isn't selected. 4. Click Block Cookies. 5. In the Block Cookies screen, make sure that Always Allow is selected.

If the issue still persists, contact the SAP CPQ Support team.

SAP CPQ Troubleshooting Login Troubleshooting PUBLIC 35 10 Scripting Troubleshooting

This section provides more information about common issues that may occur in scripting, and ways to fix them.

1. Why doesn’t inline configuration work after executing Quote.Copy()?

Editing an inline configuration can fail if you previously executed the Quote.Copy() action. This happens because, after making a copy, the Quote.Copy() action loads the new quote, which affects the already initialized variables in the script.

The following script is an example where inline editing will fail:

Quote.ExecuteAction(4)

if Quote.MainItems[0] is not None: Quote.MainItems[0].Edit()

Product.UpdateQuote()

The solution is to execute the Quote.Copy() action first, and then load the new quote instance into a new variable which will be used for inline editing:

copiedQuoteInfo = Quote.Copy()

quote = QuoteHelper.Edit(copiedQuoteInfo.CompositeNumber) if quote.MainItems[0] is not None: p = quote.MainItems[0].EditConfiguration() p.UpdateQuote()

p = None

2. How do I detect and identify performance issues that are caused by Iron Python scripts?

The execution of Iron Python scripts can now be completely disabled in the Developer Console. That way, it is easier to identify performance issues that are caused by Iron Python scripts. When the checkbox Disable Iron Python Script Execution is selected, neither global nor local scripts are executed as long as the Developer Console is open.

3. How to handle cookies with redirects and the HttpWebRequest?

The HttpWebRequest handles redirects automatically, which may get in the way when the web server is setting cookies in the same response in which it's sending a redirect. In this scenario, the HttpWebRequest object will totally discard cookies that are set with a redirect response.

To prevent this, use the following script:

cookieContainer = CookieContainer()

def GetNewRequest(targetUrl): print targetUrl newRequest = HttpWebRequest.Create(targetUrl) newRequest.AllowAutoRedirect = 0 newRequest.CookieContainer = cookieContainer authorization = "credentials" authorization = Convert.ToBase64String(UTF8.GetBytes(authorization)) authorization = "Basic " + authorization newRequest.Headers.Add("AUTHORIZATION", authorization) newRequest.Method = 'GET' newRequest.ContentLength = 0

SAP CPQ Troubleshooting 36 PUBLIC Scripting Troubleshooting newRequest.ContentType = 'application/json' return newRequest rew = GetNewRequest('requestUrl" }') resp = rew.GetResponse() while resp.StatusCode == HttpStatusCode.Found: resp.Close() print resp.Headers["Location"] rew = GetNewRequest("baseRequestUrl" + resp.Headers["Location"]) resp= rew.GetResponse()

4. How do you fix the issue where assemblies are loaded in scripting, while import DLL is used? You should use the following importing method: import clr clr.AddReference('Assembly').

SAP CPQ Troubleshooting Scripting Troubleshooting PUBLIC 37 11 Performance Troubleshooting

SAP CPQ is highly flexible, but extensive modelling can affect the performance. This document lists the methods for troubleshooting performance issues.

Performance Measurement

A way to ensure that the implementation of new features is successful is doing systematic and periodic performance measurement. Performance measurement should be done before and after implementing new features and deploying them to production. In addition, it should be done with meaningful and impactful data (such quotes with exceedingly high numbers of items or quote item custom fields, and so on).

Compiling a Performance Issue Report

When contacting the Support team in regard to a performance issue, your report should contain the following information:

● information about the specific performed by the user (with the screenshots and the used data provided) ● the ID of the user who is experiencing the issue ● the timestamp of the issue ● HTTP trace from the browser (HAR file) ● a developer console trace XLSX file ● a performance analysis, which is performed by you as described below.

Performance Analysis by Clients

This is a list of the questions and tasks that should be addressed in your performance analysis:

● Network latency ○ Check if it’s a location issue. Does it work slowly only from specific locations? ○ Does an action take significantly more time than it’s shown in the Developer Console (meaning that it covers only server time)? ○ Check if the browser network tab shows slow network time. ○ Check network speed in the browser console. ○ Browser console Network tab Name of request (for example, login.aspx) Timing .

SAP CPQ Troubleshooting 38 PUBLIC Performance Troubleshooting This is an example of poor network quality (1.39 s for 124 kB). ● Issues with User Interface Customizations ○ User interface customizations can cause a slowdown so you should first turn off the customizations in the Developer Console and repeat the measurements. If the problem is solved by removing the customizations, then you should turn them back on and check the performance in the browser (there’s an option to record performance in the Network console. You can check the performance by recording it with and without user interface customizations). ○ Check if the rendering is slow or if there are additional calls being made to the server from custom JavaScript (ajax calls in browser console/Network).

SAP CPQ Troubleshooting Performance Troubleshooting PUBLIC 39 Also, in the Network console Performance tab , you can check the time spent on rendering/ scripting/loading by recording it:

● Developer Console - break down the issue causing the performance slowdown to its components: ○ Database - total number of database queries (standard and custom queries), total database time, top 10 slowest queries. ○ Scripting - total number of scripts executed, total script time, top 10 slowest scripts. ○ Formulas - number of formulas evaluated, total time spent in formula evaluation, top 10 slowest formulas. ○ External API calls - total number and total duration (for example, RestHelper, SFCommunicator, VCCommunicator...). ○ Check the Performance details option on the action for more information. ○ Check Number of errors (there shouldn't be errors). ○ Check Number of Info because if scripts write in the Log, that could cause slow performance (Labels: Script, Level: Info). ● Performance Exploration

SAP CPQ Troubleshooting 40 PUBLIC Performance Troubleshooting ○ Slowest first - If you want to rearrange actions to view the slowest actions first, click Slowest first in the duration (ms) column. This rearranges the trace lines so that traces are sorted by duration (the slowest is displayed first).

○ Pin a trace - In the trace list, you can click on the pin for a trace so that the other traces are removed from the list, and only the pinned trace and its children traces are displayed. The breadcrumbs display above the list. By pinning, you isolate a group of traces within one action so you can focus on analyzing them only.

○ Nesting level 1- The results in the Developer Console are nested. When you set the nesting level to 1 you don’t see the children traces and that simplifies the view and allows you to drill down by pinning (same thing you do when you have a large and deep folder structure and you’re trying to figure out how to free hard drive space). You can set the level that you want to see (for example, 1 or 2, or maybe more) and the results are displayed for the selected criteria.

SAP CPQ Troubleshooting Performance Troubleshooting PUBLIC 41 Tips and Tricks for Performance Troubleshooting

Scripting ● In the Developer Console, you can disable in one click all Iron Python scripts by clicking on a checkbox in the Developer Console menu. This way, you can easily calculate the differences in action execution when scripts are enabled and when they’re disabled.

● Check if a slow action that maybe isn't necessary is called (for example, Quote Save or any other action related to calculations or reconfiguring). ● Check if the event context in which scripts are executed is too broad, if multiple events are unnecessarily hooked to a script, or if events are used incorrectly (for example, if scripts loop when processing items in the OnItemAdded event, which runs for every item separately). ● Check if Log.Write is used instead of Trace.Write (logging can cause additional slowdown).

Catalog

● Check if the application parameters for parsing the Catalog are set to FAST ( Setup General Application Parameters Product Catalog )

SAP CPQ Troubleshooting 42 PUBLIC Performance Troubleshooting Configurator

● If the product has attributes with values referencing other products, enable the parameter No Loading of Referenced Products in Product Collection.

● Check the size and depth of parent/child structures, since the whole structure is loaded in the memory, and, whenever it is possible, altering the product model should be analyzed and considered. ● Check if the console reports a loop in the rules. ● Check the number of execution cycles in general.

Quote User Interface

● Check if the application parameter Page items (only for Responsive Design) is set to True ( Setup General Application parameters Shopping Cart and Quotes Page items (only for Responsive Design ). If this parameter is set to False, the loading of the quote with a lot of items lasts longer. ● Check the number of columns in the list of quote items (maybe not all quote item custom fields are visible but JSON file is large). ● Check if the slow action is executing Reconfigure.

How to export HTTP trace from the browser (HAR file)?

● Read more about getting the HAR file through different browsers: http://www.keycdn.com/support/ what-is-a-har-file. ● Browser console Network tab Export HAR .

SAP CPQ Troubleshooting Performance Troubleshooting PUBLIC 43 The sheer size of a structure might be the issue (the size of a container in the background, a quote table, or the number of items or fields in the quote).

Related Information

Developer Console Developer Console How-To Debugging with Developer Console

SAP CPQ Troubleshooting 44 PUBLIC Performance Troubleshooting Important Disclaimers and Legal Information

Hyperlinks

Some links are classified by an icon and/or a mouseover text. These links provide additional information. About the icons:

● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your agreements with SAP) to this:

● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information. ● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.

● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this information.

Videos Hosted on External Platforms

Some videos may point to third-party video hosting platforms. SAP cannot guarantee the future availability of videos stored on these platforms. Furthermore, any advertisements or other content hosted on these platforms (for example, suggested videos or by navigating to other videos hosted on the same site), are not within the control or responsibility of SAP.

Beta and Other Experimental Features

Experimental features are not part of the officially delivered scope that SAP guarantees for future releases. This means that experimental features may be changed by SAP at any time for any reason without notice. Experimental features are not for productive use. You may not demonstrate, test, examine, evaluate or otherwise use the experimental features in a live operating environment or with data that has not been sufficiently backed up. The purpose of experimental features is to get feedback early on, allowing customers and partners to influence the future product accordingly. By providing your feedback (e.g. in the SAP Community), you accept that intellectual property rights of the contributions or derivative works shall remain the exclusive property of SAP.

Example Code

Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of example code unless damages have been caused by SAP's gross negligence or willful misconduct.

Gender-Related Language

We try not to use gender-specific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.

SAP CPQ Troubleshooting Important Disclaimers and Legal Information PUBLIC 45 www..com/contactsap

© 2021 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.

Please see https://www.sap.com/about/legal/trademark.html for additional trademark information and notices.

THE BEST RUN