Skip to Content
0
Former Member
Feb 16, 2007 at 04:39 AM

Getting Errror Meassage No 802 while sending Fax

17 Views

Hi all,

I'm using FM <b>SO_NEW_DOCUMENT_SEND_API1</b> to send Email and Fax through ABAP prog.

I'm able to send to mail to External ID menwhile Fax is not going but getting thefollowing message if we the status in T-Code <b>SOST</b>.

<b>Msg No 802 No delivery to 0091802299922, as recipient unknown.</b>

This is my <b>Fax No. +91 91-80-2299922</b>

My selection screen is like this .

Email ID -


( Passign Email Ids)

Fax No 802299922 ( Passing Fax No like this )

Country IND ( Country)

What changes are required to send Fax in the below program .

----


*& This is my Source Code

----


report z_email.

tables : somlreci1.

data : e_document_data like sodocchgi1,

e_document_type like soodk-objtp value 'RAW',

e_put_in_outbox like sonv-flag value 'X',

e_commit_work like sonv-flag value 'X'.

data : it_object_header type table of solisti1 with header line,

it_object_content type table of solisti1 with header line,

receivers type table of somlreci1 with header line.

data : i_lines type i.

select-options : s_mailid for somlreci1-receiver no intervals.

parameters : p_faxno type somlreci1-fax,

p_contry type somlreci1-country.

start-of-selection.

e_document_data-obj_name = 'Test'.

e_document_data-obj_descr = 'Email Test'.

e_document_data-obj_langu = sy-langu.

e_document_data-proc_type = '1'.

*--Information

it_object_content-line = 'This is a report used to send starts and'.

append it_object_content.

clear it_object_content.

it_object_content-line = ' stops to foreign distri. via E-Mail or Fax'.

append it_object_content.

clear it_object_content.

*--For Doc Size

describe table it_object_content lines i_lines.

e_document_data-doc_size = ( i_lines - 1 ) * 255 +

strlen( it_object_content ).

*--Email ID

loop at s_mailid.

receivers-receiver = s_mailid-low.

receivers-rec_type = 'U'.

append receivers.

clear : receivers.

endloop.

*--Fax

if p_faxno is not initial.

receivers-rec_type = 'F'.

receivers-fax = p_faxno.

receivers-country = p_contry.

receivers-com_type = 'TELFAX'.

append receivers.

clear : receivers.

endif.

*--Call function module

call function 'SO_NEW_DOCUMENT_SEND_API1'

exporting

document_data = e_document_data

document_type = e_document_type

put_in_outbox = e_put_in_outbox

commit_work = e_commit_work

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

tables

  • OBJECT_HEADER =

object_content = it_object_content

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

receivers = 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 = 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  • commit work.

wait up to 2 seconds.

submit rsconn01 with mode = 'INT'

  • with output = 'X'

and return.

write :/ 'Message sent successfully..!'.

endif.

Regards,

Balavardhan.K