Unable to record Excel sheet in Loadrunner - sap

I am trying to do a Performance test with Loadrunner on Excel based application which is redirect from SAP GUI.
Loadrunner able to record all the activity perform in SAP application but it's not recording anything for EXCEL.
My main target is to record the excel , For testing the performance of the application.
I also try with QTP and succeed but as I want to conduct performance test, so the script is no use for me.
Any suggestions what protocol to use Or any other scripting language for performance test on excel based application with SAP GUI.

And just what protocol is the excel spreadsheet using to communicate to what type of server? Only when you answer that can you then answer how to reproduce the server communication behavior of your excel application.
On the other hand, if you are simply downloading a spreadsheet, modifying it locally and then uploading the changes without any server communication then you had better dust off your programming skills, download the current excel file format and prepare to make the modifications to the file in code (or have another static one to upload)

Related

How can i use some SAP scripting from windev?

I have a windev programm that needs to access some SAP data.
Because of my company's restrictions, i cannot use the SAP native access provided with WinDev.
So, How can I use vba code that uses SAP from windev?
This is for a .exe programm for Windows. I need to go through the SAP GUI, so SAP GUI scripting is used.
Unfortunately, due to my company's restrictions, i do not have any code to show.
I finally found an answer !
To use SAP Scripting without using the native access, you can use a Batch file to run your SAP Scripting file.
That is one way of doing it. You can also use an excel file, with macros, and analyze your data there before using those in Windev.
Sure it is a complicated way to do things, but if your company does not allow you to directly read SAP database's tables, you can do it using this method.

Using ADO.NET in the IDE integrated in Excel

I want to build an authentication system based on an Excel spreadsheet database. Therefore I would like to know if it's possible to use ADO.NET in the IDE integrated in Excel. (I don't want to use visual basic studio)
If you add a reference to the ActiveX Data Objects, you can use the ADODB suite of objects - Connection, Command, ResultSet etc.
I presume what you'd do is just show the "Login" sheet on opening the file and then, on successful authentication, show other sheets.
As it's Excel though, I'm not sure how easy it would be to bypass for somebody with a reasonable amount of knowledge.
Best of luck with it.

Automate report download from SAP Business Object Infoview

I am new to SAP Business Objects Infoview and was asked if I can automate the report data generation for an existing report.
Here is what I would do manually through the Infoview web interface:
Click schedule for the report in question, which brings up the Schedule dialog
Change the recurrence to Now
Change the report prompts (start date and end date) so that start date=today and end date=today-14 days
Set the format to CSV and output the report to the Inbox
Schedule the report
Wait for the report to succeed
Download the generated report data
I can see how I could build a tool using Java and Selenium to automate this. However I am wondering if there is a more elegant way to doing this that still allows me to set the prompts dynamically. Are there existing 3rd party tools? Can I use JDBC?
What I have at my disposal is a user name/password to log on to Infoview. If a more elegant solution requires additional access or software please let me know.
It's possible with a simple addition to the universe (but this, of course, requires universe developer access). For your example, you could create a new universe-based Predefined Condition object with a definition of: (assuming Oracle)
start_date = trunc(sysdate) and end_date = trunc(sysdate-14)
Adding this object to a report will produce the desired timeframe whenever it's run, whether it's scheduled or interactive.
If you want the same report to run with this logic when scheduled, but still allow users to select dates via the prompts. You can use magic dates. See this blog post for info.
Lastly, you could write a custom program that would open the report, populate the prompts with the appropriate values, and run it. But I would consider that a less-preferable option than the ones above.
You can use UiPath in order to easily automate SAP GUI without writing code.
Here's a tutorial on how to automate data entry, menu navigation and screen scraping on SAP.
You can use it from code (SDK) or you can create workflows (visual automation) directly from UiPath Studio.
Note: I work at UiPath. You should also try other visual automation tools like Automation Anywhere, WinAutomation, Jacada, use them side by side and choose the one that suits better your needs.
Here's how automating SAP Business One menus, buttons and typing looks like:

How do I upload an Excel sheet to a SQL table in a Lightswitch web client?

I have a lightswitch project in visual studio 2013, using vb.net. I would like the user to be able to click a button and have lightswitch find an excel file, and upload that file to a sql table according to a pre-determined column mapping.
My preference was to use the Office Integration extension for visual studio, which I got working with VS 2013 by downloading it from this link: http://www.ge.tt/71iuRQv/v/0
However, the documentation and examples for office integration seem to be very heavy on getting an excel spreadsheet into a display in the lightswitch web client, rather than into the sql data table, which is where I need it. Here are the examples I've been following:
http://blogs.msdn.com/b/bethmassi/archive/2012/07/18/new-and-improved-office-integration-pack-extension-for-lightswitch.aspx
Alternatively, I have an existing stored procedure, and I can request that the server call this stored proc by sending a web API extension from the client to the server. I have this working already for other stored procs, according to examples from Beth Masi and Paul van Bladel. (Stackoverflow won't let me post the links...)
The undesirable part of this approach is that the stored proc is old, and messy.
I've searched and searched, but have yet to find anyone approach this problem for VS 2013 with lightswitch. Any useful advice?
I've used the method detailed by Matt Sampson to store word files and it works very well. Since it just stores the raw binary it should handle Excel files just as well.
If you're creating the table in LightSwitch, use the Binary Type. If you use SQL create scripts use varbinary(MAX).
You need to create a custom Silverlight dialog box to gain access to the OpenFileDialog object. Then open the file in as a FileStream.
Finally, you need to add a handler for the closed method of the control and then show the control to the user. Most likely done in a button. This needs to be done on the main dispatcher.
The code examples are in C# but I just used one of the many available translators out on the web and copy/pasted the VB.NET code.
Another option might be to consider shelling out to the DTSEXEC run-time to execute an SSIS package to perform the upload - especially if the target Excel spreadsheets have predefined layouts and content data types.
Even simpler, you might be able to use the SQL Server BULK INSERT command to get the job done - although that would require a SQL Client connection to your database.
HTH

Writing data back to SQL from Excel sheet

I know it is possible to get data from a SQL database into an excel sheet, but i'm looking for a way to make it possible to edit the data in excel, and after editing, writing it back to the SQL database.
It appears this is not a function in excel, and google didn't come up with much usefull.
If you want to have the Excel file do all of the work (retrieve from DB; manipulate; update DB) then you could look at ActiveX Data Objects (ADO). You can get an overview at:
http://msdn.microsoft.com/en-us/library/ms680928(VS.85).aspx
You want the Import/Export wizard in SQL Management Studio. Depending on which version of SQL Server you are using, open SSMS (connect to the SQL instance you desire), right click on the database you want to import into and select Tasks.. "Import Data".
In the wizard, click Next (past the intro screen) and from the Data Source drop list select "Microsoft Excel". You specify the path and file name of the Excel spreadsheet, whether you have column headings or not.. then press Next. Just follow the wizard through, it'll set up the destination (can be SQL Server or another destination) etc.
There is help available for this process in SQL Server Books Online and more (a walkthrough) from MSDN.
If you need something deployable/more robust (or less wizard driven) then you'd need to take a look at SQL Server Integration Services (for a more "Enterprise" and security conscious approach). It's probably overkill for what you want to accomplish though.
There is a new Excel plug-in named "MySQL for Excel" : http://www.mysql.com/why-mysql/windows/
I just had a need to do this, and this thread has been quiet for a long time, so I thought it might be useful to supply a recent data point.
In my application roving salespeople use a copy of an Excel workbook that tracks the progress of a prospect through a loan application. The current stage of the application needs to be automatically saved back to a remote SQL database so that we can run reporting on it.
Rejected methods for updating the database from Excel:
SSIS and OpenRowSet are both methods for allowing SQL Server to pull the data from Excel, and don't work very well when the Excel workbook is sitting in an undefined location on a user's computer, and certainly not when the workbook is currently open in Excel.
ADO is now, if not actually deprecated, nevertheless looking very long in the tooth. Also, I wanted the solution to be robust in the face of the user possibly not being connected to the internet.
I also considered running a web API on the destination server. Macros in the Excel workbook connect to the web API to transfer data. However, it can sometimes be painful to allow a web API to talk to the outside world. Also, the code to make it robust in the face of temporary loss of internet connection is painful.
The adopted solution:
The solution I plan to adopt is low-tech: email. Excel emails the data to an address hosted on an Exchange server. Everyone in the company has Outlook installed, so the emails are sent by programmatically adding them to the Outlook Outbox. Outlook nicely handles the case when the user is offline. At the server end, a custom C# executable, fired up at regular intervals by the Task Scheduler, polls the inbox and processes the emails.
You could use try these add-ins :
www.QueryCell.com (I created this one)
www.SQLDrill.com
www.Excel-DB.net
You can use the OPENROWSET function to manipulate Excel data from a T-SQL script. Example usage would be:
UPDATE OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;DATABASE=c:\MySpreadsheet.xls',
'Select * from MyTable')
SET Field1='Value1' WHERE Field2 = 'Value2'