RazorSPoint

ERPConnect Services with Nintex Forms

Sebastian SchützeSebastian Schütze
This entry is part 4 of 5 in the article series ERPConnect Services

In this part of the series I explain how to use the JavaScript library provided by Theobald Software to call their webservice. You could do that without the library, but it makes things so much easier (you will see). In the following section I show how to use Nintex and Theobald Software to get a very dynamic experience, which is much better than with the Nintex actions. This example is a real customer scenario that I implemented. The requirement was that employees should be able to purchase company internal material for private use. These materials were much cheaper than on the public market. The customer uses SharePoint as their intranet solution and they wanted to have a SharePoint list connected to the SAP system. Since the list should save the data on their own and should only synchronize on the users input, no external list was used.

The employee creates an entry in that list, which triggers an approval process in form of a Nintex workflow. After the approval the employee can go to the storage with a printed confirmation an they can collect their approved material. The cost where transmitted via scheduled workflow to the finance department, which were then charged on the salary of the employee.

No input Errors with Data from SAP

Mandatory input of product information should not be entered manually by the user. This would lead to spelling mistakes or wrong information. Below you can see the Nintex form that is used. For the identification of the product, the SAP material number is used. This number is unique.

Nintex-Form for buying products

Two Possibilities to Fill Your Form

Since inputs like price or technical data of the product can lead to errors, two different methods can be used to get the data directly from SAP. On one hand you can use ERPConnect Services Nintex workflow actions.

possible Nintex actions shipped with ERPConnect Services

Those can be used to call SAP tables or BAPI functions. This possibility has one disadvantage. Due to the nature of workflows, data will be filled after saving the form. In this case the employee does not get any feedback. He will not be able to see if the material number was correct or what the price is. This can only happen with delay, which is not very comfortable. On the other hand, the second and more suitable method is using Theobald Software JavaScript library in the Nintex form. This enables you to load data directly into the form. In this case, after entering the material number a green hook is shown. If the entry is wrong a red cross is shown. This makes it possible to give immediate feedback.

successfully filled Nintex form for the product purchase

 More Precise: A Code Sample

To access the SAP data from the form, you just need a short JavaScript snippet. Besides code to access the form control itself, we can do the SAP query with the shipped ECS (ERPConnect Services) JavaScript library with the name „theobald.ecs.micro.min.js“. This can be downloaded from the Theobald Software website. The query is shown below

In line 1 the executFunction method is called to call a RFC enabled building block. Additionally the function to call is named in line 2 together with the parameters in line 3 to 8. In this query the product is searched my the material number. In lines 9 to 14 the return data on sucess are proceeded and from line 15 to 19 when the request failed. You can go much more wild with the library and Nintex forms. But to get started is pretty easy!



Sebastian Schütze is working as a Senior SharePoint Developer since 2017 at Schindler Digital Business and from 2013-2017 as a SharePoint Consultant at Fritz & Macziol. Beforehand he also worked as a trainer for ASP.NET web development in the Microsoft Student Partner Program. His passion is dedicated to Microsoft technologies.

Comments 0
There are currently no comments.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close