Events of the SAP Calender Control

Use

Using the SAP calendar control events, you can respond to user interactions:

Event

Event ID

cl_gui_calendar=>

Meaning

DATE_SELECTED

M_ID_DATE_SELECTED

A date or date range was selected.

INFO_REQUEST

M_ID_INFO_REQUEST

Scrolling beyond the limits of the date range loaded. If required, new information on the adjacent date range must be loaded (see method set_day_info)

CTXMENU_REQUEST

M_ID_CTXMENU_REQUEST

A context menu was requested.

Note: Not available under SAPGUI for HTML

CTXMENU_SELECTED

M_ID_CTXMENU_SELECTED

An option of the context menu was chosen.

Note: Not available under SAPGUI for HTML

A control-specific context menu appears in the area for displaying the month and the year within the calendar control. If an option of this menu is chosen, event CTXMENU_SELECTED is not triggered.

You get the following event parameters for this event:

Event

Parameter

Meaning

DATE_SELECTED

date_begin

Selected date or beginning of range selected

date_end

End of selected range

INFO_REQUEST

date_begin

Begin of range that is reloaded

date_end

End of date range

CTXMENU_REQUEST

ctxmenu_id

This field specifies where the context menu was requested:

cnca_ctxmenu_navigator_date : Requested on a specific date

cnca_ctxmenu_navigator_day : Requested on a weekday (for example, Monday)

cnca_ctxmenu_navigator_week : Requested on a week (for example, CW 20)

CTXMENU_SELECTED

fcode

Function code of selected context menu

Integration

If you need to respond to these events in your ABAP program, you must register these events. To do this, you use method set_registered_events. Events that you do not register are filtered at the frontend and are not transferred to the backed. See Event Handling.

Activities

Read the documentation on the general process for working with events of the Control Framework.