Schedule Send Execl Report by E-mail to System User
Hello:
I need to schedule send Excel Report by E-mail to system user internet address. If only define the job by Reprot Agent? Do we have other method?
Hope this clear!Can you give some advice?
Regards&Thanks
zagory
Hi zagory,
i forgot one tech issue to be setup: The internet Mail gateway needs to be setup if you want to send proper e-mails.
presupposed all tech. issues are solved, I agree with my colleague. Setup is fairly easy to handle, as soon as you know the customers demands like
- who is allowed to send
- who will do it in the future
- who are the recipients
- when should the precalc. take place/when should the Workbook be executed (Timepoints, after dataupdate ...)
for authorisations check out object: s_rs_bcs.
also make sure that the executor has permissions for the backgroud user (serach in TRC SU21, i can not remember.)
if all is known = approx. 2-3 days until go live, depending on the complexity of the existing scheduling and the authorisation concept.
Not to mention the training for all that and the tchnical setup.
hth
cheers
Sven
Similar Messages
-
How to send a report via e-mail
Hello All,
I want to send a report via e-mail.
What should I do for that?
Please help me out...
Regards,
Ravi Khattar.Hi,
Please check the below code....
data: t_objpack like sopcklsti1 occurs 1 with header line,
t_objhead like solisti1 occurs 1 with header line,
t_objtxt like solisti1 occurs 0 with header line,
t_objbin like solisti1 occurs 1 with header line,
t_reclist like somlreci1 occurs 1 with header line,
t_lobj like abaplist occurs 0 with header line,
t_listobj like abaplist occurs 1 with header line.
data: v_tab_line1 type i,
v_tab_line2 type i,
v_docsize type i,
v_len type i,
v_line(1250) type c,
v_subj(132) type c,
v_cr(1) type x value '0D',
v_linefd(2) type x value '0D0A',
v_docdata like sodocchgi1.
clear: t_objpack[], t_objhead[], t_objtxt[], t_reclist[], t_listobj[].
concatenate 'This email is generated from a SAP' sy-sysid '-'
sy-mandt '- batch environment.' into t_objtxt separated by ' '.
append t_objtxt.
t_objtxt = 'Please do not respond to this email.'. append t_objtxt.
v_docdata-obj_name = 'SAMPLE_TEST'.
concatenate 'Sales Order Status Attachment -' sy-datum '-' sy-uzeit
into v_subj separated by ' '.
v_docdata-obj_descr = v_subj.
describe table t_objtxt lines v_tab_line1.
read table t_objtxt index v_tab_line1.
v_docdata-doc_size = ( v_tab_line1 - 1 ) * 255 + strlen( t_objtxt ).
t_objpack-head_start = 1.
t_objpack-head_num = 1.
t_objpack-body_start = 1.
t_objpack-body_num = v_tab_line1.
t_objpack-doc_type = 'RAW'.
append t_objpack.
clear v_line.
if p_type = '1'.
loop at t_list.
concatenate v_line t_list v_linefd into v_line.
v_len = strlen( v_line ).
do 4 times.
if v_len ge 255.
if v_line+254(1) = v_cr.
v_line255 = v_line254.
v_line+254(1) = ' '.
endif.
t_objtxt = v_line(255).
v_line = v_line+255.
v_len = v_len - 255.
append t_objtxt.
else.
exit.
endif.
enddo.
endloop.
if v_line ne ' '.
t_objtxt = v_line(255).
append t_objtxt.
endif.
describe table t_objtxt lines v_tab_line2.
t_objpack-doc_size = ( v_tab_line2 - v_tab_line1 ) * 255.
t_objpack-body_start = v_tab_line1 + 1.
t_objpack-transf_bin = ' '.
t_objpack-doc_type = 'TXT'.
else.
t_objbin[] = html[].
describe table t_objbin lines v_tab_line2.
t_objpack-doc_size = v_tab_line2 * 255.
t_objpack-body_start = 1.
t_objpack-transf_bin = 'X'.
t_objpack-doc_type = 'HTM'.
endif.
t_objpack-head_start = 1.
t_objpack-head_num = 1.
t_objpack-body_num = v_tab_line2.
t_objpack-obj_name = 'SAMPLE_TEST'.
t_objpack-obj_descr = 'Test'.
append t_objpack.
loop at s_email.
t_reclist-receiver = s_email-low.
t_reclist-rec_type = 'U'.
append t_reclist.
endloop.
t_reclist-receiver = sy-uname.
t_reclist-rec_type = 'B'.
append t_reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = v_docdata
put_in_outbox = ' '
TABLES
packing_list = t_objpack
object_header = t_objhead
contents_bin = t_objbin
contents_txt = t_objtxt
receivers = t_reclist.
if sy-subrc = 0.
endif.
Cheers,
Bujji -
Change E-mail for system user BWREMOTE
Dear All,
How can i change the E-mail for system user BWREMOTE, i tried in SU01 email field is empty in communication tab, checked in BW and ECC no details were maintained. Currently this user is able to send emails, would like to change the email address to this user.
Thanks,
KartikHi Kartik
For this you have to maintain the list of process and email note faction when process chain failed in transaction code RSPCM in BW system
and also you can refer the SDN inks
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/304c3146-8eb9-2d10-d787-b6dc2d368cb2?QuickLink=index&…
BR
SS -
Send Crystal Report publication via mail dynamically
Hi!
I want to achieve the following scenario:
I have a Crystal Report within my BOE 3.1 system. Is it possible to trigger an event from an external system which indicates that the report on my server gets executed and will be sent to a specified user via email?
I'm thinking of some kind of solution like OpenDocument - where I access the report via an URL, pass parameters to it, and the executed report will be displayed on the users screen. Now, I don't want to display the report on the user's screen, I want to send it to him via mail.
Has anyone ever tried to implement such a kind of scenario? Does BOE offer web services which might help me to achieve my scenario?
thank you,
DominikHi Dominik,
Yes, that is something that you can do using the SDK.
The idea is that when your user clicks on the button, it will generate a new schedule to run now and with email destination.
There are few examples in the SDK. You can start with this KB:
1203257 - How to schedule a Web Intelligence document with prompts using the Enterprise Java SDK
The main URL with SDK Documentation is:
http://www.sdn.sap.com/irj/sdn/bi-sdklibrary
One of the first things you have to know is to choose the right SDK for your project. You will find a quick approach in the following links:
http://devlibrary.businessobjects.com/BusinessObjectsXI3/en/diagrams/bosdks_overview_121_en.pdf
and
http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/40bccdfd-88a6-2b10-1da1-c47a54b625a7
Because you are thinking to do something related with scheduling you should focus in the Enterprise SDK.
http://www.sdn.sap.com/irj/boc/index?rid=/webcontent/uuid/a09374f5-a982-2b10-0297-85c67690b4f2
A collection of samples can be found here:
http://wiki.sdn.sap.com/wiki/display/BOBJ/JavaBusinessObjectsEnterpriseSDKSamples#JavaBusinessObjectsEnterpriseSDKSamples-Scheduling
And a specific sample to run now and schedule:
https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/405a1725-4b57-2c10-928e-c25c34a5cf43
You will also find valuable information at see the following links:
Our java wiki:
http://wiki.sdn.sap.com/wiki/display/Java/JavaDevelopmentHome
Our SDK external forum:
http://forums.sdn.sap.com/
I hope this helps you,
Julian -
How to send ALV report Output through mail in background !
Hi ,
I had an ALV Report. I want to send this report output to patricular email id every day ! Presenty i do this manually. I run the report and send the output to the particular email address. Now i want to schecule the report daily in background and the out put of the report should be mailed to particular email ids in background itself. How can i do this ?
Is there and method or setting through which we can do this ?
RegardsHi Nau,
For this requirement you will have to write another program.
This program will convert the spool requests into PDF document and sends an email to the recipients that you specify.
These are the threads which are already posted in The SDN.
*http://wiki.sdn.sap.com/wiki/display/Snippets/Converts+spool+request+into+PDF+document+and+emails*
*<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="353650"></a>*
*<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="902985"></a>*
You need to use the Function module :
-- Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
I will provide you with the code to get this functionality.
*& Form SEND_EMAIL
form SEND_EMAIL .
DATA: t_mailpack TYPE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_mailhead TYPE solisti1 OCCURS 0 WITH HEADER LINE,
t_mailbin TYPE solisti1 OCCURS 0 WITH HEADER LINE,
t_mailtxt TYPE solisti1 OCCURS 0 WITH HEADER LINE,
t_mailrec TYPE somlreci1 OCCURS 0 WITH HEADER LINE.
DATA: wa_maildata TYPE sodocchgi1,
l_filename(50) TYPE c,
l_fldname(30) TYPE c,
l_fldval(100) TYPE c,
l_lines TYPE i,
l_text TYPE text128 .
DATA: w_email_subrc TYPE i.
DATA: w_ship like vbfa-vbeln.
CLEAR: wa_maildata,
t_mailtxt,
t_mailbin,
t_mailpack,
t_mailhead,
t_mailrec.
REFRESH: t_mailtxt,
t_mailbin,
t_mailpack,
t_mailhead,
t_mailrec.
*-- Fill output file
*- Fill header
CLEAR: t_mailbin.
* t_mailbin[] = pdf_tab[].
t_mailbin[] = it_att[]. "Uthaman
*This line is added to get the shipment no in Subject Line
SELECT SINGLE * FROM vbfa WHERE vbelv EQ nast-objky
AND vbtyp_v EQ c_vbtyp_v_j
AND vbtyp_n EQ c_vbtyp_n_8.
w_ship = vbfa-vbeln.
shift w_ship left deleting leading '0'.
*-- File name
if nast-kschl EQ 'ZFPL'.
CLEAR l_filename.
CONCATENATE 'Packing List -'
sy-datum+4(2) sy-datum+6(2) sy-datum(4) '.PDF' INTO l_filename.
*-- Creation of the document to be sent File Name
wa_maildata-obj_name = 'Packing List'.
*-- Mail Subject
CONCATENATE l_filename '-' 'Shipment No -' w_ship INTO wa_maildata-obj_descr SEPARATED BY space.
*-- Mail Contents
t_mailtxt-line = 'Packing List'.
APPEND t_mailtxt.
ENDIF.
if nast-kschl EQ 'ZFBA'.
CLEAR l_filename.
CONCATENATE 'Booking Advice -'
sy-datum+4(2) sy-datum+6(2) sy-datum(4) '.PDF'
INTO l_filename.
*-- Creation of the document to be sent File Name
wa_maildata-obj_name = 'Booking Advice'.
*-- Mail Subject
CONCATENATE l_filename '-' 'Shipment No -' w_ship INTO wa_maildata-obj_descr SEPARATED BY space.
*-- Mail Contents
t_mailtxt-line = 'Packing List'.
APPEND t_mailtxt.
ENDIF.
*-- Prepare Packing List
*-- Write Packing List (Main Subject)
CLEAR: l_lines, t_mailpack.
DESCRIBE TABLE t_mailtxt LINES l_lines.
* READ TABLE t_mailtxt INDEX l_lines.
t_mailpack-doc_size = ( l_lines - 1 ) * 255 + STRLEN( t_mailtxt ).
* CLEAR t_mailpack-transf_bin.
t_mailpack-transf_bin = ' '.
t_mailpack-head_start = 1.
t_mailpack-head_num = 0.
t_mailpack-body_start = 1.
t_mailpack-body_num = l_lines.
t_mailpack-doc_type = 'RAW'.
APPEND t_mailpack.
t_mailhead = l_filename.
APPEND t_mailhead.
*-- Write Packing List (Attachment)
CLEAR: l_lines, t_mailpack.
DESCRIBE TABLE pdf_tab[] LINES l_lines.
* READ TABLE pdf_tab INDEX l_lines.
t_mailpack-doc_size = ( l_lines - 1 ) * 255 + STRLEN( t_mailbin ).
t_mailpack-transf_bin = 'X'.
t_mailpack-head_start = 1.
t_mailpack-head_num = 1.
t_mailpack-body_start = 1.
t_mailpack-body_num = l_lines.
t_mailpack-doc_type = 'PDF'.
t_mailpack-obj_name = l_filename.
t_mailpack-obj_descr = l_filename.
t_mailpack-obj_langu = 'E'.
APPEND t_mailpack.
*-- Set recipients
tables : ztotcemail.
SELECT SINGLE * FROM vbfa WHERE vbelv EQ nast-objky
AND vbtyp_v EQ c_vbtyp_v_j
AND vbtyp_n EQ c_vbtyp_n_8.
CLEAR vttk.
SELECT SINGLE * FROM vttk WHERE tknum EQ vbfa-vbeln.
SELECT SINGLE * FROM ztotcemail WHERE tplst = vttk-tplst
AND lifnr = vttk-tdlnr.
IF SY-SUBRC EQ 0.
t_mailrec-receiver = ztotcemail-smtp_addr. "'Here you will give the email address'.
t_mailrec-rec_type = 'U'.
APPEND t_mailrec.
ENDIF.
**-- Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_maildata
put_in_outbox = 'X'
* commit_work = 'X' " N-16
TABLES
packing_list = t_mailpack
object_header = t_mailhead
contents_bin = t_mailbin[]
contents_txt = t_mailtxt[]
receivers = t_mailrec
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
w_email_subrc = sy-subrc.
IF sy-subrc EQ 0.
MESSAGE s000(zotc) WITH 'Email output sent successfully'.
ELSE.
MESSAGE s000(zotc) WITH 'Can not send email output'.
ENDIF.
endform. " SEND_EMAIL
Hope the above information will be helpful.
Regards,
Kittu -
How to send BIP report link by mail not the attachment.
Hi,
I have a requiment to send the BI Publisher report link by mail.But not to send the report as an attachment.
can any one have solution for this requirement.hi,
Alternatively, u can do this Send a report with all the report names on one side and another side link to that particular report.If any one click on that link means it will open the report(pdf/html/excel) format by referring to the url.we will get this by using RTF Template.
Thanks,
Saichand -
Send the MRP results through mail to the user.
Dear SAP Gurus,
My client have a requirement where in they want that the MRP results as displayed in MRP list should be sent through mail to the user after the MRP run. Is it possible through the standard functionality ?
Regards'
AnkushDear ,
In MD04/MD05 -Check there is an option called Sending e-mail at the header ( Envelope sysmbol ) .From here you can send e-mail to MRP Controller if your user is identified as MRP Controller .
In Customizing for MRP, you can maintain a mail link to inform an MRP controller by using the mail connection function you can do it.In Customizing for MRP, you have entered a mail recipient (individual recipient or recipient group) for the MRP controller in the IMG activity Define MRP controller. You can also integrate the sending of the mail into a workflow .
If you want to send the mail directly to just one MRP controller and include the MRP list or stock/requirements list automatically, you can use the function for variable printing. When using variable printing, the data is displayed in the form of a list that can be processed and printed. A separate mail function also appears, which you can use to send this print list.
MRP controller will get mail in that case you are planned to use Workflow to trigger mails for a given condition of MRP evaluation.
SPROMRP- -EvalutionActivate workflow mail to mrp controller .Also check SAP Note 426648
Explore this above functionality with this information and try to check the same
Regards
JH -
Report that can take the system: (users, utilization, T-CODE)
I need a report that can take the system:
How many times a user logged into the system in the last month
Most used transactions
Changes passwords.
Etc., all you have to do with a user-level tuning.
thanks,
VLopesHi
If you Activate the audit log you can keep track all information,
have a look at -successful and unsuccessful dialog and RFC logon attempts
--successful and unsuccessful transaction and report stats ...
how many times a user logged -in and all .yah you need to count
the number of times a user logged based on the report.
Once you activate....every day transaction details are recorded for every user
who tries to log in.keep an eye on the below parameters
In RZ10
rsau/enable :set to 1 to activate audit logging
rsau/local/file :to specify name and location of audit log file
rsau/max_diskspace/local :To specify maximum space for audit file say if
max.size is reached auditing stops
Hope that helps.
regards
Manjula .U -
Sending multiple reports thru single mail in Crystal reports server XI R2
2)
Ex:
I have a crystal report which takes country as input parameter. Each country has one responsible person.
US--- A person
UK---B person
INDIA ---C person
I need to run this report with these three paramters(may increase infuture) and send the exported report to A,B and C as an mail attachment through crystal reports server XI R2.
I have achieved above with Java code and deployed that java code as JAR file in crystal reports server and scheduled this JAR file.
Here I need to attach all these three attachments to single mail and send it to Manager. And also I need to wait till all the reports gets executed and then attach all the attachments to single mail.
Please help me how to achieve this.
I am using --- Crystal reports server XI R2
Thanks,
Vijay KanthHow are you creating the first three files, are you scheduling each to smtp, or are you waiting until they finish and emailing the instance through your jar file?
If you are scheduling each one, and the instance in enterprise keeps a copy of the finished report, then you could monitor the status of the 3 jobs, once all finish you could get the report and email them out through your java code. There wouldn't be a way to email all three reports as one email to the manager directly through the product. You would be able to cc or bcc the manager on each, but then the manager would be receiving 3 emails. -
Hi,
How do I send a spool report as an e-mail?
NOT as PDF file.
If we can send it as a text file that would also be fine, but preferably as a Spool report as it is (non-editable).Hi,
Have a look at this code...
z_send_email_fax_global
FUNCTION-POOL z_gfaian_mail_fax. "MESSAGE-ID ..
WORK TABLE AREAS
TABLES: tsp01.
INTERNAL TABLES
DATA: lt_rec_tab LIKE STANDARD TABLE OF soos1 WITH HEADER LINE,
lt_note_text LIKE STANDARD TABLE OF soli WITH HEADER LINE,
lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE.
DATA: lt_objcont LIKE STANDARD TABLE OF soli WITH HEADER LINE,
lt_objhead LIKE STANDARD TABLE OF soli WITH HEADER LINE.
DATA: pdf_format LIKE STANDARD TABLE OF tline WITH HEADER LINE.
TYPES: BEGIN OF y_files,
file(60) TYPE c,
END OF y_files.
DATA: lt_files TYPE STANDARD TABLE OF y_files WITH HEADER LINE.
DATA: l_objcont LIKE soli OCCURS 0 WITH HEADER LINE.
DATA: l_objhead LIKE soli OCCURS 0 WITH HEADER LINE.
STRUCTURES
DATA: folder_id LIKE soodk,
object_id LIKE soodk,
link_folder_id LIKE soodk,
g_document LIKE sood4,
g_header_data LIKE sood2,
g_folmem_data LIKE sofm2,
g_header_data LIKE sood2,
g_receive_data LIKE soos6,
g_ref_document LIKE sood4,
g_new_parent LIKE soodk,
l_folder_id LIKE sofdk,
v_email(50).
DATA: hd_dat like sood1.
VARIABLES
DATA: client LIKE tst01-dclient,
name LIKE tst01-dname,
objtype LIKE rststype-type,
type LIKE rststype-type.
DATA: numbytes TYPE i,
arc_idx LIKE toa_dara,
pdfspoolid LIKE tsp01-rqident,
jobname LIKE tbtcjob-jobname,
jobcount LIKE tbtcjob-jobcount,
is_otf.
DATA: outbox_flag LIKE sonv-flag VALUE 'X',
store_flag LIKE sonv-flag,
delete_flag LIKE sonv-flag,
owner LIKE soud-usrnam,
on LIKE sonv-flag VALUE 'X',
sent_to_all LIKE sonv-flag,
g_authority LIKE sofa-usracc,
w_objdes LIKE sood4-objdes.
DATA: c_file LIKE rlgrap-filename,
n_spool(6) TYPE n.
DATA: cancel.
DATA: desired_type LIKE sood-objtp,
real_type LIKE sood-objtp,
attach_type LIKE sood-objtp,
otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
ali LIKE sood-objtp VALUE 'ALI'. " ABAP lists
CONSTANTS
CONSTANTS: ou_fol LIKE sofh-folrg VALUE 'O',
c_objtp LIKE g_document-objtp VALUE 'RAW',
c_file_ext LIKE g_document-file_ext VALUE 'TXT'.
=================================================================================
z_send_email_fax2
FUNCTION z_faian_mail_fax2.
""Interface local:
*" IMPORTING
*" REFERENCE(SRC_SPOOLID) LIKE TSP01-RQIDENT
*" REFERENCE(FAX_MAIL_NUMBER) TYPE SO_NAME
*" REFERENCE(HEADER_MAIL) TYPE SO_OBJ_DES
*" REFERENCE(OBJECT_TYPE) TYPE SO_ESCAPE
*" TABLES
*" LT_BODY_EMAIL STRUCTURE SOLI
*" EXCEPTIONS
*" ERR_NO_ABAP_SPOOLJOB
Fist part: Verify if the spool really exists
SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
IF sy-subrc NE 0.
RAISE err_no_abap_spooljob. "doesn't exist
ELSE.
client = tsp01-rqclient.
name = tsp01-rqo1name.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = client
name = name
part = 1
IMPORTING
type = type
objtype = objtype
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 4
OTHERS = 5.
IF objtype(3) = 'OTF'.
desired_type = otf.
ELSE.
desired_type = ali.
ENDIF.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = src_spoolid
desired_type = desired_type
IMPORTING
real_type = real_type
TABLES
buffer = l_objcont
EXCEPTIONS
no_such_job = 14
type_no_match = 94
job_contains_no_data = 54
no_permission = 21
can_not_access = 21
read_error = 54.
IF sy-subrc EQ 0.
attach_type = real_type.
ENDIF.
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
EXPORTING
owner = sy-uname
region = ou_fol
IMPORTING
folder_id = l_folder_id
EXCEPTIONS
OTHERS = 5.
fill out informations about the header of the email
CLEAR: g_document.
g_document-foltp = l_folder_id-foltp.
g_document-folyr = l_folder_id-folyr.
g_document-folno = l_folder_id-folno.
g_document-objtp = c_objtp.
g_document-objdes = header_mail.
g_document-file_ext = c_file_ext.
g_header_data-objdes = header_mail.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = 'SAVE'
office_user = sy-uname
IMPORTING
authority = g_authority
TABLES
objcont = lt_body_email
attachments = lt_attachments
CHANGING
document = g_document
header_data = g_header_data
EXCEPTIONS
OTHERS = 1.
folder_id-objtp = l_folder_id-foltp.
folder_id-objyr = l_folder_id-folyr.
folder_id-objno = l_folder_id-folno.
object_id-objtp = c_objtp.
object_id-objyr = g_document-objyr.
object_id-objno = g_document-objno.
link_folder_id-objtp = l_folder_id-foltp.
link_folder_id-objyr = l_folder_id-folyr.
link_folder_id-objno = l_folder_id-folno.
REFRESH lt_rec_tab.
CLEAR lt_rec_tab.
lt_rec_tab-sel = 'X'.
lt_rec_tab-recesc = object_type. "This field for FAX/MAIL
lt_rec_tab-recnam = 'U-'.
lt_rec_tab-deliver = 'X'.
lt_rec_tab-not_deli = 'X'.
lt_rec_tab-read = 'X'.
lt_rec_tab-mailstatus = 'E'.
lt_rec_tab-adr_name = fax_mail_number.
lt_rec_tab-sortfield = fax_mail_number.
lt_rec_tab-recextnam = fax_mail_number.
lt_rec_tab-sortclass = '5'.
APPEND lt_rec_tab.
lt_rec_tab-recextnam = fax_mail_number.
lt_rec_tab-recesc = object_type.
lt_rec_tab-sndart = 'INT'.
lt_rec_tab-sndpri = 1.
APPEND lt_rec_tab.
lt_files-file = c_file.
APPEND lt_files.
begin of insertion by faianf01
hd_dat-objdes = header_mail.
CALL FUNCTION 'SO_ATTACHMENT_INSERT'
EXPORTING
object_id = object_id
attach_type = attach_type
object_hd_change = hd_dat
owner = sy-uname
TABLES
objcont = l_objcont
objhead = l_objhead
EXCEPTIONS
active_user_not_exist = 35
communication_failure = 71
object_type_not_exist = 17
operation_no_authorization = 21
owner_not_exist = 22
parameter_error = 23
substitute_not_active = 31
substitute_not_defined = 32
system_failure = 72
x_error = 1000.
IF sy-subrc > 0.
ENDIF.
end of insertion by faianf01
send email from SAPOFFICE
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
folder_id = folder_id
object_id = object_id
outbox_flag = outbox_flag
link_folder_id = link_folder_id
owner = sy-uname
check_send_authority = 'X'
TABLES
receivers = lt_rec_tab
note_text = lt_note_text
EXCEPTIONS
active_user_not_exist = 35
communication_failure = 71
component_not_available = 1
folder_no_authorization = 5
folder_not_exist = 6
forwarder_not_exist = 8
object_no_authorization = 13
object_not_exist = 14
object_not_sent = 15
operation_no_authorization = 21
owner_not_exist = 22
parameter_error = 23
substitute_not_active = 31
substitute_not_defined = 32
system_failure = 72
too_much_receivers = 73
user_not_exist = 35.
ENDIF.
ENDFUNCTION.
=================================================================================
z_send_email_fax
FUNCTION ZCBFS_SEND_MAIL.
""Interface local:
*" IMPORTING
*" REFERENCE(SRC_SPOOLID) LIKE TSP01-RQIDENT
*" REFERENCE(HEADER_MAIL) TYPE SO_OBJ_DES
*" TABLES
*" LIST_FAX_MAIL_NUMBER STRUCTURE SOLI
*" EXCEPTIONS
*" ERR_NO_ABAP_SPOOLJOB
DATA: vg_achou(1) TYPE n.
Fist part: Verify if the spool really exists
vg_achou = 1.
DO 60 TIMES.
SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
IF sy-subrc IS INITIAL.
CLEAR vg_achou.
EXIT.
ELSE.
WAIT UP TO 1 SECONDS.
ENDIF.
ENDDO.
IF vg_achou = 1.
RAISE err_no_abap_spooljob. "doesn't exist
ENDIF.
client = tsp01-rqclient.
name = tsp01-rqo1name.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = client
name = name
part = 1
IMPORTING
type = type
objtype = objtype
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 4
OTHERS = 5.
IF objtype(3) = 'OTF'.
desired_type = otf.
ELSE.
desired_type = ali.
ENDIF.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = src_spoolid
desired_type = desired_type
IMPORTING
real_type = real_type
TABLES
buffer = l_objcont
EXCEPTIONS
no_such_job = 14
type_no_match = 94
job_contains_no_data = 54
no_permission = 21
can_not_access = 21
read_error = 54.
IF sy-subrc EQ 0.
attach_type = real_type.
ENDIF.
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
EXPORTING
owner = sy-uname
region = ou_fol
IMPORTING
folder_id = l_folder_id
EXCEPTIONS
OTHERS = 5.
fill out informations about the header of the email
CLEAR: g_document.
g_document-foltp = l_folder_id-foltp.
g_document-folyr = l_folder_id-folyr.
g_document-folno = l_folder_id-folno.
g_document-objtp = c_objtp.
g_document-objdes = header_mail.
g_document-file_ext = c_file_ext.
g_header_data-objdes = header_mail.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = 'SAVE'
office_user = sy-uname
IMPORTING
authority = g_authority
TABLES
attachments = lt_attachments
CHANGING
document = g_document
header_data = g_header_data
EXCEPTIONS
OTHERS = 1.
folder_id-objtp = l_folder_id-foltp.
folder_id-objyr = l_folder_id-folyr.
folder_id-objno = l_folder_id-folno.
object_id-objtp = c_objtp.
object_id-objyr = g_document-objyr.
object_id-objno = g_document-objno.
link_folder_id-objtp = l_folder_id-foltp.
link_folder_id-objyr = l_folder_id-folyr.
link_folder_id-objno = l_folder_id-folno.
REFRESH lt_rec_tab.
LOOP AT LIST_FAX_MAIL_NUMBER.
lt_rec_tab-recextnam = LIST_FAX_MAIL_NUMBER-LINE.
lt_rec_tab-recesc = 'U'.
lt_rec_tab-sndart = 'INT'.
lt_rec_tab-sndpri = 1.
APPEND lt_rec_tab.
ENDLOOP.
lt_files-file = c_file.
APPEND lt_files.
hd_dat-objdes = header_mail.
CALL FUNCTION 'SO_ATTACHMENT_INSERT'
EXPORTING
object_id = object_id
attach_type = attach_type
object_hd_change = hd_dat
owner = sy-uname
TABLES
objcont = l_objcont
objhead = l_objhead
EXCEPTIONS
active_user_not_exist = 35
communication_failure = 71
object_type_not_exist = 17
operation_no_authorization = 21
owner_not_exist = 22
parameter_error = 23
substitute_not_active = 31
substitute_not_defined = 32
system_failure = 72
x_error = 1000.
IF sy-subrc > 0.
ENDIF.
send email from SAPOFFICE
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
folder_id = folder_id
object_id = object_id
outbox_flag = outbox_flag
link_folder_id = link_folder_id
owner = sy-uname
TABLES
receivers = lt_rec_tab
note_text = lt_note_text
EXCEPTIONS
active_user_not_exist = 35
communication_failure = 71
component_not_available = 1
folder_no_authorization = 5
folder_not_exist = 6
forwarder_not_exist = 8
object_no_authorization = 13
object_not_exist = 14
object_not_sent = 15
operation_no_authorization = 21
owner_not_exist = 22
parameter_error = 23
substitute_not_active = 31
substitute_not_defined = 32
system_failure = 72
too_much_receivers = 73
user_not_exist = 35.
ENDFUNCTION.
Please check this links for sample code.
http://www.sap-basis-abap.com/sapac018.htm
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm
http://www.sap-img.com/abap/sending-mail-with-attachment-report-in-background.htm
Regards -
Send Daily Reports via E-mail from MARS
Hi!
I want to know if the MARS can send via email daily reports to a specific account.
Thanks for any help.well, you could start by logging into the MARS CLI as pnadmin. Use tcpdump to monitor the SMTP traffic.
[pnadmin]$ tcpdump -X port 25
Now select the report and click "resubmit". You should see the SMTP traffic to the mail server. You can probably troubleshoot by looking at the ASCII output from tcpdump. If not, look at the tcpdump output and at least make sure the connection is to the right IP address and that some data is exchanged after the initial TCP handshake. Now take a look at the mail server logs, which should give you an idea of what to do next. -
How to send my report through e-mail
Hello to All
i am generating a report in report 2.5 what i want in place of sending report to printer or screen i want to send reports output through email either in html or pdf format.
please send me the solution for the same.
thanks.
nullHello to All
i am generating a report in report 2.5 what i want in place of sending report to printer or screen i want to send reports output through email either in html or pdf format.
please send me the solution for the same.
thanks.
null -
Auto pdf mail to external users
Dear Gurus,
how can we send pdf output format to external users of standard report automatically..??
how to configure the same...??
RegardsTo send e-mails of any SAP report in PDF format. Follow these steps.
Activate smtp and go to transaction sicf.
Right click in SAPconnect and select activate SMTP host.
Configure smtp and go to transaction scot.
Double click in the SMTP node of INT.
Select "node in use".
In SMTP connection enter the smtp address of your company (i.e., smtp.company.com) and the mail port (usually 25).
Click the SET Internet button and put * as the address (you can make some restrictions here, i.e., *.company.com).
Click OK.
Select settings. The default is domain.
Execute the RSPO0075 report in se38 trx and create the e-mail method "M".
Create a new output device in the SPAD transaction and enter PDF1 as the device type and M as the access method. No e-mail is required.
Thats all. Then, when you want to send any report by e-mail in a PDF format, you should pull up the report to your screen. Then go to print, select the output device created before and enter the destination e-mail address. Don't forget to select "print out immediately."
You also need to be sure to have the RSCONN01 report scheduled to run periodicaly (i.e., every 15 minutes). This report is resposible to deliver the SAPconnect objects -
Want to shedule a report in background with current system date
Dear All,
I want to schedule a report which is having date parameters in the selection screen.
What i want is that , every time in the schedulling period the report should run in current system date only with a variant.
Would it be possible.
Thanks in Advance.
With Regards
ShantanuYes possible by 2 ways.
I) This way you can use the current date dynamically
Go to your variants in change mode,
1. Check the box 'Selection Variable' for date.
2. Click on selection variables
3. Choose 'D' for dynamic date calc
4. Choose current date and save.
II)Default it in code
Default sy-datum for the selection variable.
Hope this helps. -
SharePoint 2010: Scheduled Web Analytics Reports workflow is not sending ANY email
Hello,
I've a SharePoint 2010 Enterprise farm. I setup a Scheduled Web Analytics Reports workflow in a site collection with different web analytics reports options checked. So far I've not got ANY email. When I went to Site Workflows, I'm seeing that the workflow
is running. When I click on Completed status, I see below outcome in the Workflow History section:
"Email sent but reports with no data were not attached."
And I see below information in the Workflow History list:
"Attached are the daily Web Analytics reports for 1/7/2015 through 1/7/2015 for SharePoint Site Collection
http://server/team/site scheduled by workflow "SharePoint Site Web Analytics Reports". "
I am able to generate the reports manually by going to Site Collection Web Analytics Reports, but I want to schedule them. The problem is I'm not getting ANY email in my inbox. What am I missing here? Are the emails getting filtered by Outlook or workflow
is not sending emails at all?
Please help! This is getting frustrated.
Thanks,
AshishHi Ashish,
Based on your description, my understanding is that the email is not sent from the Scheduled Web Analytics Reports workflow.
I recommend to the things below:
1. Check if the Outgoing email has been configured for the web application where you run the Scheduled Web Analytics Reports workflow.
In Central Administration > Application management > Manage web applications > select the corresponding web application > click General Settings in the ribbon and select Outgoing E-mail.
2. Make sure that your account has email address configured.
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support
Maybe you are looking for
-
Is there a way to force audio out through the Thunderbolt port?
I am trying to connect a 15" MacBook Pro to an InFocus 3916 using a Mini DisplayPort to HDMI adapter. I know that the computer, adapters, and cables I am using support audio over HDMI. I have tested 4 separate adapters, 2 cables, and 2 computers
-
Printer Sharing - Windows 7 to 10.6
I had this set up when I was running the Release Candidate of Windows 7 and I completely forgot how I set it up. When I reformatted and installed Windows 7 on my Windows XP partition on my desktop (I had Windows 7 and Windows XP installed on it but I
-
A bug in the "You're not subscribed" message
There is a bug that I wish would get fixed...................... Whenever I go to a channel that I know I am not subscribed to, such as Cinemax (Channel 420 in New Jersey), and if I don't change it from that channel and instead I watch a video on my
-
Can anybody tell abt Synchronous Fault messaging....... How mapping is done between them. Thanks Jai
-
Can't add photos to a shared album in Photos
I created a shared album in Photos with 59 photos. Only 15 were uploaded to the album and when I try to add the others, nothing happens. I highlight them, click "add" and.... nothing.