Tuesday, February 17, 2009

Populating Data on SAP server.

I was assigned this unique task of populating specific (P2P, Authorizations) data on SAP server. Specific data was required for testing purpose by both development and QA department. P2P transaction included the following parts:
Purchace Recquisition-> Purchase Order -> Goods Receipts -> Invoice Receipts -> Payments
I tried various options like writing simple vb script to connect to SAP Server like the following:

I also tried using QTP to capture SAP objects and rerun the script as many times as we needed. But QTP made the application extremely slow and required too much tweaking. We were able to generate 1000 records of P2P transactions in about 13 hours using QTP which was not enough for Performance testing. They needed millions of records per day. We were in a jinx when i found a document which mentioned about using in-build recording function by SAP and voila... It was so easy to record a transaction and the output was a vbs file which could be parameterized easily by getting values from Excel. The vbs file is very easy to understand and maintainable as well. Following are the steps to have recorded script:
1) Enable scripting on SAP Server.

2) Go To Script Recording and Playback from Customizing local layout in SAP GUI.

3) Start recording in SAP GUI after clicking the Record button on newly popped up Record window.

4) Once you are done with your recording open the vbs file saved.

5) Parameterize this file and you are ready to populate data on SAP server.


Mail me in case you have any issues regarding populating data on SAP Server using this method.

3 comments:

Ajit Kumar said...

Nice Work Dude.
Apart from this there are some tools available to generate the tdata for Performance Testing and most of them are free,so as par need we can use that also.

Ajit Kumar said...

I mentioned tdata in my comment,"tdata" means TestData.
Just a clarification from my side.

Ajit Kumar said...

As a reference you can check this:
http://www.grid-tools.com/