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

Program sending via fax.

Former Member
0 Likes
688

Hi All,

I'm currently doing a program wherein it will send the document via FAX. The document is done via SMARTFORMS.

Could anyone give me a sample program/code on how to send the document via FAX?

Your quick response will be highly appreciated.

Thanks in advance,

CarMey

Hi All,

I'm currently doing a program wherein it will send the document via FAX. The document is done via SMARTFORMS.

Could anyone give me a sample program/code on how to send the document via FAX?

Your quick response will be highly appreciated.

Thanks in advance,

CarMey

4 REPLIES 4
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
617

Hi,

check this link for all your querries

Please Check this one:

SAP Script->PDF->Email

have alook at this code also

call function 'CONVERT_ABAPSPOOLJOB_2_PDF'

exporting

src_spoolid = mi_rqident

no_dialog = c_no

dst_device = c_device

importing

pdf_bytecount = gd_bytecount

tables

pdf = it_pdf_output

exceptions

err_no_abap_spooljob = 1

err_no_spooljob = 2

err_no_permission = 3

err_conv_not_possible = 4

err_bad_destdevice = 5

user_cancelled = 6

err_spoolerror = 7

err_temseerror = 8

err_btcjob_open_failed = 9

err_btcjob_submit_failed = 10

err_btcjob_close_failed = 11

others = 12.

check sy-subrc = 0.

Transfer the 132-long strings to 255-long strings

loop at it_pdf_output.

translate it_pdf_output using ' ~'.

concatenate gd_buffer it_pdf_output into gd_buffer.

endloop.

translate gd_buffer using '~ '.

do.

it_mess_att = gd_buffer.

append it_mess_att.

shift gd_buffer left by 255 places.

if gd_buffer is initial.

exit.

endif.

enddo.

then call FM after populating attachment data

call function 'SO_DOCUMENT_SEND_API1'

exporting

document_data = w_doc_data

put_in_outbox = 'X'

sender_address = ld_sender_address

sender_address_type = ld_sender_address_type

commit_work = 'X'

importing

sent_to_all = w_sent_all

tables

packing_list = t_packing_list

contents_bin = t_attachment

contents_txt = it_message

receivers = t_receivers

exceptions

too_many_receivers = 1

document_not_sent = 2

document_type_not_exist = 3

also u can chk sample programe.

Refer to the code in the following link:

http://www.sapdev.co.uk/reporting/rep_spooltopdf.htm

do reward if helpful

Cheers,

Simha.

Read only

Former Member
0 Likes
617

Hi Simha,

Your reply has been appreciated, however the document will be sent through TELEFAX and not by EMAIL.

Please help.

Thanks,

CarMey

Read only

Former Member
0 Likes
617

HI,

Refer to the following link:

http://sap-img.com/abap/sending-fax-from-abap.htm

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
617

Hi,

Refere to following link for sample code.

http://www.sap-img.com/abap/sending-fax-from-abap.htm

Reward pts if usefull.

Regards,

Dhan