Showing results for 
Search instead for 
Did you mean: 

calendar modify is creating a new appointment

0 Kudos

Hi experts,

I have a custom program which is creating appointments in SAP and then sending mails to outlook.

After appointment creation in SAP via my program, when I update it and check mails in my outlook, it is faulty.

Same calendar appointment is not getting updated but a new calendar appointment is created with modified details.

Also, in SOST when I check emails, I see UID for appointment is different in both of them. This also clarifies that a new appointment is created after update.

Please help, it is urgent.

Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

I think your program should use the same UID (my best answer ever). I can't tell you more because you didn't provide your code.

0 Kudos

While modifying, it is not my code.

My code is just creating the appointment and sending mail - that's it.

After that when it is modifying the appointment and sending mail - it is all SAP standard.

My code for creation of appointment is:-

*-- create object

    CREATE OBJECT lo_appointment.

*-- Set Organizer

    lo_appointment->set_organizer( sy-uname ).

        swc_create_object lv_address   'ADDRESS'  space.

        swc_set_element   ls_address_container  'AddressString'  ls_temp-txt_partic .

        swc_set_element   ls_address_container  'TypeId'  'U'  .

        swc_call_method   lv_address  'Create'  ls_address_container.

        CHECK  sy-subrc =  0  .

*-- get key and type of object

        swc_get_object_key lv_address ls_partic-objkey.

        swc_get_object_key lv_address ls_email_participant-objkey.

        CHECK   sy-subrc =  0  .

        swc_get_object_type lv_address ls_partic-objtype.

        swc_get_object_type lv_address ls_email_participant-objtype.

        CHECK sy-subrc = 0.

        MOVE sccon_part_sndmail_with_ans TO ls_email_participant-send_mail.

        ls_email_participant-comm_mode = 'INT'.

        lo_appointment->add_participant( participant = ls_email_participant ).


    date_from  = ls_upload-date_from

    time_from = ls_upload-time_from

    date_to = ls_upload-date_to

    time_to = ls_upload-time_to

    timezone = ls_upload-zone_from ).

    lo_appointment->set_type( 'ZAPPT' ).

    lo_appointment->set_text( lt_text ).

    lo_appointment->set_title( ls_upload-txt_short ).

* Important to set this one to space. Otherwise SAP will send a not user-friendly e-mail

    lo_appointment->save( send_invitation = space ).

* Now that we have the appointment, we can send a good one for outlook by switching to BCS

    lo_send_request = lo_appointment->create_send_request( ).

* don't request read/delivery receipts

    lo_send_request->set_status_attributes( i_requested_status = 'N' i_status_mail = 'N' ).

* Send it to the world

    lv_sent_to_all = lo_send_request->send( i_with_error_screen = 'X' ).


Active Contributor
0 Kudos

Sorry for my first answer, in fact I did not understand that the modification was done manually.

I have absolutely no idea what can be wrong.

As SAP do some corrections very rarely, I guess it's something in the customizing (for ZAPPT?), or things we don't see (i.e. possible that 2 identical appointments exist at the same time, only one is visible and you change the one that don't correspond to the one you see in Outlook?).

0 Kudos

Got it.

FM APPT_CREATE_INTERNAL  sends mail inbuilt.

We need not send it explicitly.

Now, working fine. Closing thread.

Answers (0)