I need to send a mail using the FM so_object_send.
Please suggest what are the mandatory parameters to pass to this FM.
If sample code sent very help full
Vinod Vemuru replied
I sugest u to use FM SO_NEW_DOCUMENT_ATT_SEND_API1 which internally calls ur FM. But usage of this FM is very easy. U can get number of sample code for this FM in SDN.
Check below sample code for ur FM.
REFRESH i_objcont. CLEAR: i_maildata. LOOP AT i_maildata. CLEAR:wa_objcont,w_menge. "Populate the mail body data into this i_objcont table APPEND wa_objcont TO i_objcont. ENDLOOP. MOVE:c_dlname TO wa_receivers-recnam, c_x TO wa_receivers-snddr, c_x TO wa_receivers-sndex, c_c TO wa_receivers-recesc. APPEND wa_receivers TO i_receivers. CLEAR:i_objhead, i_objpara, i_objparb, i_objhead, i_objpara, i_objparb, i_raw_head, wa_folder_id, w_forwarder, wa_object_fl_change, wa_object_id, w_store_flag, w_count. DESCRIBE TABLE i_objcont LINES w_count. MOVE: w_count TO i_raw_head-rawsiz, i_raw_head TO i_objhead. APPEND i_objhead. CALL FUNCTION 'SO_OBJECT_SEND' EXPORTING folder_id = wa_folder_id forwarder = w_forwarder object_fl_change = wa_object_fl_change object_hd_change = wa_object_hd_change object_id = wa_object_id object_type = w_object_type outbox_flag = w_outbox_flag owner = w_owner store_flag = w_store_flag IMPORTING object_id_new = wa_object_id_new sent_to_all = w_sent_to_all TABLES objcont = i_objcont objhead = i_objhead objpara = i_objpara objparb = i_objparb receivers = i_receivers EXCEPTIONS active_user_not_exist = 1 communication_failure = 2 component_not_available = 3 folder_not_exist = 4 folder_no_authorization = 5 forwarder_not_exist = 6 note_not_exist = 7 object_not_exist = 8 object_not_sent = 9 object_no_authorization = 10 object_type_not_exist = 11 operation_no_authorization = 12 owner_not_exist = 13 parameter_error = 14 substitute_not_active = 15 substitute_not_defined = 16 system_failure = 17 too_much_receivers = 18 user_not_exist = 19 originator_not_exist = 20 x_error = 21 OTHERS = 22. IF sy-subrc <> 0. ENDIF. "Send mail immediately SUBMIT zpause WITH p_sec EQ c_2 AND RETURN. SUBMIT rsconn01 USING SELECTION-SET c_mode AND RETURN. CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.