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: 
SivaS
Product and Topic Expert
Product and Topic Expert
This blog post will explain how can we call a SCPI IFlow using SAP CPQ Ironpython Scripting. we can also call this same script as a custom Action.

To get more details on CPQ. Refer  SAP CALLIDUS CPQ

To get more details on SCPI. Refer SAP CLOUD INTEGRATION

Business Case:

SAP CPQ by default provides standard integrations with SAP tools like ECC/ S4HANA/ BRIM/ C4C ..etc . Using this approach we can Send and Get  information easily whenever we need (In a Click).

Here we will implement required Integration in SCPI and that IFlow will be called in CPQ script.

  • We can connect to an External System and get the required Information like Shipping/Cost/Pricing..etc

  • Can Send Quote information from CPQ to third party tool.

  • Can Create an ORDER in third party tools.

  • Can Send Information to other CRM solutions.


Steps:

Step1: Create an IFLOW in SCPI and convert that ENDPOINT as API.


More details can get from sap-cloud-integration-step-towards-building-api-based-integrations



IFlow Created in SCPI


Step2: Create a Script in CPQ. Based on requirement we can create script in 2 ways






    • Global Script:




we can make this as a global script and can attach to an EVENT. when that particular event happens this code will execute.






    • Custom Action:




We can create this script as an Action/Button and can call in any status or by any user.


For More details on these scripts. Refer SAP CPQ HELP DOCUMENT



CPQ Custom Action


Step3: Write Ironpython Code.


Ex: Below code calls the iflow and and send quote information



url ='https://<CPI>-iflmap.hcisb.int.sap.eu2.hana.ondemand.com/http/CPQTOICMCALLV1'
headers = { 'authorization': RestClient.GetBasicAuthenticationHeader('username', 'pwd') }
data = '{"QuoteID": "'+Quote.CompositeNumber+'"}'
Trace.Write(data)
RestClient.Post(url, data, headers)

Step4: Enable this action at required statuses with in CPQ.



Enable Action in CPQ Workflow Screen


Same action is appears in Quote Screen



 

Thanks, for reading it till the end.





  • Hope you find that helpful! Let me know your thoughts on this in the comments section.

  • Don’t forget to share this article with your friends or colleagues.

  • Ask questions about SAP CPQ and follow SAP CPQ QUESTIONS

  • Read other SAP CPQ and follow blog posts SAP CPQ BLOGS

  • Feel free to connect with me on any of the platforms below!


sivaselagala