This section describes the specific functions of the SAP calendar control.
The process described in this section represents only a control-specific enhancement of thegeneral control integration process and cannot be used separately.
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 programsSAPCALENDAR_DEMO1 and SAPCALENDAR_NAVIGATOR in the system.
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
Requesting a context menu with the right mouse button
Choosing an option of the context menu
Selecting a date / date range
Scrolling beyond the area that was defined using methodset_day_info
Destroying the controls
Controls are normally destroyed byLifetime Management. However, if you want to destroy the controls manually in your program, you must proceed as follows:
CALL METHOD calendar->free.