SET Methods
Definition
Method that you can use to add data for an appointment.
Use
The SET methods are listed with a description of each one.
SET_APPLICATION_DATA
Method that you can use to set your application-specific data that is not directly related to the actual appointment.
Import Parameters
-
APPLICATION_DATA
Information (60 characters) that is not interpreted by address management. Originally intended for storing other application information for the exit function. It can, however, also be used for other purposes.
-
APPLICATION_GUID
GUID, which refers to your object, that is to be assigned by the application. Using the method SELECT_BY_APPLICATION_GUID, you can instantiate all appointments that have the same GUID assigned by the application.
SET_BUSY_VALUE
Specifies whether the appointment reserves a time period or not. This value is used in the free/busy analysis (search for free times).
Import Parameters
-
BUSY_VALUE
Three different values are possible:
-
0: Time period is not reserved.
-
1: Time period is reserved for the time being ("tentative").
-
2: Time period is reserved.
-
SET_CLASSIFICATION
Specifies the access classification that the appointment has. Depending on this classification, you can then assign access authorizations in the individual appointment calendars.
Import Parameters
-
CLASSIFICATION
Three different values are possible:
-
1: Public appointment
-
2: Private appointment
-
3: Secret appointment
-
SET_DATE
Sets the time period in which the appointment is to take place. Specify the date and time, referring to the relevant time zone. The time stamps (in UTC time) are calculated from this.
This method is an alternative to the method SET_TIME_STAMPS, which is described below.
In most cases, you should specify the time zone to which the time refers. This is usually the time zone of the place where the appointment takes place. Even appointments that take place at the same time in several locations (for example, video conferences or online meetings) require a time zone so that the appointment calendar has a basis on which to assign the appointment for the individual participants.
If no time zone is specified, this method determines the time zone from the user settings in the SAP user master. If no time zone is maintained in the user settings, the time zone UTC is used.
It is rare that appointments are maintained without time zones. In such a case, no time stamp can be calculated because the appointment is floating, that is, the time stamp changes according to the location of the participant.
It is possible to define such appointments with this class. You should, however, only do this in exceptional cases.
Import Parameters
-
DATE_FROM
Date on which the appointment starts in the specified time zone.
-
TIME_FROM
Time at which the appointment starts in the specified time zone.
-
DATE_TO
Date on which the appointment ends in the specified time zone. If no entry is made, the start date is used.
-
TIME_TO
Time at which the appointment ends in the specified time zone. If no entry is made, the start time is used.
-
TIMEZONE
Time zone for the above parameters. This is usually the same time zone as the place where the appointment takes place. If no entry is made, the time zone is read from the user settings in the user master.
SET_LOCATION
Sets the place or the room where the appointment takes place.
Import Parameters
-
LOCATION
Place where the appointment takes place.
SET_PARTICIPANTS_STATUS
Sets the status of a participant of an appointment. You cannot use this method for distribution lists.
Import Parameters
-
PARTICIPANT
Identifies the participant for whom you are setting the status.
The following fields from the participant structure are important:
-
PARTICIPANT: If the participant is an SAP user, their SAP logon name. If the participant is a business object, this field is empty.
-
OBJTYPE: If the participant is a business object, its type.
-
OBJKEY: If the participant is a business object, its key.
-
-
STATUS
Status that you want to set for the participant.
The following values are permitted:
-
1: The participant has accepted the appointment.
-
2: The participant has tentatively accepted the appointment.
-
3: The participant has declined the appointment.
-
4: The participant has not yet responded.
-
Exceptions
-
WRONG_PARTICIPANT
The specified participant does not exist in the current appointment.
SET_PRIORITY
Sets the priority of an appointment.
Import Parameters
-
PRIORITY
Three different values are possible:
-
1: Very high priority
-
2: Medium priority (default)
-
3: Low priority
-
SET_RELATED_OBJECTS
When creating an appointment, you can link it to your business object. This method sets the application objects that are to be linked with the appointment.
This method is only permitted for new appointments, that is, before you have called the SAVE method for the first time. The link is created when the appointment is saved to the database. Once the link has been created, the list of the linked objects cannot be changed. This list can only be changed if you delete and recreate the appointment.
Import Parameters
-
RELATED_OBJECTS
Table of business objects.
Exceptions
-
RELATION_NOT_POSSIBLE
The link cannot be created because the appointment already exists on the database.
SET_RULE
Sets the rule that specifies how often and in which intervals an appointment is to be repeated. The appointment then becomes a periodic appointment.
A rule is an instance of the class CL_APPOINTMENT_RULE. You normally instantiate it either by its ID (if this is known) or using the EDIT method of the rule class in dialog.
For more information, see the class description of the rules.
Import Parameters
-
RULE
Period rule with which the appointment is to be created.
Exceptions
-
RULE_NO_TIME_FRAME
The rule has no time frame for the period (that is, the earliest possible first appointment and the latest possible last appointment).
You can set this time frame using the SET_TIME_FRAME method of the rule class.
SET_STATUS
Sets the status of an appointment. Note that this is a different status to the status of the individual participants of the appointment.
Import Parameters
-
STATUS
Three different values are possible:
-
1: Confirmed
-
2: Planned
-
3: Canceled
-
SET_TEXT
Sets the appointment description.
Export Parameters
-
TEXT
Appointment description in ASCII format (line break by explicit CRLF). Texts in internal table format (that is, a line of the internet table corresponds to a line in the text) can be converted using the function module SO_RAW_TO_RTF into ASCII format.
SET_TEXT_AUTHORITY
The appointment organizer can permit all other participants of the appointment to change the appointment description, for example, to determine the agenda for the appointment. This method sets this authorization.
The authorization check is only carried out in the appointment calendars of the participants. The appointment description can, however, always be changed from this class interface.
Import Parameters
-
AUTHORITY
Authorization to change the appointment description. The following two values are possible:
-
1: All participants can change the description.
-
2: Only the organizer can change the description.
-
SET_TIME_STAMPS
Sets the time period in which the appointment is to take place. This method is an alternative to the SET_DATE method described above. The time stamps of the appointment, that is, the time period in UTC, can be specified here. The actual time and date are then calculated automatically. A time zone is required for this purpose. If no time zone is specified, the time zone of the current user is determined from their SAP user master. If no time zone is maintained there, the time zone UTC is used.
Import Parameters
-
TIME_STAMP_FROM
Time stamp of the start of the appointment.
-
TIME_STAMP_TO
Time stamp of the end of the appointment. If no time stamp is specified, the appointment start time is used.
-
TIMEZONE
Time zone for the above parameters. This is usually the same time zone as the place where the appointment takes place.
If no time zone is specified, the time zone of the user currently logged on is read from their SAP user master.
SET_TITLE
Sets the title of an appointment.
Import Parameters
-
TITLE
Appointment title.
SET_TYPE
Sets the appointment type of an appointment. The appointment type is important, particularly for the exit function for the application to which this appointment (and this appointment type) belongs. For more information, see the description of the exit function.
Import Parameters
-
TYPE
Appointment type. This has to be maintained in the table SCAPPTTYPE. If no appointment type is specified, the default appointment type No appointment type specified is set.
SET_VIEW_ATTRIBUTES
Sets attributes for displaying the appointment in the appointment calendar. These attributes do not influence the appointment itself.
Export Parameters
-
SHOW_LOCAL
Irrespective of the time zone in which the appointment calendar is currently displayed, the appointment is always displayed at the time that was specified in the appointment. For more information, see the application documentation for the appointment calendar.
-
SHOW_ON_TOP
The appointment is always to be displayed at the top in the calendar, irrespective of the times. Such an appointment is also referred to as an all-day appointment, although the appointment has times. For more information, see the application documentation for the appointment calendar.