dear all,
i want to send external mail through sap......
in that i m making spool & convert to pdf and send as a attachment.......
i hv a got idea from
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm.
but as per requirement i m changing some logic.....but it is not work.......
i m calling some other program using submit.
i m giving code here.....
SUBMIT YPPDAILYUPDATE "VIA SELECTION-SCREEN
with pstngdt in temp
with entdate eq ' '
with posdate eq 'X'
with rdata eq 'X'
with logic eq ' '
with high eq 'X'
with trend eq ' '
AND RETURN
.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
select yemail as p_email into CORRESPONDING FIELDS OF TABLE mailtab
from ymail
where ytcode = 'YPP18'.
gd_attachment_desc1 = 'YPP18'.
PERFORM convert_spool_to_pdf.
loop at mailtab into mailstr.
p_email1 = mailstr-p_email.
PERFORM process_email.
endloop.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool & mail sending',
'request to be created.'.
ENDIF.
_______________
but using this i m running this program in background then also it not generate any spool......
pls give a solution for this problem.....
i will provide points for that....
Regards,
Arpit