It_GetTransaction 

Use

Invokes the specified R/3 transaction.

Using the It_GetTransaction is a shortcut: it is equivalent to performing the following steps:

  1. Setting the value of the okcode member of the IT_EVENT structure to the desired transaction code
  2. Turning on the MES_OKCODE flag of in the eventtype member of the IT_EVENT structure
  3. Sending a return or sending the event structure to the R/3 application server (with It_Send_Event, for example).

Syntax

DWORD DLEX It_GetTransaction(HANDLE hMr, const char *szTransaction);

Parameters

hMr

Connection handle

szTransaction

Pointer to a transaction code, for example SO01

Return Value

Returns TRUE on success, FALSE on error.

Comments

It_GetTransaction is implemented using the Get Event/Send Event mechanism. The following code shows the implementation of the It_GetTransaction inside the GUI Library.

DWORD DLEX It_GetTransaction(HANDLE hMerlin, char *trans) {
char tr[MAX_OK+4];
PIT_EVENT pEvt = 0;
sprintf(tr, "/n%s", trans);
It_GetEvent(hMerlin, &pEvt);
lstrcpy(pEvt->okcode, trans);
pEvt->eventtype |= MES_OKCODE;
return It_SendReturn(hMerlin, &pEvt);
}

 

Example

// Start the outbox transaction
It_GetTransaction(hMerlin, "soo2");

See Also

ItEv_SetOKCode, It_SendReturn.