|
#1
|
|||
|
|||
Función SO_NEW_DOCUMENT_SEND_API1
Amigos:
Estoy utilizando esta función para enviar mail externo, pero tengo problemas que el documento en HTML no me llega en el cuerpo del correo, no se visualiza nada, ¿alguien de Uds. ha tenido este problema y como lo ha solucionado?. CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1' EXPORTING DOCUMENT_DATA = S_DOC_CHNG DOCUMENT_TYPE = 'HTM' TABLES OBJECT_CONTENT = T_OBJCONT RECEIVERS = T_RECLIST 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. Muchas gracias a todos. |
#2
|
|||
|
|||
A ver si todavia te sirve
*&---------------------------------------------------------------------*
*& Report Z_AYUDA_16 * *& * *&---------------------------------------------------------------------* *& Programa de Envió de Emails externos con texto plano * *& Parametros: * *& - Para : email destinatario * *&---------------------------------------------------------------------* REPORT Z_AYUDA_16. DATA: it_body TYPE TABLE OF solisti1 WITH HEADER LINE, gd_doc_data LIKE sodocchgi1, it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE, tab_lines LIKE sy-tabix. DATA: wl_body LIKE it_body-line. * Armamos el contenido del cuerpo CONCATENATE text-m01 '904512' text-m02 'MMMTPA' '.' INTO wl_body SEPARATED BY space. it_body-line = wl_body. APPEND it_body. ** Equivalente a un salto de linea CLEAR wl_body. it_body-line = wl_body. APPEND it_body. ** Pie de Cuerpo it_body-line = text-m03. APPEND it_body. * Creamos el mail DESCRIBE TABLE it_body LINES tab_lines. READ TABLE it_body INDEX tab_lines. gd_doc_data-doc_size = ( tab_lines ) * 255 + STRLEN( it_body ). * atributos especiales del mensaje gd_doc_data-obj_langu = sy-langu. gd_doc_data-obj_descr = text-m04. * Cuerpo del mensaje it_packing_list-transf_bin = space. it_packing_list-head_start = 1. it_packing_list-head_num = 0. it_packing_list-body_start = 1. DESCRIBE TABLE it_body LINES it_packing_list-body_num. it_packing_list-doc_type = 'RAW'. APPEND it_packing_list. * add direc. mail it_receivers-receiver = 'xxxx@xxxxxx.com'. it_receivers-rec_type = 'U'. it_receivers-com_type = 'INT'. it_receivers-notif_del = 'X'. it_receivers-notif_ndel = 'X'. APPEND it_receivers. * Llamamos al modulo de funcion para el envio de mensaje CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = gd_doc_data put_in_outbox = 'X' commit_work = 'X' TABLES packing_list = it_packing_list contents_txt = it_body receivers = it_receivers 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 EQ 0. WRITE: 'e-mail enviado exitósamente'. ELSE. WRITE: 'error en envió de e-mail'. ENDIF. |
Herramientas | Buscar en Tema |
Desplegado | |
|
|