HI ABAPERS,
my issue is to costomize LSO_CORRESPONDENCE12 TO GET THE BOOKING AND CANCELLATION STATUS.SAP USER WILL SEND THE ANOTHER SAP USER REGARDING BOOKING AND CANCELATION WITH ATTACHMENTS.SO I HAVE TRIED
THE CODE IN GET_MAIL_ADD_ATTACHMENT METHOD.
DATA: ld_uid TYPE char20, "Unique Indentifier
ls_soli TYPE soli, "Work area for E mail
lt_soli TYPE soli_tab. "Table for Email
CONCATENATE i_recipient-objid i_bus_transaction_info-objid INTO ld_uid.
CONDENSE ld_uid.
* Calendar logic begin
ls_soli-line = 'BEGIN:VCALENDAR'.
APPEND ls_soli TO lt_soli.
ls_soli-line = 'PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN'.
APPEND ls_soli TO lt_soli.
ls_soli-line = 'VERSION:2.0'.
APPEND ls_soli TO lt_soli.* Here based on the notification value we need to call request or cancel method. To know the significance of this method please refer the below URLhttp://stackoverflow.com/questions/45453/icalendar-and-event-updates-not-working-in-outlook
IF i_notif_type EQ 'BUCH'. " Abbr for the course booking
ls_soli-line = 'METHOD:REQUEST'.
ELSEIF i_notif_type EQ 'DELVORM'. "Course Cancellation
ls_soli-line = 'METHOD:CANCEL'.
ENDIF.
APPEND ls_soli TO lt_soli.
ls_soli-line = 'BEGIN:VEVENT'.
APPEND ls_soli TO lt_soli.
CONCATENATE 'UID:' ld_uid INTO ls_soli-line.
APPEND ls_soli TO lt_soli.
* Populate the Sequnce number
ls_soli-line = 'SEQUENCE:1'.
APPEND ls_soli TO lt_soli.
CLEAR ls_soli-line.
* Email ID of the sender
ls_soli-line = 'ORGANIZER:sender@;;;;'.
APPEND ls_soli TO lt_soli.
CLEAR ls_soli-line.
* Populate the Time Stamp
CONCATENATE 'DTSTART:' sy-datum 'T080000Z' INTO ls_soli-line.
APPEND ls_soli TO lt_soli.
CONCATENATE 'DTEND:' sy-datum 'T100000Z' INTO ls_soli-line.
APPEND ls_soli TO lt_soli.
* Populate the Location of the course
ls_soli-line = 'LOCATION: This is Course Location'.
APPEND ls_soli TO lt_soli.
* This Would appear in Calender file
ls_soli-line = 'DESCRIPTION: Course Participation'.
APPEND ls_soli TO lt_soli.
CONCATENATE 'SUMMARY: Course Participation for '&Give Participant Name&' INTO ls_soli-line SEPARATED BY space.
APPEND ls_soli TO lt_soli.
ls_soli-line = 'END:VEVENT'.
APPEND ls_soli TO lt_soli.
ls_soli-line = 'END:VCALENDAR'.
APPEND ls_soli TO lt_soli.
* Convert the data to Txt format
CALL FUNCTION 'SO_RAW_TO_RTF'
TABLES
objcont_old = lt_soli[]
objcont_new = e_contents_txt.
e_no_add = space.
e_doc_type = 'ICS'.
e_obj_descr = 'Name of the Calender file'.
FORM send_mail TABLES pt_packing_list TYPE t_sopcklsti1
pt_header TYPE t_solisti1
pt_content TYPE t_solisti1
pt_receiver TYPE t_somlreci1
USING ps_document_data TYPE sodocchgi1
CHANGING p_sent_to_all TYPE sy-binpt
p_new_object_id TYPE sofolenti1-object_id
p_rc.
* send mail
CLEAR p_rc.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = ps_document_data
commit_work = 'X'
IMPORTING
sent_to_all = p_sent_to_all
new_object_id = p_new_object_id
TABLES
packing_list = pt_packing_list
object_header = pt_header
contents_txt = pt_content
receivers = pt_receiver
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc 0.
p_rc = sy-subrc.
* keep error message
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO l_msg_text.
ENDIF.
ENDFORM. " send_mail
BUT STILL I AM NOT GETTING MAILS.SO PLZ SOLVE THE ISSUE AND GIVE ME SOME CORRECT CODES.
WAITING FOR REPLY.
SAROJ