cancel
Showing results for 
Search instead for 
Did you mean: 

Outlook Calendar not sync for the sender or organizer

Former Member
0 Kudos


Hello Experts,

Greetings!!

We have a requirement to send a appointment invitees to all attendes from SAP CRM .

With the help of SDN blogs I am able to send the invite to all the inviteees. But the calendar for the organizer/sender is not getting sync.

Please note that the Groupware is not enabled.

As per my understanding, since the Organizar/sender won't have the facility to accept the meeting invite(since he/she is the creator) the calendar won't get updated.

Please let us know if there is a way around to update the outlook calendar of the organizer/Sender.

Thanks,

Mahesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Hasan,

I have written my code in ORDER_SAVE BADI. I fetched all the required data using crmd_order_read and then I call a report using Submit statement.

In this call report I have populated all the required data using Class CL_APPOINTMENT and a mail is then triggered using Class CL_BCS.

The mail to all attendees is a success. All attendes can accept the invite and their calendar is also getting updated.

Problem occurs with the Organizer/creator of appointment on SAP CRM. For him/her the calendar is not getting updated.

Thanks.

former_member186543
Active Contributor
0 Kudos

Ok so it's a custom solution !

Did you check under SOST if the mail is going to the organizer or not ?

Former Member
0 Kudos

Yes, the mail is going to the organizer..

But since he is the only creator i think system/outlook is not allowing to update the calendar..

please suggest.. I am in great need to sort this issue

former_member186543
Active Contributor
0 Kudos

Hmm , then it could be something related to the Outlook settings, preventing the meeting to be available in his outlook calendar.

May be you can try to add the organizer as an attendee too and check if that helps !

/Hasan

Former Member
0 Kudos

I have tried this too. But no luck:(

Is it possible for you to test the same case?

Thanks.

Mahesh

Former Member
0 Kudos

hello All,

Now I can send an email to the sender by keeping the Organizer Id as a dummy, the sender now can recieve the invite and he/she can also accept the invitation.

I have now the new issue.

The text line is not coming in multiple lines though I am passing the values to internal table in multiple lines in SAP.

'In the Outlook the multiple lines are condensing into a single line.

Can you please suggest.

Former Member
0 Kudos

hello All,

Any suggestions..

I will paste my code..

LO_APPOINTMENT->SET_TEXT( LT_TEXT ).

LS_TITLE = SO_DESC-LOW.

LO_APPOINTMENT->SET_TITLE( LS_TITLE ).

LO_APPOINTMENT->SAVE( SEND_INVITATION = SPACE ).

LO_SEND_REQUEST = LO_APPOINTMENT->CREATE_SEND_REQUEST( ).

LO_SEND_REQUEST->SET_STATUS_ATTRIBUTES( I_REQUESTED_STATUS = 'N' I_STATUS_MAIL = 'N' ).

LV_SENT_TO_ALL = LO_SEND_REQUEST->SEND( I_WITH_ERROR_SCREEN = 'X' ).

COMMIT WORK AND WAIT.

In LT_TEXT i have required entries.

Thanks,

Mahesh

Former Member
0 Kudos

Hi Mahesh,

You can use  CL_ABAP_CHAR_UTILITIES=>NEWLINE at the end of your lines to indicate new line character.

The result:

Regards,

Renzo.

Former Member
0 Kudos

Hi Renzo,

Thanks for your response!!!  I have added the newline + line feed to get the desired result.

Actually I compared the HEX Value in debug and found. But your response is also valuable.

Another problem is the Font is coming a bit different . Can I change the font as well?

Code::

class cl_abap_char_utilities definition load.

constants: c_tab type c value cl_abap_char_utilities=>NEWLINE.

constants: c_tab1 type c value cl_abap_char_utilities=>CR_LF.

concatenate ls_text-line c_tab1 c_tab into ls_text-line.

Thanks,

Mahesh

Former Member
0 Kudos

Please provide feedback on the above response..

Thanks,

Mahesh

Former Member
0 Kudos

Hi Renzo,

I have test about line break,but only the first line was displayed, could you give me the detail program screenshot?

Thanks,

Kenny

Former Member
0 Kudos

Hello Kenny,

Of course.

FUNCTION ZMD_SYNC_ACTIVITY.

*"----------------------------------------------------------------------

*"*"Interfase local

*"  IMPORTING

*"     REFERENCE(IM_SENDER) TYPE  SYUNAME

*"     REFERENCE(IM_RECEIVER) TYPE  BBPT_OM_PARTNERS

*"     REFERENCE(IM_DATEFROM) TYPE  SC_DATEFRO

*"     REFERENCE(IM_TIMEFROM) TYPE  SC_TIMEFRO

*"     REFERENCE(IM_DATETO) TYPE  SC_DATETO

*"     REFERENCE(IM_TIMETO) TYPE  SC_TIMETO

*"     REFERENCE(IM_TEXTO) TYPE  SO_TXTTAB

*"     REFERENCE(IM_SUBJECT) TYPE  SC_TXTSHOR

*"  EXCEPTIONS

*"      NO_EXISTEN_RECEPTORES

*"      OTHERS

*"----------------------------------------------------------------------

include <cntn01>.

type-pools: sccon.

DATA:

       lo_appointment type ref to cl_appointment,

       ls_participant type scspart,

       lv_address type swc_object,

       ls_address_container like swcont occurs 0 with header line,

"      data lv_location like scsappt-room.

       lo_send_request type ref to cl_bcs,

       lv_sent_to_all type os_boolean,

       ls_text TYPE string,

       lt_text TYPE SO_TXTTAB,

       lt_smtp TYPE TABLE OF BAPIADSMTP,

       ls_smtp TYPE BAPIADSMTP,

       ls_partner_guid TYPE BU_PARTNER_GUID,

       lv_username TYPE SYUNAME,

       ls_receiver LIKE LINE OF im_receiver,

       lv_existen_receptores  TYPE BOOLEAN.

   CREATE OBJECT lo_appointment.

* Agregamos los participantes

   LOOP AT im_receiver INTO ls_receiver.

     clear ls_participant.

     " aqui debe obtener el correo del participante

     CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'

         EXPORTING

           BUSINESSPARTNER       = ls_receiver

           RESET_BUFFER          = abap_true

         TABLES

           BAPIADSMTP            = lt_smtp.

     IF sy-subrc = 0.

       READ TABLE lt_smtp INTO ls_smtp INDEX 1.

       IF ls_smtp-e_mail IS NOT INITIAL.

         lv_existen_receptores = abap_true.

         swc_create_object lv_address 'ADDRESS' space.

         swc_set_element ls_address_container 'AddressString' ls_smtp-e_mail.

         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_participant-objkey.

         check sy-subrc = 0.

         swc_get_object_type lv_address ls_participant-objtype.

         check sy-subrc = 0.

         move sccon_part_sndmail_with_ans to ls_participant-send_mail.

         ls_participant-comm_mode = 'INT'.

         lo_appointment->add_participant( participant = ls_participant ).

       ENDIF.

     ENDIF.

   ENDLOOP.

   IF lv_existen_receptores = abap_false.

     RAISE NO_EXISTEN_RECEPTORES.

   ENDIF.

*   Fecha y Hora

   lo_appointment->set_date( date_from = im_datefrom

    time_from = im_timefrom

    date_to = im_dateto

    time_to = im_timeto

    timezone = 'UTC-5'

    ).

*   Make appointment appear "busy"

   lo_appointment->set_busy_value( sccon_busy_busy ).

*   Set Organizer

   " aqui debe obtener el correo del sender

*  SELECT SINGLE PARTNER_GUID

*    INTO ls_partner_guid

*    FROM BUT000

*    WHERE PARTNER = im_sender.

*

*  IF sy-subrc = 0.

*

*    CALL FUNCTION 'BP_CENTRALPERSON_GET'

*      EXPORTING

*        IV_BU_PARTNER_GUID         = ls_partner_guid

*      IMPORTING

*        EV_USERNAME                = lv_username

*      EXCEPTIONS

*        NO_CENTRAL_PERSON          = 1

*        NO_BUSINESS_PARTNER        = 2

*        NO_ID                      = 3

*        OTHERS                     = 4.

*    IF SY-SUBRC = 0.

*      lo_appointment->set_organizer( lv_username ).

*    else.

*      lo_appointment->set_organizer( sy-uname ).

*    ENDIF.

*

*  ELSE.

*    lo_appointment->set_organizer( sy-uname ).

*  ENDIF.

   lo_appointment->set_organizer( sy-uname ).

*   "Type of Meeting" (value picked from table SCAPPTTYPE)

   lo_appointment->set_type( 'CUSTOMER' ).

   CONCATENATE 'Texto de la actividad' CL_ABAP_CHAR_UTILITIES=>NEWLINE 'Prueba de Salto'

   INTO ls_text.

  

   append ls_text TO lt_text.

   lo_appointment->set_text( lt_text ).

"  lo_appointment->set_text( im_texto ).

*   Set Meeting Subject

   lo_appointment->set_title( im_subject ).

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

   lo_appointment->save( send_invitation = space ).

   TRY .

*     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' ).

     COMMIT WORK AND WAIT.

   CATCH CX_BCS.

     RAISE OTHERS.

   ENDTRY.

ENDFUNCTION.

former_member186543
Active Contributor
0 Kudos

Hi Mahesh,

Please care to explain more as to how have you sent the data from CRM to Outlook if groupware is not enabled.

May be we might be able to help you more then !

/Hasan