Reporting Agent - Send Mail
Hi Guys,
Bit stuck. I'm trying to set up a Send Mail Exception.
I've created a New Setting, given it a name and description, and then I think I'm spposed to drag Send Mail in Parameters tab to the right hand window, but it's not letting me? Nothing happens...
How do I proceed?
thanks
AD
Hi Sundar,
Thanks for getting back to me.
Yes, I have expanded Follow-up Actions, and can see Create Alert. When I try to drag it to the right to the Selected Objects, nothing happens?
Under Parameters, there's Characteristics, and these can be dragged to Drilldown characteristics in teh right hand window.
Quite what they are/do is anyone's guess?
AD
Similar Messages
-
Problem in executing report for sending mail with form as attachment
Hi
i created a form in SFP and creted a report for sending it as an attachment via email.When it execute the report an error messgae is displyed saying: Unable to load form for language vector E.
Please suggest.Hi,
Do you use CL_BCS class to send your forms ?
Did you pass the forms as binary file to the mail ?
I can give you sample code where all exception are process and you can see the exact error .
Best regards. -
Can i make report to send mail .
hi
i want to send an automatic mail to respective person before two days of the issue date as a warning message or any thing. I want to make it through a SAP program is it possible? if yes then give me one example or suggest me .
please .
thanks in advanced.Try using the following code.
*& Report ZEMAIL1_G
REPORT ZEMAIL1_G.
DATA: form_name TYPE RS38L_FNAM.
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop.
DATA: t_otfdata TYPE ssfcrescl,
t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: w_filesize TYPE i.
DATA: w_bin_filesize TYPE i.
DATA: fname1 TYPE string.
**********internal tables for email details ******88
DATA:
i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
Objects to send mail.
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
Work Area declarations
w_objhead TYPE soli_tab,
w_doc_chng typE sodocchgi1,
w_data TYPE sodocchgi1,
w_buffer TYPE string,"To convert from 132 to 255
Variables declarations
v_len_out LIKE sood-objlen,
v_len_in LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS :p_name type RS38L_FNAM default 'zpdf_g', "form name
p_email type somlreci1-receiver. "email address
SELECTION-SCREEN: END OF BLOCK b1.
PARAMETER: p_date LIKE sy-datum.
PARAMETER: p_rea TYPE char255.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = p_name
IMPORTING
fm_name = form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_outopt-tdnoprev = 'X'.
CALL FUNCTION form_name
EXPORTING
CONTROL_PARAMETERS = wa_ctrlop
OUTPUT_OPTIONS = wa_outopt
USER_SETTINGS = 'X'
MYDATE = p_date
REASON = p_rea
IMPORTING
JOB_OUTPUT_INFO = t_otfdata
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
ARCHIVE_INDEX = ' '
IMPORTING
bin_filesize = v_len_in
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Convert PDF from 132 to 255.
LOOP AT t_pdf_tab.
Replacing space by ~
TRANSLATE t_pdf_tab USING ' ~'.
CONCATENATE w_buffer t_pdf_tab INTO w_buffer.
ENDLOOP.
Replacing ~ by space
TRANSLATE w_buffer USING '~ '.
DO.
i_record = w_buffer.
Appending 255 characters as a record
APPEND i_record.
SHIFT w_buffer LEFT BY 255 PLACES.
IF w_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Refresh: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear w_objhead.
Object with PDF.
i_objbin[] = i_record[].
DESCRIBE TABLE i_objbin LINES v_lines_bin.
Object with main text of the mail.
i_objtxt = 'Find attached the output of the smart form.'.
APPEND i_objtxt.
*i_objtxt = 'Regards,'.
*APPEND i_objtxt.
*i_objtxt = 'Geeta'.
*APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
read table i_objtxt index v_lines_txt.
Document information.
w_doc_chng-obj_name = 'Smartform'.
w_doc_chng-expiry_dat = sy-datum + 10.
w_doc_chng-obj_descr = 'Smart form output'.
w_doc_chng-sensitivty = 'F'. "Functional object
w_doc_chng-doc_size = v_lines_txt * 255.
Pack to main body as RAW.
Obj. to be transported not in binary form
CLEAR i_objpack-transf_bin.
Start line of object header in transport packet
i_objpack-head_start = 1.
Number of lines of an object header in object packet
i_objpack-head_num = 0.
Start line of object contents in an object packet
i_objpack-body_start = 1.
Number of lines of the object contents in an object packet
i_objpack-body_num = v_lines_txt.
Code for document class
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
Packing as PDF.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
*CONCATENATE 'Smartform_output' '.pdf'
*INTO i_objpack-obj_descr.
*APPEND i_objpack.
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'Smartform'.
i_objpack-obj_descr = 'test'.
append i_objpack.
Document information.
CLEAR i_reclist.
e-mail receivers.
i_reclist-receiver = p_email.
*i_reclist-express = 'X'.
i_reclist-rec_type = 'U'. "Internet address
APPEND i_reclist.
Sending mail.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = w_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
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.
CASE SY-SUBRC.
WHEN 0.
WRITE: / 'Result of the send process:'.
LOOP AT i_reclist.
WRITE: / i_reclist-RECEIVER(48), ':'.
IF i_reclist-RETRN_CODE = 0.
WRITE 'sent successfully'.
ELSE.
WRITE 'not sent'.
ENDIF.
ENDLOOP.
WHEN 1.
WRITE: / 'no authorization to send to the specified number of recipients!'.
WHEN 2.
WRITE: / 'document could not be sent to any of the recipients!'.
WHEN 4.
WRITE: / 'no authorization to send !'.
WHEN OTHERS.
WRITE: / 'error occurred during sending !'.
endcase. -
Urgent:-REP-50152: Error while sending mail
hi
i am using reports10g. i have called a report from a form and destype=mail.
i have already mention the smtp server name in conf. file but still receiving this error
REP-50152: Error while sending mail - Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
thanksYour smtp server forbids relaying, which is very common. Often a smtp server is configured to send only mails within the same domain without authentication. Otherwise, you need a username and password for the smtp server. I'm not sure if you can configure Reports to send mail through an authenticated server.
-
Send mail as follow-up action in reporting agent
I need to send a mail with the exceptions flaoting from a query. I tried to use the follow-up action of 'send mail' in the reporting agent. that didnt work because in our SAP we're not using the exchange connector and mails cannot be sent in the regular way.
I have an external command of sending mail.
Does anyone has a way of solving this problem, meaning, using my external command of sending mail in order to send the mail with the exceptions (this command works just fine in process chains, for example, for notification of process progress)
Thank You,
Yoav.Hello Nili,
I think you can edit content and Subject etc.
http://help.sap.com/saphelp_nw2004s/helpdata/en/21/35783b82ee5d31e10000000a114084/content.htm
Hope this helps.
San. -
Send mail from reporting agent - Exception
Hello,
I am trying to send a mail as follow-up action in the reporting agent.(Version 3.0)
I am interested only in the alert details information and I mark only this flag.
I get the following mail:
message
123
Details
Breakdown Status :
New Exception
Non-critical ( Green ) : 1
: 3,302 CTN
Use the following link to go to the online
This message was sent from BW system
I still would like to edit the content of the mail. Is the only way is to change class CL_RSRA_ER_FOLLOW_UP_MAIL?
Thank you!!!Hello Nili,
I think you can edit content and Subject etc.
http://help.sap.com/saphelp_nw2004s/helpdata/en/21/35783b82ee5d31e10000000a114084/content.htm
Hope this helps.
San. -
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
zagoryHi 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 -
Send mail BEx reports or workbooks as Excel attachment
Hi BI Team
I have a requirement to mail BEx reports or workbooks to users as excel attachment , I have tried out with Reporting agent and BEx broadcaster .My system is BW3.5.
Following option used
1) Bex broadcaster but, I dont have pre calc server so this option would not work.
2) SAP AG document which creatd by durairaj using ABAP, I am getting the excel file in my outlook box but content was in ascoii
format,
3) I creatd reporting agent with print background option but dont know where to check the output.
Regards
YuvaraajPHi
Thanks for the update however, Is there any option to send mail as excell sheet without using Pre calc server.
Regards
YuvaraajP -
How to run 2 reports to send 1 PDF e-mail attachment instead of 2 e-mails.
I used 9i Reports to create 2 reports in a PDF format. I run these reports from a 9i form using the web.show_document command. XML is used to send the 2 e-mails with the reports.
Is there a way I can combine the running of the reports to make one PDF to created 1 e-mail attachment or run the reports at the same time and attach 2 PDF files to 1 e-mail.
I have no problems running 1 report and sending 1 e-mail attacment!
This is example of the XML used in creating the e-mail:
- <destinations>
- <foreach>
- <file id="Test" name="REPORT_1.pdf" format="pdf" instance="XXXX">
<include src="report" />
</file>
</foreach>
- <!-- Send a mail with an attachment
-->
- <mail id="ex1" to="&DESNAME" from="&DESNAME" subject="&DESNAME;*;&p_postal_number: was submitted for
approval on &p_postal_date">
<body srcType="text">This is to notify you of a new submission that requires an approval before being
sent to out. Please use the URL link below to review the information as soon as possible.
https://xxxx.aaaa.sss.com:234/web_html/static.html AAAA Administrator</body>
- <attach format="pdf" name="Report_1&.pdf" srcType="report">
<include src="mainSection" />
</attach>
</mail>
</destinations>You can use iText to combine two PDF files into one.
-
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 the ALV report output in mail
Dear all,
I have developed an ALV report.I need to send this output in the mail.Can anyone help me with the sample code of how to do this.Hi Ramya,
Check the links below :
http://wiki.sdn.sap.com/wiki/display/Snippets/Sending+Mail
http://wiki.sdn.sap.com/wiki/display/Snippets/AbapEMAILProgram
http://wiki.sdn.sap.com/wiki/display/ABAP/SendMessagetoExternalemailidandSAPUseridvia+ABAP
They will explain you to send an email.
Regards,
Kittu -
Sender Mail Adapter with SAP Conversion agent
have some1 used SAP conversion agent on attchment from XI Sender Mail adapter?
it seems to ignore the attchment of the e-mail
the sender configuration module tab is as follows :
1.localejbs/AF_Modules/PayloadSwapBean transform
2.localejbs/sap.com/com.sap.nw.cm.xi/CMTransformBean CM
3.sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
The paramters are
transform swap.keyName Content-Disposition
transform swap.keyName Content-Description
transform swap.keyValue attachment
transform swap.keyValue codeco
CM TransformationName ZIM_CODECO_VALIDATIONS
The Convesion Agnet runs prefectly when using the Conversion Agent engine
thx,Shai Rosenzweigcheck with tis may helpful for you
http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/frameset.htm
Regds
Abhishek -
SQL Server Reporting Services Subscriptions - Failure sending mail
Hello All,
I am having a problem with using subscriptions to send my reporting services report by email.
Getting the following error:
Failure sending mail: The message could not be sent to the SMTP server. The transport error code was 0x800ccc6d. The server response was 552 Error: message too large
While browsing for other reports in the report manager(reports created by others staffs), i could find that these reports were sent by email successfully.
So not understanding why mine has a problem. logically it could be that the report is too big?
Anybody has a solution or suggestion?
Thanking you in advanceHi LenitaS,
For first question, we can check the item "IncludeLink" to embed the link in the mail. Or, embed the link the manually by putting a link in the "Comment" field. The URL should be a standard URL Access:
http://<reportserver>/reprotserver?/reportpath&rc:format=<format>
For the second question, you are right. We can follow these setps to work around the issue:
1.Create a file shared subscription, save the export to a shared folder.
2.Create a E-Mail delivery subscription, embed the file's path in the mail. We can set the file's path in "Comment" field of the E-Mail delivery. The path should be someone like this:
\\<sharedfolder>\<export report>
In this case, the exported report's name cannot be dynamic.
If there is anything unclear, please feel free to ask.
Thanks,
Jin ChenJin Chen - MSFT -
How to Convert Report into Excel Sheet when Sending Mail.
Dear Friends,
i want to send mail to HOD of Product with an Excel Sheet .
i want to send Pending Issue details to HOD in Excel Sheet attachment .
here i have pending issue report now i need to send it in Excel Sheet attachment .
i have table where i have manage Product ID and HOD OF PRODUCT.
CREATE TABLE "MAP_USER_PRODUCT_DTL"
( "ID" NUMBER NOT NULL ENABLE,
"PRODUCT_ID"NUMBER,
"USER_ID" VARCHAR2(5) NOT NULL ENABLE,
"HOD_PROD" VARCHAR2(100)========================================Value is Y OR N IF HOD then Y else N
CONSTRAINT "MAP_USER_PRODUCT_DTL_PK" PRIMARY KEY ("ID") ENABLE
/i have one more table where all complete issue detail insert.
CREATE TABLE "CRM_ISSUE_PROBLEM"
( "ID" NUMBER,
"SUBJECT" VARCHAR2(255) NOT NULL ENABLE,
"CLIENT_ID" NUMBER,
"ASSIGNED_TO_ID" VARCHAR2(100),
"ASSIGNED_ON" DATE,
"DESCRIPTION" VARCHAR2(4000),
"PRODUCT_ID" NUMBER NOT NULL ENABLE,
"STATUS_ID" NUMBER NOT NULL ENABLE,
CONSTRAINT "CRM_ISSUE_PROBLEM_PK" PRIMARY KEY ("ID") ENABLE
Here STATUS_ID is Like Pending ISsue,Open Issue and Close Issue .i want to send mail to HOD with Pending Issue Report convert into Excel Sheet and send to HOD?
How can i do this.
Thanks
Edited by: Vedant on Oct 12, 2011 12:36 AM
Edited by: Vedant on Oct 12, 2011 2:22 AMHello Vedant,
Would it suffice if you send a CSV file?
If yes, then see following code.. run the code under APEX > Home > SQL Workshop > SQL Commands
DECLARE
ln_id NUMBER;
lc_clob CLOB;
lb_blob BLOB;
li_in PLS_INTEGER := 1;
li_out PLS_INTEGER := 1;
li_lang PLS_INTEGER := 0;
li_warning PLS_INTEGER := 0;
lv_mail_rcpts VARCHAR2(2000) := '[email protected]';
lv_mail_from VARCHAR2(100) := '[email protected]';
lv_clmn_separator VARCHAR2(1) := ',';
BEGIN
-- Build file content as CLOB
-- Replace with your query
FOR i IN (select object_id A, object_name B, object_type C, status D, temporary E, generated F, secondary G,namespace H from user_objects where rownum < 10)
LOOP
IF lc_clob IS NULL THEN
lc_clob := i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
ELSE
lc_clob := lc_clob||CHR(10)||i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
END IF;
END LOOP;
-- Convert CLOB to BLOB
DBMS_LOB.CREATETEMPORARY(lb_blob,TRUE);
DBMS_LOB.convertToBlob(lb_blob,lc_clob,DBMS_LOB.LOBMAXSIZE,li_in,li_out,DBMS_LOB.DEFAULT_CSID,li_lang,li_warning);
-- Send mail
ln_id:= APEX_MAIL.SEND(
p_to => lv_mail_rcpts,
p_from => lv_mail_from,
p_subj => 'Subject Goes here',
p_body => 'Body goes here'
-- add CSV file as attachment
APEX_MAIL.ADD_ATTACHMENT
p_mail_id => ln_id,
p_attachment => lb_blob,
p_filename => 'filename.csv',
p_mime_type => 'application/csv'
-- push mail queue
APEX_MAIL.PUSH_QUEUE;
-- empty temporary space
DBMS_LOB.FREETEMPORARY ( lob_loc => lb_blob);
COMMIT;
END;Regards,
Hari -
Hi All,
I added the mailserver part in the rwbuilder.conf file.This is how it looks
<pluginParam name="mailServer">smtp.xxx.com</pluginParam>
The smtp server of our company is working fine.
Now when i am sending mail frm report builder i am getting the error.
Pls tell me .....
Do i have to configure any other file?
Should the smtp server be running in my local machine?WHAT IS THE SOLUTION ...FOR THIS PROBLEM?
Please someone give me some guidance..
regards,
ashokHi,
Pls give some idea ......
your reply will be greatly appreciated.
regards,
ashok
Maybe you are looking for
-
I upgraded my nephew's Ipod Touch and. . .
When he tries to get into the app store, it asks for (my) user name and password and credit card number. Is there any way to avoid this or change this so that he can download free apps without "borrowing" my password or credit card number?
-
Acrobat 9.0 pro extended: copying / pasting highlights to word
Hi there I've highlighted a number of paragraphs in a document, thinking that I would then just be able to quickly select the highlights and copy and paste them into a word doc. But although I can select a highlight, I can't copy / paste it :-/ Any h
-
REPLACING THE PRIMARY INTERNAL BATTERY 601
MY PAVILION dv6-2150ev tells me i must replace the primary internal battery 601. i do no know which is this battery and how to change it
-
I aim to create an app for iPad and android tablets which would be updated twice yearly with revised content. I understand that in order to achieve this I would need at least a 'Professional' DPS subscription. My intentions were to subscribe to 'Prof
-
Exporting to PST daily - Office 2010
Hi all, I was wondering if someone could give me some advice? Our MD likes having control of his emails (mainly the backing up of them), so has just exported all emails into PST (File --> Open --> Import --> Export to file --> Export to PST --> his e