Show TOC

Function documentationsapevent Locate this document in the navigation structure

 

This event is triggered whenever an event defined on the HTML page with type SAPEVENT is triggered by the user.

Event

Event ID

html_viewer->

Meaning

sapevent

m_id_sapevent

The user clicked an HTML link with type SAPEVENT.

Prerequisites

When you define the HTML page that you want to display, define special HTML events (SAPEVENT). HTML events that are to trigger this control event must have the following format: SAPEVENT:<action>?data.

Using SAPEVENT in the SAPGUI for HTML
  • To ensure that this event is triggered properly in the HTML GUI, you may only code it in one of the following forms:

    • <FORM name=myform action="SAPEVENT:xxx">

    • <A HREF=SAPEVENT:xxx>

    If you code the event in any other way (for example, within a script), it will not be recognized and therefore will not be passed back to the application server.

  • You must also never use SAPEVENT in an OnLoad event, since this causes an endless loop. After an event, the Internet Transaction Server reloads the relevant page (triggering a new OnLoad event). Hence each SAPEVENT would implicitly cause a new OnLoad which, in turn, triggers another SAPEVENT.

Features

The event returns the following parameters:

Parameters

Meaning

action

Action parameter of the SAPEVENT.

frame

Name of the HTML frame in which the event was triggered.

getdata

Data in the event string

postdata

Data table for post data

query_table

Event table in the form 'Name | Value'.

Note Note

HTML events can send data as well as actions. If you use the 'POST' method in the HTML source code, the data is not sent with the event string. Instead, it is sent in a parallel datastream. This data is available in the table postdata. The table query_table is a version of table post_data in pairs of values. The data must have the following format: Param1=Value1&Param2=Value2.

End of the note.

Activities

Read the general process for working with events in the Control Framework.