Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error in Code-urgent help

below is my program , when i execute it it gives me error. this program is for sending email to external user.

Can anyone find out what is the error ?

When i debug it , it gives me exception - 9 .

" Object not send ".

PARAMETERS: p_line1(70) TYPE c OBLIGATORY,

p_line2(70) TYPE c,

p_line3(70) TYPE c,

p_title LIKE sood1-objdes,

p_user(100) TYPE c OBLIGATORY.

START-OF-SELECTION.

DATA: i_receivers LIKE soos1 OCCURS 0 WITH HEADER LINE,

i_objcont LIKE soli OCCURS 0 WITH HEADER LINE,

i_objhead LIKE soli OCCURS 0 WITH HEADER LINE,

r_object_hd_change LIKE sood1 OCCURS 0 WITH HEADER LINE.

r_object_hd_change-objdes = p_title. "Title

r_object_hd_change-objnam = text-000. "Document name

r_object_hd_change-objla = sy-langu. "Lenguaje

r_object_hd_change-objsns = 'P'. "Atributos del objeto, Privado

r_object_hd_change-vmtyp = 'F'. "Tipe

r_object_hd_change-skips = ' '. "Procesar 1º dynpro no visible

r_object_hd_change-acnam = sy-uname.

i_receivers-recesc = 'U'. "Sap User

i_receivers-recnam = 'VIPIN@IVL.CO.IN'. "Destiny user

i_receivers-sndex = 'X'.

APPEND i_receivers.

i_objcont-line = p_line1.

APPEND i_objcont.

CLEAR i_objcont.

i_objhead-line = i_objhead-line + 1.

IF NOT p_line2 IS INITIAL.

i_objcont-line = p_line2.

APPEND i_objcont.

CLEAR i_objcont.

i_objhead-line = i_objhead-line + 1.

ENDIF.

IF NOT p_line3 IS INITIAL.

i_objcont-line = p_line3.

APPEND i_objcont.

CLEAR i_objcont.

i_objhead-line = i_objhead-line + 1.

ENDIF.

APPEND i_objhead.

CALL FUNCTION 'SO_OBJECT_SEND'

EXPORTING

object_hd_change = r_object_hd_change

object_type = 'RAW'

owner = sy-uname

TABLES

objcont = i_objcont

objhead = i_objhead

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

x_error = 20

OTHERS = 21.

IF sy-subrc <> 0.

WRITE : 'ERROR'.

  • MESSAGE I000. "Error en el envío de mensaje al responsable

  • LEAVE SCREEN.

Endif.

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question