Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

After preparing the SAP script.what is the procedure to send
that script to e-mail?

Answer Posted / k.nagalakshmi

Hi,
better option is to convert your spool request to PDF and
send it

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

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In delivery processing which step comes first picking, packing, posting goods issue ?

2098


What are the two ways for restricting the value range for a domain ?

1211


A field containing currency amounts (data type curr) must be assigned to a reference table and a reference field. Explain.? : abap data dictionary

1192


what are the 2 other types of views, which are not allowed in release 3.0? : abap data dictionary

1046


What are the techniques involved in using SAP supplied programs? Do you prefer to write your own programs to load master data? Why?

1200


How to insert a line into abap internal tables?

1075


How do you execute the payroll

2581


What is the differences between structure and table in data dictionary in abap?

1092


What are Delivery classes? What data will you want to transport during client copy?

1423


There is a delivery that is being created through the ABAP code and in the middle it says delivery created but someone is modifying , how would you rectify this issue

8590


what is difference between user exit, customer exit and badi?

5207


What does the ‘suppress dialog’ do?

1488


What are the layers of data description in r/3? : abap data dictionary

1121


What are the components of sapscript?

1081


What is the use of 'table index'?

1088