All About the Apps
Showing results for 
Search instead for 
Do you mean 

Using SAP structured parameters in HP Unified Functional Testing 11.52

Anonymous_User1 ‎09-16-2013 10:00 AM - edited ‎09-09-2015 03:19 PM

This post was written by Yan Yang (Ellie), from the HP UFT R&D team.



HP Unified Functional Testing (UFT) is integrated with SAP Solution Manager, which means that you can use UFT to create tests and save them in Solution Manager. You maintain the test data, run the tests and store the run results in Solution Manager.


In SAP Solution Manager, the test data is stored in a Test Data Container (TDC), and is used as parameters to run the test. This data can be organized in a hierarchical structure, like the one shown in the following screenshot: 


Versions of UFT (or QTP) prior to 11.52 supported only non-hierarchical parameters (such as string, number, date, etc). In order to use test data such as the one in the picture above in UFT, you had to create many separate parameters to represent each element in the structure. It was even more painful if the structure contained a variable-length array. Imagine how many parameters you’d need to create for a simple structure like the one above! Not to mention the additional work wasted on mapping each element to the parameter while running.


In UFT 11.52, the new support for structured parameters makes life much easier. You just define one parameter, and then you can access its elements in your script as if you were using an object.


Adding SAP structured parameters to a UFT test

To add the SAP parameters to a UFT test, the test must be opened in integration mode, which means you must open UFT from SAP GUI. Then you’ll find a new button “Maintain SAP Parameters” in the properties box.


This button will cause SAP GUI to be shown, where you can select SAP structured parameters to add to the test. For example, suppose you want to use the parameter SALESORDER in the test data container (TDC) Z_SALESDATA - click the “Create Parameter with Template” button, circled in red in the following screenshot: 


Enter Z_SALESDATA in the dialog that opens, and select the SALESORDER parameter.


After the parameter is added, you can change the default values that were inherited from the TDC.  You can also change it from an input parameter to an output parameter by changing “I” to “E” (import -> export), circled in red in the following screenshot.  Click the Save and Return buttons (circled in green) to save the change and go back to UFT:


The parameter SALESORDER will appear in the test properties box. It belongs to SAP so it is read-only in UFT, where its value is stored as XML.



The TDC can also contain parameters of simple types, which you can also add to UFT. In UFT, these parameters will have the type string.


Note: Although you click Save in SAP GUI, you must also save the change in UFT, to ensure that the SAP data and the respective data in UFT is consistent.


Using structured parameters in UFT tests

In order to use the structured parameter in a test, you need to create a parameter in an action, and map it to a structured parameter that you brought into the test from SAP.


The Input Parameter dialog has a new type, “Structure”:



When you click OK, the new structured parameter will be added to the action. At the moment, it’s just an empty shell. You now need to map it to a structured parameter with a valid definition.


You can map the new action parameter to the top-level SALESORDER, or you can map it to a child structure within the SALESORDER structure. UFT shows a tree view which displays the structure’s hierarchy and enables you to select the appropriate element:



You can also create parameters with traditional types, and map them to single elements under SALESORDER.


Here are some examples, shown in the Action Call Properties dialog. The first parameter maps to the whole structure, the second one maps to an element inside the structure, and the third one maps to a child structure:



After the mapping is established, you can use the structured parameter in your test. You can access the structure element as you would access members of an object, with full auto-completion support: 

Here's an example of how you can access different fields in the same structure:


Running a test that contains structured parameters

When you initiate a run session from UFT, you can easily change runtime values in the Structure Editor:


When executing from SAP GUI, you can use the existing test data or add new test data, as you would when running any SAP test: 


More Information

For more details on how to use SAP Structured Parameters, open HP Unified Functional Testing’s Help and browse to UFT Add-ins Guide > Add-in for SAP Solutions > Windows-based SAP Support > UFT-SAP Solution Manager Integration > Tasks > How to Work with SAP Structured Parameters.



Leave us a comment in the box below to let us know how you’re testing your SAP functionality.



Thanks to Ellie for providing this article!

About the Author


on ‎09-17-2013 12:32 AM

Nice article!

on ‎02-20-2014 10:53 AM

Hi all


Mine is more of a request than a comment. First of all it is a good article.


My request is around SAP testing... We would like to use UFT for our regression suites and have minimum expertise on how to do it..Are there simplified slides or notes on how to do this?



27 Feb - 2 March 2017
Barcelona | Fira Gran Via
Mobile World Congress 2017
Hewlett Packard Enterprise at Mobile World Congress 2017, Barcelona | Fira Gran Via Location: Hall 3, Booth 3E11
Read more
Each Month in 2017
Software Expert Days - 2017
Join us online to talk directly with our Software experts during online Expert Days. Find information here about past, current, and upcoming Expert Da...
Read more
View all