When using Nintex Forms in SAP integration scenarios, it is often necessary to check the input data to see if it is valid in the SAP system before we send the form. If the form has an input field for an SAP customer number, for example, we want to check whether this customer number exists in the SAP system.
Step 1: Define text fields
In our Nintex form we need two fields: The first field field_input contains the customer number. The second field field_output contains the SAP customer name if the entry is valid, otherwise an error message.
Right-click on the first field and select Settings.
Repeat the last steps for the second field and name it, e.g. field_output.
The tEcs.ExeculeXQL function is called in the code to read the customer name from the SAP table KNA1.
Step 3: Execute the Nintex form
Now execute the form and enter a customer number. The customer name is read from SAP and displayed in the second field.
If the customer number you entered does not exist in SAP, an error message appears.
Many other scenarios are feasible. It would be possible, for example, to fill a combo box with SAP customer numbers or names, or to offer a direct SAP search.