Skip to content

/AWS1/IF_EMS=>TERMINATESESSION()

About TerminateSession

Terminates the specified session. After you terminate a session, it enters the TERMINATING state and then the TERMINATED state. You can still access the Spark History Server for a terminated session through the GetResourceDashboard operation.

Method Signature

METHODS /AWS1/IF_EMS~TERMINATESESSION
  IMPORTING
    !IV_APPLICATIONID TYPE /AWS1/EMSAPPLICATIONID OPTIONAL
    !IV_SESSIONID TYPE /AWS1/EMSSESSIONID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_emstermsessionrsp
  RAISING
    /AWS1/CX_EMSINTERNALSERVEREX
    /AWS1/CX_EMSRESOURCENOTFOUNDEX
    /AWS1/CX_EMSVALIDATIONEX
    /AWS1/CX_EMSCLIENTEXC
    /AWS1/CX_EMSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_applicationid TYPE /AWS1/EMSAPPLICATIONID /AWS1/EMSAPPLICATIONID

The ID of the application that the session belongs to.

iv_sessionid TYPE /AWS1/EMSSESSIONID /AWS1/EMSSESSIONID

The ID of the session to terminate.

RETURNING

oo_output TYPE REF TO /aws1/cl_emstermsessionrsp /AWS1/CL_EMSTERMSESSIONRSP

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->terminatesession(
  iv_applicationid = |string|
  iv_sessionid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_applicationid = lo_result->get_applicationid( ).
  lv_sessionid = lo_result->get_sessionid( ).
ENDIF.