!--a11y-->
You can use this method to instantiate an SAP calendar control.
CREATE OBJECT calendar
EXPORTING parent = parent
view_style = view_style
dtpicker_format = dtpicker_format
selection_style = selection_style
display_months = display_months
focus_date = focus_date
stand_alone = stand_alone
week_begin_day = week_begin_day
lifetime = lifetime
shellstyle = shellstyle
year_begin = year_begin
year_end = year_end
week_end = week_end
EXCEPTIONS cntl_error = 1
cntl_install_error = 2.
Parameter |
Meaning |
parent |
Container in which the SAP calendar control can be displayed ( see
SAP Container) |
view_style |
Appearance of the control (see also SAP Calendar Control)cnca_style_dtpicker : Date input fieldcnca_style_v_navigator : Vertical calendar displaycnca_style_h_navigator : Horizontal calendar displaycnca_style_popup_navigator : Calendar in popup formcnca_style_alignment_left : Alignment of the controlcnca_style_alignment_fit : Fit the calendar display to the size of its container controlcnca_style_no_week_nr : Calendar without week numberscnca_style_weekend_highlight : Displays weekend dates in a different colorYou can combine these properties by adding the constants. Note: cnca_style_dtpicker and cnca_style_popup_navigator are not available under SAPGUI for HTML. |
dtpicker_format |
Display format of the date in the output field ( view_style = cnca_style_dtpicker ). You can make (and combine) the following specifications:'d' : One- or two-digit date'dd' : Two-digit date'ddd' : Three-character abbreviation of weekday'dddd' : Name of weekday'MM' : Two-digit month number'MMM' : Three-character abbreviation of month name'MMMM' : Full month name'y' : One-digit year display (for example, 9 for 1999)'yy' : Two-digit year display'yyy' : Full year display |
selection_style |
Selection options in the calendar. You can make (and combine) the following specifications: cnca_sel_day : Selection of a single daycnca_sel_week : Selection of a full weekcnca_sel_month : Selection of a full monthcnca_sel_interval : Selection of a range |
display_months |
Reserved parameter. Not yet implemented |
focus_date |
Day on which the focus is to be set initially in the input field |
stand_alone |
'X' : If the calendar is scrolled beyond the date range loaded, event INFO_REQUEST is not triggered.' ' : If the calendar is scrolled beyond the date range loaded, event INFO_REQUEST is triggered. |
week_begin_day |
Weekday with which the calendar display starts: '1' : Monday'2' : Tuesday'3' : Wednesdayetc. |
lifetime |
Parameter for
Lifetime Management. The following values are possible:
calendar->lifetime_imode : The control is active as long as the internal mode is not destroyed (for example: leave program. leave transaction. set screen 0, leave screen. ). Afterwards, method finalize is called.calendar->lifetime_dynpro : The control is active as long as the screen instance exists, that is, is included in the screen stack. Afterwards, method free is called.Usage of this mode automatically controls the visibility of controls. Controls appear only if the screen on which they were generated is active. If another screen is active, the controls are automatically set to invisible. calendar->lifetime_default : If the control is integrated into a container, it adopts the lifetime of that container. If the control is not integrated into a container (for example, if it is a container itself), its lifetime is set to calendar->lifetime_imode . |
shellstyle |
Influencing control appearance and behavior You can pass all constants from ABAP include <CTLDEF> that start with WS. You can combine several styles by adding the constants. If you use the default, a sufficient combination of style constants is set internally. |
year_begin |
First year: Specifies the first year that can be displayed in the calendar |
year_end |
Last year: Specifies the last year that can be displayed in the calendar |
week_end |
Definition of those weekdays that are to be weekends. For example: '67' for Saturday and Sunday |
