Hi experts,
I am sending external mail throuh FM so_object_send , the code is given below
The FM sy-subrc returning 0 but i am not getting mail. Is i am missing any thing to pass to FM
Please suggest
Thanks in advance
sai
code
DATA: i_receivers LIKE soos1 OCCURS 1 WITH HEADER LINE,
i_objpara LIKE selc OCCURS 1 WITH HEADER LINE,
i_objhead LIKE soli OCCURS 1 WITH HEADER LINE,
i_objcont LIKE soli OCCURS 1 WITH HEADER LINE.
DATA: r_object_hd_change LIKE sood1,
v_lineas TYPE i.
data : SUBJECT(10),
DIRECCION(80) type c.
URGENTE.
DIRECCION = 'email address.
SUBJECT = 'SUBJECT'.
CLEAR i_receivers.
i_receivers-recnam = direccion.
SEARCH direccion FOR '@'.
IF SY-SUBRC = 0.
i_receivers-recextnam = direccion.
i_receivers-recesc = 'U'.
ELSE.
i_receivers-recnam = direccion.
i_receivers-recesc = 'B'.
ENDIF.
i_receivers-rtunam = DIRECCION. " Nombre del Destinatario
i_receivers-recextnam = DIRECCION.
i_receivers-sndex = urgente. " Urgente
APPEND i_receivers.
Informamos el parámetro OBJECT_HD_CHANGE.
CLEAR r_object_hd_change.
r_object_hd_change-objla = sy-langu. " Idioma del documento
r_object_hd_change-objsns = 'F'. " Atributos del objeto
r_object_hd_change-objnam = SY-UNAME. " Nombre Documento
r_object_hd_change-objdes = subject. " Título
REFRESH i_objcont.
DESCRIBE TABLE texto LINES v_lineas.
IF v_lineas <> 0.
LOOP AT texto.
CLEAR i_objcont.
i_objcont-line = 'texto'.
APPEND i_objcont.
ENDLOOP.
ENDIF.
Envío del mensaje por SAPOffice
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = r_object_hd_change
object_type = 'RAW' " Tipo Documento
outbox_flag = space
owner = SY-UNAME
delete_flag = 'X'
TABLES
objcont = i_objcont " Mensaje
objhead = i_objhead " Nº líneas objcont
objpara = i_objpara
receivers = i_receivers " Destinatario
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
x_error = 20
OTHERS = 21.