CL_APPOINTMENT
Good morning,
after a leave request is approved, we want to make a calendar entry in outlook. We find the class CL_APPOINTMENT. On the whole it works, but we are not able the change the "show as" property. The appointment should appear as absent in the calendar of the leave requester. Every leave request has to be confirmed by a deputy and this one should also have a calendar entry which should be shown as free. The problem is that every calendar entry is shown as busy.
We tried to use the method u201Cset_busy_valueu201D, but there aren't any changes if you forwarded another value to this method.
Perhaps there is a better way to create a calendar entry in outlook. The problem with the class CL_APPOINTMENT is that the appointment has to be confirmed in outlook. Is there an easier way to create an event directly in the calendar?
Kind regards,
Daniel Koch
Hi,
http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/47/5f643a7c5dd813e10000000a114084/content.htm
Go through the above link
It may help you...
Similar Messages
-
How to set organizer mail id in meeting request using CL_APPOINTMENT class
Hi,
I have two questions here.
1. How to set the organizer mail id using the method of CL_APPOINTMENT class? I have used the method SET_ORGANIZER of class CL_APPOINTMENT by passing my SAP user name 'GCM' but when i received the appointment within outlook, i am able see my server mail id like 'Madhu G C <[email protected]>' instead of my outlook mail id '[email protected]'.
2. How to set reoccursive meeting request in Outlook using cl_appoinment?Example: i have a training on alternative days say on 01-mar, 03-Mar, 05-mar. When i book the course, i should get these alternative days in outlook in a single meeting request?
Best Regards,
MadhuPlease post the question in correct forum. This forum is for webdynpro abap.
Regards
Srinivas -
Embedding Image in Appointment
In my requirement, I have to send an appointment with image as attachment, embedded (in display mode).
for creating document, I am using CL_DOCUMENT_BCS class, inside that class i am using
CREATE_FROM_MULTIRELATED method for creating the document. In this method we have to pass below object lo_mime_helper. Before passing it, I am filling it with image and appointment.
For image:
CALL METHOD lo_mime_helper->add_binary_part
EXPORTING
content = i_graphic_table
filename = 'WIPRO.BMP'
extension = 'BMP'
description = 'descriptiongif'
content_type = 'image/bmp'
length = l_len
content_id = 'content_id_1'.
For appointment
lv_sr_title = 'Invitaion for the Meeting'.
clear lt_text.
create document as an ica l object
lt_text = lo_appointment->as_ical_object( ).
CALL FUNCTION 'SO_RAW_INT_TO_RTF'
TABLES
objcont_old = lt_text
objcont_new = lt_text.
data wa_text like line of lt_text.
data text_length type i.
data full_length type i.
loop at lt_text INTO wa_text.
text_length = strlen( wa_text ).
full_length = full_length + text_length.
clear text_length.
CLEAR wa_text.
endloop.
clear l_len.
l_len = full_length.
CALL METHOD lo_mime_helper->add_textual_part
EXPORTING
content = lt_text
filename = 'Appointment Meeting'
extension = 'ICS'
description =
content_type = 'application/rtf'
LENGTH = l_len
content_id = 'content_id_2'
Now I am passing lo_mime_helper to methofd for creating document
TRY.
CALL METHOD cl_document_bcs=>create_from_multirelated
EXPORTING
i_subject = 'my subject'
i_multirel_service = lo_mime_helper
RECEIVING
result = document.
CATCH cx_document_bcs .
MESSAGE e672(so) WITH 'bcs error while creating bcs_doc'.
EXIT.
CATCH cx_bcom_mime .
MESSAGE e672(so) WITH 'mime error while creating bcs_doc'.
EXIT.
ENDTRY.
THis is sending a mail, but both image and appointment are going as attachment, even when I am setting Disposition type as I(Inline) in debugger. I want it to go as appointment with image embedded in body part.
When I am using CL_APPOINTMENT class, its going as appointment perfectly, but how to embedd a image in body part then.Hi try with this code.
Document = cl_document_bcs=>create_document( i_type = u2018RAWu2019 i_text =
text i_length = u201912u2032 i_subject = u2018test created u2018 ).
add attachment to Document
BCS expects Document content here e.g. from Document upload
binary_content = u2026
CALL METHOD Document->add_attachment EXPORTING i_attachment_type = u2018GIFu2019
i_attachment_subject = u2018My attachmentu2019 i_att_content_hex =
binary_content.
add Document to send request
CALL METHOD send_request->set_document( Document ).
DATA: send_request TYPE REF TO cl_bcs.
DATA: text TYPE bcsy_text.
data: binary_content1 type STANDARD table OF TBL1024 WITH HEADER LINE.
data: binary_content type solix_tab.
DATA: Document TYPE REF TO cl_document_bcs.
DATA: sender TYPE REF TO cl_sapuser_bcs.
DATA: recipient TYPE REF TO if_recipient_bcs.
DATA: bcs_exception type ref to cx_bcs.
data: sent_to_all type os_boolean.
send_request = cl_bcs=>create_persistent( ).
sender = cl_sapuser_bcs=>create( sy-uname ).
CALL METHOD send_request->set_sender EXPORTING i_sender = sender.
recipient =
cl_cam_address_bcs=>create_internet_address( u2018 u2018 )
CALL METHOD send_request->add_recipient
EXPORTING i_recipient = recipient
i_express = u2018Xu2019.
CALL METHOD send_request->set_send_immediately( u2018Xu2019 ).
CALL METHOD send_request->send( exporting i_with_error_screen = u2018Xu2019
receiving result = sent_to_all ).
COMMIT WORK.endform.
<begging removed by moderator>
Regards
chitra
Edited by: Thomas Zloch on Nov 15, 2011 1:02 PM -
Embedding image in Description part of Appointment
In my requirement, I have to send an appointment with image as attachment, embedded (in display mode).
for creating document, I am using CL_DOCUMENT_BCS class, inside that class i am using
CREATE_FROM_MULTIRELATED method for creating the document. In this method we have to pass below object lo_mime_helper. Before passing it, I am filling it with image and appointment.
For image:
CALL METHOD lo_mime_helper->add_binary_part
EXPORTING
content = i_graphic_table
filename = 'WIPRO.BMP'
extension = 'BMP'
description = 'descriptiongif'
content_type = 'image/bmp'
length = l_len
content_id = 'content_id_1'.
For appointment
lv_sr_title = 'Invitaion for the Meeting'.
clear lt_text.
create document as an ica l object
lt_text = lo_appointment->as_ical_object( ).
CALL FUNCTION 'SO_RAW_INT_TO_RTF'
TABLES
objcont_old = lt_text
objcont_new = lt_text.
data wa_text like line of lt_text.
data text_length type i.
data full_length type i.
loop at lt_text INTO wa_text.
text_length = strlen( wa_text ).
full_length = full_length + text_length.
clear text_length.
CLEAR wa_text.
endloop.
clear l_len.
l_len = full_length.
CALL METHOD lo_mime_helper->add_textual_part
EXPORTING
content = lt_text
filename = 'Appointment Meeting'
extension = 'ICS'
description =
content_type = 'application/rtf'
LENGTH = l_len
content_id = 'content_id_2'
Now I am passing lo_mime_helper to methofd for creating document
TRY.
CALL METHOD cl_document_bcs=>create_from_multirelated
EXPORTING
i_subject = 'my subject'
i_multirel_service = lo_mime_helper
RECEIVING
result = document.
CATCH cx_document_bcs .
MESSAGE e672(so) WITH 'bcs error while creating bcs_doc'.
EXIT.
CATCH cx_bcom_mime .
MESSAGE e672(so) WITH 'mime error while creating bcs_doc'.
EXIT.
ENDTRY.
THis is sending a mail, but both image and appointment are going as attachment, even when I am setting Disposition type as I(Inline) in debugger. I want it to go as appointment with image embedded in body part.
When I am using CL_APPOINTMENT class, its going as appointment perfectly, but how to embedd a image in body part then.
Moderator message : Cross-posting not allowed, duplicate thread locked.
Edited by: Vinod Kumar on Oct 10, 2011 1:35 PMHi try with this code.
Document = cl_document_bcs=>create_document( i_type = u2018RAWu2019 i_text =
text i_length = u201912u2032 i_subject = u2018test created u2018 ).
add attachment to Document
BCS expects Document content here e.g. from Document upload
binary_content = u2026
CALL METHOD Document->add_attachment EXPORTING i_attachment_type = u2018GIFu2019
i_attachment_subject = u2018My attachmentu2019 i_att_content_hex =
binary_content.
add Document to send request
CALL METHOD send_request->set_document( Document ).
DATA: send_request TYPE REF TO cl_bcs.
DATA: text TYPE bcsy_text.
data: binary_content1 type STANDARD table OF TBL1024 WITH HEADER LINE.
data: binary_content type solix_tab.
DATA: Document TYPE REF TO cl_document_bcs.
DATA: sender TYPE REF TO cl_sapuser_bcs.
DATA: recipient TYPE REF TO if_recipient_bcs.
DATA: bcs_exception type ref to cx_bcs.
data: sent_to_all type os_boolean.
send_request = cl_bcs=>create_persistent( ).
sender = cl_sapuser_bcs=>create( sy-uname ).
CALL METHOD send_request->set_sender EXPORTING i_sender = sender.
recipient =
cl_cam_address_bcs=>create_internet_address( u2018 u2018 )
CALL METHOD send_request->add_recipient
EXPORTING i_recipient = recipient
i_express = u2018Xu2019.
CALL METHOD send_request->set_send_immediately( u2018Xu2019 ).
CALL METHOD send_request->send( exporting i_with_error_screen = u2018Xu2019
receiving result = sent_to_all ).
COMMIT WORK.endform.
<begging removed by moderator>
Regards
chitra
Edited by: Thomas Zloch on Nov 15, 2011 1:02 PM -
Attach link to image in signature of email?
Would it be possible to attach a link to an image like a logo in a signature in the email I send to people?
I'd like people to be able to click on an image (e.g. a painting, etc.) of mine and go to my website.
I design websites and know how easy it is to do this on web pages, but in an email I don't know how.
I'm thinking the email would probably have to be sent in html format and then the recipient would have to have their email client set to receive emails in html format.
Any ideas?Hi,
I'm surprised when you say "fix the image in the appointment", but may I'm too much nitpicking: you should "create the appointment envelop, then get the empty BCS instance, and fix the image into the BCS instance". I explain below.
But, before trying to send an appointment, did you try to send a simple mail with image? (following the indications (i.e. copying exactly the example code!) in the thread I was mentioning above)
Then, if it's okay, as I said first, you have to create a CL_APPOINTMENT instance, then call the instance method CREATE_FROM_REQUEST which returns a new empty CL_BCS_REQUEST instance, then you have to complete it with the image in the body.
Sandra -
Sending a Mail with an appointment attachment via ABAP
Hi all,
I am currently trying to send an Outlook appointment as a .VCS file with
SO_NEW_DOCUMENT_ATT_SEND_API1 by filling the CONTENTS_BIN parameter with the vcs-file contents.
The email gets sent but in Outlook there is some weird attachment with no name and Outlook thinks it
is in .msg format when I do "Save as...". The contents look weird too: every single letter is
followed by a space and the line-feeds are not like i specified them in the code.
Here's the code I'm using, any help would be greatly appreciated!
Thanks in advance
Marcus
(The code may look a bit chaotic as I'm trying to change things all the time, hope its useful though)
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN TYPE TABLE OF SOLISTI1, " OCCURS 10 WITH HEADER LINE.
ls_OBJBIN LIKE LINE OF OBJBIN.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
RECLIST-RECEIVER = '...'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
DATA: lv_uuid LIKE SYSUUID-C.
CALL FUNCTION 'SYSTEM_UUID_C_CREATE'
IMPORTING
UUID = lv_uuid
WRITE: 'BEGIN:VCALENDAR' , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN', cl_abap_char_utilities=>cr_lf
TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'BEGIN:VEVENT' , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'DTSTART:20090430T183000Z' , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'DTEND:20090430T190000Z' , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'LOCATION;ENCODING=QUOTED-PRINTABLE:Test' , cl_abap_char_utilities=>cr_lf TO
ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'UID:040000008200E00074C5B7101A82E0080000000070011ADA9FD6C70100000000000
00000100' , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: ' 00000', lv_uuid , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'DESCRIPTION;ENCODING=QUOTED-PRINTABLE:=09Marcus Testappointment. =0D=0A' ,
cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APP
END ls_OBJBIN TO OBJBIN.
WRITE: 'SUMMARY;ENCODING=QUOTED-PRINTABLE:Test-Appointment' ,
cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'PRIORITY:3' , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'END:VEVENT' , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
WRITE: 'END:VCALENDAR' , cl_abap_char_utilities=>cr_lf TO ls_OBJBIN-LINE.
APPEND ls_OBJBIN TO OBJBIN.
OBJTXT = 'Testcontent for email body'.
APPEND OBJTXT.
DOC_CHNG-OBJ_NAME = 'TEST'. " seems to have no effect
DOC_CHNG-OBJ_DESCR = 'TEST'.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
" Mail-Body
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-TRANSF_BIN = SPACE.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
"OBJPACK-DOC_TYPE = 'BIN'.
APPEND OBJPACK.
" Now the VCS-file
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = 13 * 255.
OBJPACK-DOC_TYPE = 'VCS'.
OBJPACK-OBJ_NAME = 'test'.
OBJPACK-OBJ_DESCR = 'test'.
APPEND OBJPACK.
OBJHEAD-LINE = 'test.vcs'.
APPEND OBJHEAD.
OBJHEAD-LINE = 'test2.vcs'. " Just to see if it does anything at all
APPEND OBJHEAD.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
Edited by: Marcus Müller on May 14, 2009 1:55 PM
Edited by: Marcus Müller on May 14, 2009 1:57 PMHi Martin, <br />
<br />
sure thing! Here it is:<br />
<br />
<br />
* CL_APPOINTMENT<br />
INCLUDE cntn01." SAP Forums don't take the "<" ">". Surround the cntn01 with them<br />
TYPE-pools: SCCON.<br />
DATA: appointment TYPE REF TO cl_appointment,<br />
participant TYPE scspart,<br />
address TYPE swc_object,<br />
address_container LIKE swcont OCCURS 0 WITH HEADER LINE,<br />
TEXT TYPE SO_TXTTAB,<br />
ls_TEXT LIKE LINE OF TEXT,<br />
"TITLE LIKE scsappt-txt_short,<br />
location LIKE scsappt-room,<br />
rule TYPE REF TO cl_appointment_rule.<br />
<br />
* CL_BCS<br />
DATA: send_request TYPE REF TO CL_BCS,<br />
recipient TYPE REF TO if_recipient_bcs,<br />
recipient_mail TYPE ADR6-SMTP_ADDR,<br />
sender TYPE REF TO cl_sapuser_bcs,<br />
sent_to_all TYPE os_boolean,<br />
document TYPE REF TO CL_DOCUMENT_BCS,<br />
mail_subject TYPE SO_OBJ_DES.<br />
<br />
CLEAR participant.<br />
swc_create_object address 'ADDRESS' space.<br />
swc_set_element address_container 'AddressString' 'receiver AT mail.com'.<br />
swc_set_element address_container 'TypeId' 'U'.<br />
swc_set_element address_container 'NoAdradmi' 'X'.<br />
swc_set_element address_container 'NoIntern' 'X'.<br />
swc_call_method address 'Create' address_container.<br />
CHECK sy-subrc = 0.<br />
* * get key and type of object<br />
swc_get_object_key address participant-objkey.<br />
CHECK sy-subrc = 0.<br />
swc_get_object_type address participant-objtype.<br />
CHECK sy-subrc = 0.<br />
MOVE sccon_part_sndmail_with_ans TO participant-send_mail.<br />
participant-COMM_MODE = 'INT'.<br />
appointment->add_participant( participant = participant ).<br />
<br />
* set apointment on top of day entries as an all day event<br />
appointment->set_view_attributes(<br />
SHOW_LOCAL = 'X'<br />
SHOW_ON_TOP = 'X'<br />
).<br />
<br />
appointment->set_busy_value( sccon_busy_busy ).<br />
<br />
appointment->SET_LOCATION_STRING( 'Office' ).<br />
appointment->SET_ORGANIZER( SY-UNAME ).<br />
appointment->set_text( 'How much wood would a woodchuck chuck if a woodchuck could chuck wood?' ).<br />
<br />
* Important to set this one to space. Otherwise SAP will send a not user-friendly e-mail <br />
appointment->save( SEND_INVITATION = SPACE ).<br />
<br />
* Now that we have the appointment, we can send a good one for outlook by switching to BCS<br />
send_request = appointment->CREATE_SEND_REQUEST( ).<br />
recipient_mail = 'receiver AT mail.com'.<br />
recipient = cl_cam_address_bcs=>create_internet_address( recipient_mail ).<br />
send_request->add_recipient( i_recipient = recipient i_express = 'X').<br />
sender = cl_sapuser_bcs=>create( sy-uname ).<br />
send_request->set_sender( i_sender = sender ).<br />
<br />
* Change the mail subject<br />
document ?= send_request->document( ).<br />
mail_subject = 'My custom subject'.<br />
document->SET_SUBJECT( mail_subject ).<br />
<br />
* Send it to the world \o/<br />
sent_to_all = send_request->send( i_with_error_screen = 'X' ).<br />
<br />
COMMIT WORK AND WAIT.<br />
<br />
<br />
When you finally got it working it seems so simple ;)<br />
<br />
Best regards from Germany<br />
Marcus -
Reschedule an outlook meeting in SAP ABAP
Hi experts,
I have written a program to send meeting request from sap to outlook, but now my requirement is to reschedule the same meeting request which i have sent, for ex: suppose i have send a meeting request before dated on 27th jun 2014 and time: 4:30pm and now i want to reschedule the same meeting at 6:30pm.
Please tell me how can i do it ?? or give me any piece of code which i can use.
Regards,
AayushI send you the code of a function module ZVC_NOTIFY_APPOINTMENT that changes an appointment. Function receives the iCalendar method in parameter I_METHOD (in your case, REQUEST).
Obviously, as you know, the code may not suit 100% to your specific needs because the exact business scenario may require more or less functionality.
Hope it helps.
FUNCTION zvc_notify_appointment.
*"*"Módulo funciones actualiz.
*"*"Interfase local
*" IMPORTING
*" VALUE(I_CONTACT_DATA) TYPE VBKA
*" VALUE(I_SEQNR) TYPE SC_SEQNR OPTIONAL
*" VALUE(I_METHOD) TYPE CHAR20
INCLUDE <cntn01>.
TYPE-POOLS: sccon.
DATA lo_appointment TYPE REF TO cl_appointment.
DATA lt_text TYPE so_txttab.
DATA ls_text LIKE LINE OF lt_text.
DATA: lv_message TYPE bcsy_text,
lv_send_result TYPE c,
lo_receiver TYPE REF TO if_recipient_bcs,
lo_email TYPE REF TO cl_bcs, lt_attachment TYPE soli_tab,
lo_document TYPE REF TO cl_document_bcs, lx_exception TYPE REF TO cx_bcs.
DATA: lwa_contacto TYPE scgenappt,
l_inter TYPE kunnr,
l_intertxt TYPE name1_gp,
lit_txtbody TYPE so_txttab.
DATA: lit_lines TYPE TABLE OF tline,
lwa_lines TYPE tline.
DATA:l_id LIKE thead-tdid,
l_name LIKE thead-tdname,
l_object LIKE thead-tdobject.
DATA l_stamp TYPE string.
DATA l_sequence(4) TYPE c.
DATA ls_appt_data TYPE scsappt.
" DATA:wa_email LIKE t_email.
DATA: lv_row TYPE so_text255,
lv_cnt_nn TYPE n LENGTH 2,
lv_blank_tt TYPE c LENGTH 2 VALUE '',
lv_date_from TYPE sc_datefro,
lv_time_from TYPE sc_timefro, lv_date_to TYPE sc_dateto,
lv_time_to TYPE sc_timefro.
DATA:l_subject TYPE sood-objdes,
l_auxinter(10),
l_auxclase(20),
l_idcontac(4).
DATA lv_appt_guid_str TYPE string.
DATA lv_appt_guid TYPE sc_appguid.
" Register date
DATA l_reg_date TYPE datum.
DATA l_pernr TYPE pernr_d.
DATA: l_uname LIKE pa0105-usrid,
l_uname12 LIKE pa0105-uname.
DATA l_email TYPE text40.
DATA l_appt_id TYPE sc_genappt.
DATA l_exit_info TYPE sc_exitinf.
DATA lv_org_mail TYPE adr6-smtp_addr.
DATA:lo_sender TYPE REF TO if_sender_bcs.
CONSTANTS: c_parvw TYPE parvw VALUE 'ZM',
c_posnr TYPE posnr VALUE '000000'.
CLEAR lv_message.
" Get appointment data from DDBB
l_exit_info = i_contact_data-vbeln.
SELECT SINGLE genappt_id
FROM scgenappt
INTO l_appt_id
WHERE exit_info EQ l_exit_info.
CHECK sy-subrc EQ 0.
CREATE OBJECT lo_appointment
EXPORTING
internal_id = l_appt_id.
CALL METHOD lo_appointment->get_guid
RECEIVING
guid = lv_appt_guid.
* CALL METHOD lo_appointment->get_date
* IMPORTING
* date_from = lv_date_from
* time_from = lv_time_from
* date_to = lv_date_to
* time_to = lv_time_to.
" Only send notification if appointment date
" is not before creation / modification date.
lo_appointment->get_data( IMPORTING appointment_data = ls_appt_data ).
* IF ls_appt_data-change_dat IS NOT INITIAL.
* l_reg_date = ls_appt_data-change_dat.
* ELSE.
* l_reg_date = ls_appt_data-entry_dat.
* ENDIF.
* CHECK l_reg_date LE lv_date_from.
* lv_appt_guid_str = lv_appt_guid.
TRY.
lv_row = 'BEGIN:VCALENDAR'.
lv_cnt_nn = STRLEN( lv_row ).
CONCATENATE '0' lv_cnt_nn lv_blank_tt lv_row INTO lv_row RESPECTING BLANKS.
APPEND lv_row TO lt_attachment.
CLEAR lv_row.
lv_row = 'VERSION:2.0'.
lv_cnt_nn = STRLEN( lv_row ).
CONCATENATE '0' lv_cnt_nn lv_blank_tt lv_row INTO lv_row RESPECTING BLANKS.
APPEND lv_row TO lt_attachment.
CLEAR lv_row.
CONCATENATE 'METHOD:' i_method INTO lv_row.
lv_cnt_nn = STRLEN( lv_row ).
CONCATENATE '0' lv_cnt_nn lv_blank_tt lv_row INTO lv_row RESPECTING BLANKS.
APPEND lv_row TO lt_attachment.
lv_row = 'BEGIN:VEVENT'.
lv_cnt_nn = STRLEN( lv_row ).
CONCATENATE '0' lv_cnt_nn lv_blank_tt lv_row INTO lv_row RESPECTING BLANKS.
APPEND lv_row TO lt_attachment.
CLEAR lv_row.
lv_row = 'UID:'.
CONCATENATE lv_row l_appt_id INTO lv_row.
lv_cnt_nn = STRLEN( lv_row ).
CONCATENATE '0' lv_cnt_nn lv_blank_tt lv_row INTO lv_row RESPECTING BLANKS.
APPEND lv_row TO lt_attachment.
IF i_seqnr IS NOT INITIAL.
l_sequence = i_seqnr.
ELSE.
l_sequence = ls_appt_data-sequence.
ENDIF.
CLEAR lv_row.
CONCATENATE 'SEQUENCE:' l_sequence INTO lv_row.
CONDENSE lv_row NO-GAPS.
lv_cnt_nn = STRLEN( lv_row ).
CONCATENATE '0' lv_cnt_nn lv_blank_tt lv_row INTO lv_row RESPECTING BLANKS.
APPEND lv_row TO lt_attachment.
CLEAR:lv_row.
" Build timestamp with current time
CLEAR l_stamp.
CONCATENATE 'DTSTAMP:' sy-datum(4) sy-datum+4(2) sy-datum+6(2) 'T' sy-uzeit 'Z' INTO l_stamp.
lv_row = l_stamp -
Multiple days training not updated correctly in the Outlook calendar
Hi Friends,
We have a requirement to integrate training event booking data with the Outlook Calendar. We have achieved it by sending an appointment to outlook by using a standard class CL_APPOINTMENT. All the details are getting updated as needed.
If the training is for a single day then the appointment/invite sent from SAP to Outlook updates the Outlook calendar correctly with the date, time and other details. But if the training consists of several different days, it creates one long calendar reservation instead of one for each planned training day.
For example if the training days are on 15.09.2014, 16.09.2014, 13.10.2014, 14.10.2014 and 28.10.2014, then the outlook calendar reservation is done right from 15.09.2014 to 28.10.2014. instead of only the planned training days (15.09.2014, 16.09.2014, 13.10.2014, 14.10.2014 and 28.10.2014).
So the calendar needs to be updated for that particular day with the particular time.
Please share your expertise if anyone has faced such an issue.
Thanks in advance.
Regards,
VishClosing the thread. Custom solution provided.
Maybe you are looking for
-
How to insert code in ABAP program ( Z program) by ABAP coding.
Hello, In ABAP is there any way to insert some code lines into an existing ABAP program (Z*) , We will insert in masse some code lines into a liste of program automatically ? Thanks in advance
-
is there a tool that will generate Meta Tag data in existing PDF files? I do know how to do it manually but literally have a bunch of pdf files to edit and a tool that what would at least get me close would be a big help. If you are wondering "why bo
-
Setting browser.cache.check_doc_frequency = 0 doesn't work
Setting the value of property browser.cache.check_doc_frequency to 0 has no effect. After restarting my browser all items still coming from the local cache. btw. if I set the value to 1, it works as described [http://kb.mozillazine.org/Browser.cache.
-
When I use my rear facing camera, a line appears atop the top of the screen....and help?
-
No GL found in account determination type KOFI
Hello Gurus- I have an issue where an invoice and a credit memo is not posting to FI. I have this error found under the document however I am unclear what the issue is and how to resolve it. I appreciate your help!