Lieutenant Commander
Lieutenant Commander
504 views

Export results from BAPI test to local excel sheet in UFT

Hello 

I recently started to use SAP BAPI to test in UFT we have a combination of GUI and SAP BAPI's in our test. I want to know how do I read and write the values of what the BAPI returns to the local excel sheet. Is there a standard way of doing this? I could not find any or will it be custom code in C# 

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

hi, there

UFT has a data file and there are 'Global' sheet and other sheets corresponds to the name of Actions. So you may in your code import the data from the output of your BAPI Test into the Global sheet. In this way, the data will be dynamically loaded before running the UFT test. 

For more detailed help, please refer to ADM online help.

Thanks.

James

0 Likes
Lieutenant Commander
Lieutenant Commander

Hello James,

The API test does not use a global sheet I know hoe to write to a global sheet in a gui test not sure what you are refering to I am importing an external sheet into my API test and want to write to that the method 

GetDataSource("Customer_Info!Sheet1").SetValue(2,"CRN","10000000");

does not work 

0 Likes
Micro Focus Expert
Micro Focus Expert

hi, 

yes, I was referring to GUI test. Sorry about that. For API test, you can either import the file in the Data pane or read content from a file with an Activity. 

For customer code, it's also an option. You may add an Activity of Custom Code and put the desired data to an output value to be consumed by the other activities.

Thanks.

James

0 Likes
Lieutenant Commander
Lieutenant Commander

Thanks for the reply is there any code snippet that you have seen 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.