Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problems with sending email about SO_OBJECT_SEND

Former Member
0 Likes
1,047

Hi,

I have to send html emails from a ABAP Program and have found the module SO_OBJECT_SEND. When I fill in the data and call the function, I got the exception "OWNER_NOT_EXIST". In my userdetails, I have typed in my emailadress.

My parameters, I use for the function call:


w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
w_object_hd_change-file_ext = 'HTM'.

receiver_list-recextnam = '[email protected]'.
receiver_list-recesc = 'E'.
receiver_list-sndart = 'INT'
receiver_list-sndpri = '1'.

I have one line in objcont, object_type = 'RAW' and owner = sy-uname.

Does anybody knows the problem?

Cheers Arne

4 REPLIES 4
Read only

Former Member
0 Likes
832

DATA: ds_object_hd_change LIKE sood1.

DATA g_object_type LIKE sood-objtp VALUE 'RAW'.

clear it_asci.

INSERT it_asci INDEX 1.

it_asci-line = 'Comment: '.

it_asci-line+14 = g_comment.

INSERT it_asci INDEX 1.

it_asci-line = 'Transaction: '.

it_asci-line+14 = g_tcode.

INSERT it_asci INDEX 1.

ds_object_hd_change-acout = 'X'.

CONCATENATE 'Employee AD & D Insurance'

sy-uname

INTO ds_object_hd_change-objdes

SEPARATED BY space.

CONCATENATE g_user_id '@yahoo.com'

INTO it_recv-recextnam.

it_recv-recesc = 'U'.

it_recv-sndex = 'X'.

it_recv-sndcp = 'X'.

APPEND it_recv.

  • Send email to security admin

CALL FUNCTION 'SO_OBJECT_SEND'

EXPORTING

object_hd_change = ds_object_hd_change

object_type = g_object_type

TABLES

objcont = it_asci

receivers = it_recv

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.

WRITE: / 'Error: Cannot sent email (code=', sy-subrc, ').'.

ELSE.

MESSAGE s002 WITH 'Message sent'.

ENDIF.

hope this will solve ur problem

vijay

Read only

Former Member
0 Likes
832

Hope the responsible user does not exist.

Why can't you try by step mode execution through SE37 for the function module 'SO_OBJECT_SEND'.

Fill all the required values and execute in debug mode.

Read only

0 Likes
832

I´m starting the call about se37 and I´m using my sy-uname! So the user exists! I can´t find anything in debugging mode....

What else can be missing for my user?

I have also checked the module "EFG_GEN_SEND_EMAIL" and I can send emails about that one. But if I´m using html-tags, it´s always being sent as normal text.....

Read only

0 Likes
832

Hi Arne,

Check the above Code .

Regards

Vijay