It_SendEventEx 

Use

It_SendEventEx is an extended version of the It_SendEvent function.

Similar to the It_SendEvent function, It_SendEventEx allows you to send out the GUI Library's event structure and all of its related structures to the R/3 application server.

In contrast to the It_SendEvent, however, It_SendEventEx allows you to send the contents of the event structure to the SAPGUI Front, instead of to the R/3 application server. You do so by using the flgs parameter of this function.

You can use It_SendEventEX after getting an event from either the R/3 application server or from Front, and after your program or the user has made changes to the data in the event structure or in any of the related structures.

You do not have to get an event before sending an event to Front.

The following illustration shows the flow of the event information when using the GV_GETFRONTEVENT flag of the It_SendEventEx function.

 

Syntax

DWORD DLEX It_SendEventEx(HANDLE hMr, PPIT_EVENT ppEvt, DWORD flgs);

Parameters

hMr

Connection handle

ppEvt

Pointer to a pointer to the IT_EVENT structure. The value of PIT_EVENT should be one that was retrieved from It_GetEvent*. If successful, on return PIT_EVENT will be zeroed out and the buffer freed.

flgs

Flags to control the operation of It_SendEventEx.

Currently the only flgs value is:

SV_SENDTOFRONT

Using this flgs value indicates that the event is should be sent to the SAPGUI Front, instead of to the R/3 application server.

Using It_SendEventEx with flgs set to zero is equivalent to using It_SendEvent, which means that the event is sent to the R/3 application server.

If you are using the It_SendEvent function to send the event to the R/3 application server (by setting flgs to zero), remember to set the relevant bits in eventtype member of IT_EVENT before you send the event to the R/3 application server.

Note that if you are sending the event to Front you do not need to set the evettype bits.

Return Value

Returns TRUE on success, FALSE on error.