Re: How to Use Loadrunner to Store Dynamic SAP Status Bar value (516 Views)
Reply
Occasional Visitor
JeremyF
Posts: 2
Registered: ‎01-22-2009
Message 1 of 5 (516 Views)

How to Use Loadrunner to Store Dynamic SAP Status Bar value

I am using Loadrunner 9.10 against SAP Gui ECC 6.0 and am having a difficult time storing a value displaying on the status bar after completing a transaction.

For Example, I want to grab the Quote Number and store it in a parameter so that I can reuse it later in that script.

Can anyone give me some advice on how to do this.
Please use plain text.
Occasional Visitor
JeremyF
Posts: 2
Registered: ‎01-22-2009
Message 2 of 5 (516 Views)

Re: How to Use Loadrunner to Store Dynamic SAP Status Bar value

I believe I found the answer:

The following code stores the paramater 20017953 into Quote_Number and then uses it to populate a text value later in the script:


sapgui_status_bar_get_text("paramStatusBarText",
BEGIN_OPTIONAL,
"Recorded status bar text: Stnd. Quotation 20017953 has been saved",
"AdditionalInfo=sapgui1061",
END_OPTIONAL);
sapgui_status_bar_get_param( "2" , "Quote_Number", LAST);

.....

sapgui_set_text("I1-LOW",
"{Quote_Number}",
ctxtI11,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1071",
END_OPTIONAL);
Please use plain text.
Occasional Advisor
sateeshm
Posts: 10
Registered: ‎04-28-2009
Message 3 of 5 (516 Views)

Re: How to Use Loadrunner to Store Dynamic SAP Status Bar value

Hi Jenny,

try to use lr_output_message function and call the string from sapgui_statusbar_get_text
Please use plain text.
Occasional Contributor
tveivo
Posts: 5
Registered: ‎06-11-2009
Message 4 of 5 (516 Views)

Re: How to Use Loadrunner to Store Dynamic SAP Status Bar value

Hi, I have similar problem and I suck in doing automatic correlations and coding. I have been (un)/lucky this far and my coding skills has not improved.

I tried also the first solution, but i think it only shows the actual value in logs. and Does not save the value.

This is where I think I capture the value.
I get the values in replay log, but is it stored for using it in another place?

sapgui_table_get_text("Purchase Requisition",tblSAPMV45ATCTRL_PEIN1,"0", "10", "{Purchase_Requisition}");
lr_save_string( lr_eval_string("{Purchase_Requisition}") ,"Purchase_Requisition");


---here is where I want to use it later on---

sapgui_set_text("S_BANFN-LOW",
"{Purchase_Requisition}",
ctxtS_BANFN2,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui6012",
END_OPTIONAL);

I have looked whole day for more help to do this with lr_output_message function and call the string from sapgui_statusbar_get_text
but as a result after day I was so frustrated that I wanted to throw up!

Please someone "borrow me a blueprint of the wheel" :-)
Please use plain text.
Occasional Contributor
tveivo
Posts: 5
Registered: ‎06-11-2009
Message 5 of 5 (516 Views)

Re: How to Use Loadrunner to Store Dynamic SAP Status Bar value

ah I had forgot to declare char in lr_strings.h
const char PRE[8];

ACTION part

// GET PURCHASE REQUISITION NUMBER
sapgui_table_get_text("Purchase Requisition",tblSAPMV45ATCTRL_PEIN1,"0", "10", "PRE");
lr_save_string("PRE","{PRE}");
lr_output_message(lr_eval_string("Value of Purchase_Requisition: {PRE}"));

LOG
vuser_init.c(500): Table - Text of cell "(0, 'Purchase Requisition')" is "10000573"
vuser_init.c(502): Value of Purchase_Requisition: 10000573

//insert purchase requisition number here
sapgui_set_text("S_BANFN-LOW",
"{PRE}",
ctxtS_BANFN2,
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui6012",
END_OPTIONAL);

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation