SAP web protocol same like as Web HTTP/HTML protocol. If the application is developed as a ECC portal, net weaver portal, dynapro portal. We have to use SAP Web protocol. If the LR failed to record the objects using Web HTTP/HTML then only we can use SAP protocol.
The SAP-Web Vuser script typically contains several SAP transactions which make up a
business process. The business process consists of functions that emulate user actions. For information about these functions, see the Web functions in the Function Reference.
Note: You can generate a SAP - Web Vuser script by analyzing an existing network traffic file (capture file). This method may be useful for creating Vuser scripts that emulate activity on mobile applications.
Common correlation values in SAP Protocol:
1. SAP_exit_sid
2. SAP_context_id
3. SAP_securid
4. Window_id
5. Event queue [WD1101]
How to handle window Id?
Window id is a 13 digit time stamp which will generates in millisec.
Ex: windowed=144333121987
Challenges (or) Scripting Technique:
In one of the ECC portal SAP_exit_sid capturing as ABCD11234566789PLNNO.
Whenever I am trying to convert the above value HTML to URL, URL to HTML. Which
is not happening properly.
To overcome the above scenario. I have to search for a character in the captured value, replace with expected character.
To find and replace a character, we written the “C” code which will automatically search for string and replaces with other string. Once it replaced we are converting to the Lr variable & substituting whenever we required.
The following example shows a typical recording for an SAP Portal client:
Example:
vuser_init()
{
web_reg_find("Text=SAP Portals Enterprise Portal 5.0",
LAST);
web_set_user("junior{UserNumber}",
lr_decrypt("3ed4cfe457afe04e"),
"sonata.hplab.com:80");
web_url("sapportal",
"URL=http://sonata.hplab.com/sapportal",
"Resource=0",
"RecContentType=text/html",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/SAPPortal/IE/Media/sap_mango_polarwind/images/header/branding_image.jpg",
"Referer=http://sonata.hplab.com/hrnp$30001/sonata.hplab.coml:80/Action/26011[header]"
, ENDITEM,
"Url=/SAPPortal/IE/Media/sap_mango_polarwind/images/header/logo.gif",
"Referer=http://sonata.hplab.com/hrnp$30001/sonata.hplab.com:80/Action/26011[header]",
ENDITEM,
...
LAST);
The following section illustrates an SAP Web and SAP GUI multi-protocol recording in which
the Portal client opens an SAP control. Note the switch from web_xxx to sapgui_xxx functions.
Example:
web_url("dummy",
"URL=http://sonata.hplab.com:1000/hrnp$30000/sonata.hplab.com:
1000/Action/dummy?PASS_PARAMS=YES=;dummyComp=dummy=;
Tcode=VA01=;draggable=0=;CompFName=VA01=;Style=sap_mango_polarwind",
"Resource=0",
"RecContentType=text/html",
"Referer=http://sonata.hplab.com/sapportal",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);
sapgui_open_connection_ex(" /H/Protector/S/3200 /WP",
"",
"con[0]");
sapgui_select_active_connection("con[0]");
sapgui_select_active_session("ses[0]");
/*Before running script, enter password in place of asterisks in logon function*/
sapgui_logon("JUNIOR{UserNumber}",
"ides",
"800",
"EN",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui102",
END_OPTIONAL);
The SAP-Web Vuser script typically contains several SAP transactions which make up a
business process. The business process consists of functions that emulate user actions. For information about these functions, see the Web functions in the Function Reference.
Note: You can generate a SAP - Web Vuser script by analyzing an existing network traffic file (capture file). This method may be useful for creating Vuser scripts that emulate activity on mobile applications.
Common correlation values in SAP Protocol:
1. SAP_exit_sid
2. SAP_context_id
3. SAP_securid
4. Window_id
5. Event queue [WD1101]
How to handle window Id?
Window id is a 13 digit time stamp which will generates in millisec.
Ex: windowed=144333121987
Challenges (or) Scripting Technique:
In one of the ECC portal SAP_exit_sid capturing as ABCD11234566789PLNNO.
Whenever I am trying to convert the above value HTML to URL, URL to HTML. Which
is not happening properly.
To overcome the above scenario. I have to search for a character in the captured value, replace with expected character.
To find and replace a character, we written the “C” code which will automatically search for string and replaces with other string. Once it replaced we are converting to the Lr variable & substituting whenever we required.
The following example shows a typical recording for an SAP Portal client:
Example:
vuser_init()
{
web_reg_find("Text=SAP Portals Enterprise Portal 5.0",
LAST);
web_set_user("junior{UserNumber}",
lr_decrypt("3ed4cfe457afe04e"),
"sonata.hplab.com:80");
web_url("sapportal",
"URL=http://sonata.hplab.com/sapportal",
"Resource=0",
"RecContentType=text/html",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/SAPPortal/IE/Media/sap_mango_polarwind/images/header/branding_image.jpg",
"Referer=http://sonata.hplab.com/hrnp$30001/sonata.hplab.coml:80/Action/26011[header]"
, ENDITEM,
"Url=/SAPPortal/IE/Media/sap_mango_polarwind/images/header/logo.gif",
"Referer=http://sonata.hplab.com/hrnp$30001/sonata.hplab.com:80/Action/26011[header]",
ENDITEM,
...
LAST);
The following section illustrates an SAP Web and SAP GUI multi-protocol recording in which
the Portal client opens an SAP control. Note the switch from web_xxx to sapgui_xxx functions.
Example:
web_url("dummy",
"URL=http://sonata.hplab.com:1000/hrnp$30000/sonata.hplab.com:
1000/Action/dummy?PASS_PARAMS=YES=;dummyComp=dummy=;
Tcode=VA01=;draggable=0=;CompFName=VA01=;Style=sap_mango_polarwind",
"Resource=0",
"RecContentType=text/html",
"Referer=http://sonata.hplab.com/sapportal",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);
sapgui_open_connection_ex(" /H/Protector/S/3200 /WP",
"",
"con[0]");
sapgui_select_active_connection("con[0]");
sapgui_select_active_session("ses[0]");
/*Before running script, enter password in place of asterisks in logon function*/
sapgui_logon("JUNIOR{UserNumber}",
"ides",
"800",
"EN",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui102",
END_OPTIONAL);
No comments:
Post a Comment