!--a11y-->
Working With the SAP Calendar Control 
This section describes the specific functions of the SAP calendar control.
Prerequisites
The process described in this section represents only a control-specific enhancement of the
general control integration process and cannot be used separately.Process flow

The source code sections are examples that do not always use the full range of functions available. For more information, always see the reference part of this documentation.
You can find sample programs
SAPCALENDAR_DEMO1 and SAPCALENDAR_NAVIGATOR in the system.Instantiating
DATA calendar TYPE REF TO cl_gui_calendar.
Create an instance of the SAP toolbar control:CREATE OBJECT calendar
EXPORTING parent = container
view_style = view_style.
CALL METHOD calendar->go_to_date
EXPORTING focus_date = sy-datum.
Registering the events
Event name |
Meaning |
CTXMENU_REQUEST |
Requesting a context menu with the right mouse button |
CTXMENU_SELECTED |
Choosing an option of the context menu |
DATE_SELECTED |
Selecting a date / date range |
INFO_REQUEST |
Scrolling beyond the area that was defined using method set_day_info |
Destroying the controls
Controls are normally destroyed by
Lifetime Management. However, if you want to destroy the controls manually in your program, you must proceed as follows: CALL METHOD calendar->free.
FREE calendar.
