Share this page

# SAP - Web 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 an 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. For details, see Create a script from a captured traffic file.

In this topic:

## Supported functionality

Functionality supported for SAP - Web Vuser scripts includes:

Functionality | Reference
--- | ---
Data Format Extensions (DFE), using the predefined DFE for SAP: SAPEventQueue. | See Data format extensions (DFEs) overview
Automatic generation of the Recording Report at the end of a recording session. | See Recording Report
Asynchronous communication. | See VuGen support for asynchronous communication
Save the traffic information to a HAR file after script replay. | See Replay Summary pane
Insert JavaScript code snippets into the C code in an SAP - Web Vuser script. | See Using the VuGen JavaScript engine

## Example

The following example shows a typical recording for an SAP Portal client:

    vuser_init()
    {
        web_reg_find("Text=SAP Portals Enterprise Portal 5.0",
            LAST);
        web_set_user("junior{UserNumber}",
            lr_unmask("3ed4cfe457afe04e"),
            "sonata.mylab.com:80");
        web_url("sapportal",
            "URL=http://sonata.mylab.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.mylab.com/hrnp$30001/sonata.mylab.coml:80/Action/26011[header]"
               , ENDITEM,
            "Url=/SAPPortal/IE/Media/sap_mango_polarwind/images/header/logo.gif",
               "Referer=http://sonata.mylab.com/hrnp$30001/sonata.mylab.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.

    web_url("dummy",
            "URL=http://sonata.mylab.com:1000/hrnp$30000/sonata.mylab.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.mylab.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);

## See also

- Web protocols (generic)
- Known web recording issues

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: