How to send result of a report as an email
hi experts,
how to send the result of a report as an email to the user.
plz help
regards,
malleswari.
Hi,
Check this Weblog:
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
Check these link as well..
http://www.sap-img.com/abap/sending-email-with-attachment.htm
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
I did a search in the forum, an di found lot of threads to send mail from ALV ....
Look at the below threads
How to send ALV list report as html attachment in a mail??
https://www.sdn.sap.com/irj/sdn/forumsearch
How to send ALV report by mail
Re: How to send an ALV Grid Report to SAP user mail ?
Re: How to send an ALV Grid Report to SAP user mail ?
Have a look at below code:
REPORT ZSENDEXTERNAL.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
Creation of the document to be sent
File Name
DOC_CHNG-OBJ_NAME = 'SENDFILE'.
Mail Subject
DOC_CHNG-OBJ_DESCR = 'Send External Mail'.
Mail Contents
OBJTXT = 'Minimum bid : $250000'.
APPEND OBJTXT.
OBJTXT = 'A representation of the pictures up for auction'.
APPEND OBJTXT.
OBJTXT = 'was included as attachment.'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
Creation of the document attachment
(Assume that the data in OBJBIN is in BMP format)
*OBJBIN = ' O/ '. APPEND OBJBIN.
*OBJBIN = ' | '. APPEND OBJBIN.
*OBJBIN = ' / '. APPEND OBJBIN.
*DESCRIBE TABLE OBJBIN LINES TAB_LINES.
*OBJHEAD = 'PICTURE.BMP'.
*APPEND OBJHEAD.
Creation of the entry for the compressed attachment
*OBJPACK-TRANSF_BIN = 'X'.
*OBJPACK-HEAD_START = 1.
*OBJPACK-HEAD_NUM = 1.
*OBJPACK-BODY_START = 1.
*OBJPACK-BODY_NUM = TAB_LINES.
*OBJPACK-DOC_TYPE = 'BMP'.
*OBJPACK-OBJ_NAME = 'PICTURE'.
*OBJPACK-OBJ_DESCR = 'Representation of object 138'.
*OBJPACK-DOC_SIZE = TAB_LINES * 255.
*APPEND OBJPACK.
Completing the recipient list
RECLIST-RECEIVER = '[email protected]'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
*RECLIST-RECEIVER = 'SAPUSERNAME'.
*RECLIST-REC_TYPE = 'P'.
*APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
WRITE: / 'Result of the send process:'.
LOOP AT RECLIST.
WRITE: / RECLIST-RECEIVER(48), ':'.
IF RECLIST-RETRN_CODE = 0.
WRITE 'The document was sent'.
ELSE.
WRITE 'The document could not be sent'.
ENDIF.
ENDLOOP.
WHEN 1.
WRITE: / 'No authorization for sending to the specified number',
'of recipients'.
WHEN 2.
WRITE: / 'Document could not be sent to any recipient'.
WHEN 4.
WRITE: / 'No send authorization'.
WHEN OTHERS.
WRITE: / 'Error occurred while sending'.
ENDCASE.
Reward points if this helps.
Manish
Message was edited by:
Manish Kumar
Message was edited by:
Manish Kumar
Similar Messages
-
How to send a Patch Impact report to a user?
Hi:
This is for 12.1.3, 10g on linux. Would please someone tell me how to send a Patch impact report to a user. She doesnot want to go to EBS to look and I asked me to send her a report. I have looked but didn't see anywhere I can do that. Please guide me.
Thanks and regards873768 wrote:
I ran a patch analyzer from OAM and got a report from "Impact". I was hoping the func person can also login to the OAM and see there. But she wants me to send a report to here. But when you click on the "Impact" There is no single report but a lot of clicks. I am asking if there is way to copy/download the report?
Nayas has already answered this question -- You can save the report (File > Save As) or take a screenshot or whatever is convenient for you and send it to the user.
Thanks,
Hussein -
How to send results from Captivate 7 to PHP?
Hello!
I need to send quiz results to PHP server. In Captivate 5 i did it with settings reporting by e-mail, than parcer data and send results to PHP server.
In Captivate 7 this settings unevalible.
How to do it now?
I have tryed some cases:
1. Use settings Internal Server - but it show dialog box where user have to put his name and e-mail. I dony need it! My script knows who try to pass quiz.
2. I try to use this code :
<script type="text/javascript">
document.getElementById('Captivate').focus();
document.Captivate.focus();
function getData(){
var cp = document.Captivate;
cp.cpEIGetValue("m_VarHandle");
</script>
<a onclick="getData();" href="#" > get data</a>
But it generate erorr Uncaught TypeError: undefined is not a function
on line cp.cpEIGetValue("m_VarHandle");
What can i do ?var cp = document.Captivate;
alert (cp);
alert(document.Captivate.cpEIGetValue("m_VarHandle.cpQuizInfoTotalCorrectAnswers"));
first alert work ok
second gives the same error Uncaught TypeError: undefined is not a function (( -
How to send a character mode report from Oracle Form 10g to a printer.
how sending a character mode report from Oracle 10g report to a printer.
I'm sending to a printer located in the network
i have theses parameter report
desformat = prtname
desname=??????
destype= ?????
mode=character
i would like to preview the report before to send to a printer
sldsACCOUNTING SYSTEM
2006-2007 From Date : 01-JUL-06
Printed On : Friday August 31 2007 11:13 AM To Date : 30-SEP-07
G A/C. Code 99-99-9999 Description: xxxxxxxxxxxxx H
-- DOC. # -- -- DATE -Chq/Slip# ---------- N A R R A T I O N -- -- DEBIT -- -- CREDIT -- -- BALANCE --
Opening Balance: -999,999,999.00 Cr.
G *** Total *** 0.00 0.00 -999,999,999.00H
================= ================= =================
when i run character mode report in browser then display this output properly
but sir problem is that when i print the report
G(use for bold)
is not working
means not print in bold format in printer
same character print G
do you have any idea when i print through browser to printer G for bold purpose its work to printer ? -
How to display results of a report based on current year
Hi,
Please advice me for the following requirement.
I have a report which is having sales results, which is having year column also. Report has to be displayed based on the current year. Now it is 2013. I should show current year results only i.e 2013.
In 2014, i should show only 2014 results. How to achieve this at a report level.
regards
CK.Hi CK,
You are having Data for 2014 also. If not means, you can use sql query select max(year) from period.
So it will show the final maximum end of the year(2013) from database.
You can use dashboard prompts too. in the prompt also you can have specific year or sql query
http://mkashu.blogspot.com
Regards,
VG -
How to send results to actionscript using java
Hi,
I do RPC using HttpService.
In my situation, I need to send results from Java code to
Flex Action script. I have defined a Java Servlet receiving data
from Flex application, then it processes with the data, finally the
Servlet is supposed to send some feedbacks to the client(Flex).
My question is that how can I define codes in doPost() method
that the following function will get "result" from the Java side.
public static function httpResult(event:ResultEvent):void
var result:Object = event.result;
//Do something with the result.
if (result.toString() == "success")
resultMessage.text = "Login Success";
resultMessage.text = "Invalid User";
}Hi,
Try this: If you are sending a simple text as "sucess" or
"error" after doing some process in the servlet..
set your content type to "text/plain" and simply
println(<data to be sent>);
In the flex application, get the result text that the servlet
send using:
resultString = String(httpUrl.lastResult);
where httpUrl is the id of the HTTPService. Now you can
compare what the servlet send by:
if(resultString=="sucess") {
Hope this solves your problem :)
Regards,
-- Abdel Olakara
http://olakara.googlepages.com
http://technopaper.blogspot.com -
How to send results to actionscript using java via HttpService
Hi,
I do RPC using HttpService.
In my situation, I need to send results from Java code to
Flex Action script. I have defined a Java Servlet receiving data
from Flex application, then it processes with the data, finally the
Servlet is supposed to send some feedbacks to the client(Flex).
My question is that how can I define codes in doPost() method
that the following function will get "result" from the Java side.
public static function httpResult(event:ResultEvent):void
var result:Object = event.result;
//Do something with the result.
if (result.toString() == "success")
resultMessage.text = "Login Success";
resultMessage.text = "Invalid User";
}I advise having your servlet build an xml string, maybe put a
status attribute in the root tag, like this:
<myroot status="success">
<mytext>Some text</mytext>
</myroot>
and return that to the calling Flex client. XML is easier to
work with than Object. On the HTTPService tag, set
resultFormat="e4x", and it will return plain XML.
then in the handler, do:
var xmlResult:XML = XML(event.result); //this will already be
the myroot node
//Do something with the result.
if (xmlResult.@status== "success") //reads the status
attribute
resultMessage.text = xmlResult.mytext.text(); //get the
value of themytext text() node
resultMessage.text = "Error";
Tracy -
How to send a oracle application report automatically to a specific e-mail
hi!!!!!
how to automatically send a mail once the oracle application report is generated ??
It should happen automatically...
Do we have to use any function for that??? or is there any other way of doing it???You can use utl_smtp package in the after report trigger to send mail after the report run is completed.
for example look at my post
Re: Sending concurrent program output as an Email to a distribution list -
How to send an ouput as PDF attachment to email
Hi,
We have a 'Z' output for a delivery document. The output has the standard RLE_DELNOTE driver program and a Zsmart form assigned to it. We need to send the output as an attachment to email. Can some one please adivice how this can be achieved?
Thanks in advance
KatHi,
Plz try following steps.
1. Note the spool request No.
2. In T/code SE38, Enter The programme and execute.
3. In sub Object- Click Documentation and then do debuggung.
4.Enter spool request no and desired location and execute.
5. In ABAP Debugger- Use F8 key.
6. Select the desired location and file name and save.
View the desired output in PDF and can be sent through mail.
Hope this helps.
Regards,
Jaiprakash.P.T -
How to send word file as attachment in an email
Hi All,
I have a scenario where the a word document is sent using a file adapter and mail adapter puts it as an attachment and sends it to designated email group.
Now the issue is the attachment that I am getting is text file, but i want it to be a word format file.
Pls advice..
XierHi,
Just give this a shot.
In the file adapter.
Set Additional File(s) .
and follow this document how to send additional file, rules and naming conventions and parameters.
http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
Itz simple.
<b>Cheers,
*RAJ*</b>
I -
How to send mail to portal inbox and user email id in ESS leave workflow ?
Hi
currently i am working on sap ess workflows . i have customized standard workflow (ws12300111) where when manager approvesor rejects the leave in portal, mail has to send to user's portal inbox and email id assigned to user .
in workflow level - i have used 'sendmail' step and given agent as initiator . now mail is going to sap inbox .
can you please guide me (step by step if Posiible) how should i do it.
Regards,
Sreeharsha.
Points will be rewarded.mail has to send to user's portal inbox and email id assigned to user
Not sure if you want a email or SAP mail. Can you clarify the above statement?
If you want to send a notification mail which needs to be displayed in UWL
Search for keyword SONIC in this forum and blogs section. You will get the solution
If you want to send a notification email to the email id of the user
You need to determine the email id of the user and use the sendmail step to send email (your SCOT settings need to be condigured by your BASIS team)
Thanks,
Prasath N -
How to Send Custom Purchase Order Report in PDF format to Supplier through email
Hi,
Currently whenever a PO is approved in PO form if Email Option is enabled it is sending the standard report output to the supplier, we need to replace the custom designed report instead of the standard report. How to achieve this, is there any need to modify the stuff in Workflow, if so what activity need to modify.
Thanks in Advance.Attach your custom PDF report XML template related to the POXPOPDF program.
-
How to send values from a "Report Column" instead of a "Page Item" ?
Hi there,
Here's my case: Two pages A and B.
Page A is used to view each employee from a selected department.
Page B is used to created/modify employees.
I have a create button on page A which redirect to page B.
By default, page B is blank (as of course we have to fill the blanks to create a new employee).
However, there is 2 values I want to send to page B (as I'd like to pre-fill some blanks) : The department ID and the Manager ID (there is one manager per department).
---- I succeed with the department ID because it's a page item and in the "Action When Button Clicked" of the button I filled "Set These Items" -> Item From Page B "With These Values" -> Item from Page A.
---- I'm confused with the Manger ID because it is not a page item but a report column and there is nothing to do like I did for the Department ID in the create button.
I'm a bit lost cause I don't know how to transfer/send this value to the second page.
Do you have any clue ?
Thanks again for your time !
BR
UlrichUlrich,
Maybe I have misunderstood your requirements, from those I assumed that Page 4 was already being populated with a Department ID. So my plan was to look-up the Manager ID via the known Department ID
Here's my case: Two pages A and B.Page A is used to view each employee from a selected department.
Page B is used to created/modify employees.
I have a create button on page A which redirect to page B.
By default, page B is blank (as of course we have to fill the blanks to create a new employee).
However, there is 2 values I want to send to page B (as I'd like to pre-fill some blanks) : The department ID and the Manager ID (there is one manager per department).
---- I succeed with the department ID because it's a page item and in the "Action When Button Clicked" of the button I filled "Set These Items" -> Item From Page B "With These Values" -> Item from Page A.
---- I'm confused with the Manger ID because it is not a page item but a report column and there is nothing to do like I did for the Department ID in the create button.>
Have you verified that you have the :P4_DEPARTMENT_ID in session?
Does your SQL run in SQL Commands when provided a Department ID?
Have you tried altering when the Computation fires? I recommended to start with After Regions, try some other firing points.
Jeff -
How to send multiple parameters to reports with REPORT_DESTYPE,FILE
Dear members,
I have the following code which call a REPORT from a FORM, and send the REPORT to printer:
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'xtran_id='||:tran_id||' paramform=no');in the following line I want to send 2 parameters.
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'xtran_id='||:tran_id||' &p_user='||:user||' paramform=no');here i have added the 2nd parameter, but its not printed on report.
where am I wrong?
Regards:
Edited by: user2040934 on Jan 17, 2013 3:50 PMuser2040934 wrote:
Dear AlexDiniasi ,
thanks for you reply.
here my code:
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'xtran_id='||:ws_sale_m.tran_id||' '||'p_username='||:dummy.user||' paramform=no');but didn't find / show the 2nd parameter on report p_username, how to debug? where am I wrong?Hi,
Add the following line at DECLARE Section
QT VARCHAR2(10) :='''';then try the following line instead of u'r line
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no xtran_id='||QT||:ws_sale_m.tran_id||QT||' p_username='||QT||:dummy.user||QT);Hope this works...
Hamid
If someone's response is helpful or correct, please mark it accordingly.* -
JDBC- RFC - JDBC How to send result set to rfc ?
Hi Friends ,
I am working on scenario like .
<b> I have to read data from a sql server using select statement and send same data to r3 ( using RFC we are inserting the same as a copy ) .
Then i have have get confirmation from R3 as data inserted succesfully - Flag .Then we have to come back to same table and update one field flag as 'U'.</b>
For this I am using JDBC Sender Adapter and RFC Receiver Adapter .Will i use as Synchronous Interface ?
I think i have to use JDBC Receiver Adapter also to Complete the cycle .
Can you please clarify the following....
1. how is that whole selected data will send to R3 . If i use Select statement in JDBC Sender Adapter it will as resultset .It will contain Multiple Rows right ? Our RFC Will accept the parameter as string .
2. If we use the synchronous Interface will it send row by row from the result send Then get back the result from R3 and come back again to JDBC ( Database ) and update the required field ?
3. In JDBC Sender Adapter , the Update Parameter doing the Updation Part prior to get the status from R3. How to handle this ?
4. Do i need to configur teh separate JDBC Receiver adpater for this updation part ? Then We cann't use Synchronous Interface right ?
5 . Will JDCB Sender Adapter get the result set (by select statement ) and send to r3 as row by row and get the confirmation message as inserted ?
Best Regards .,
V.RangarajanHi Udo ,
Thanks for your reply . If i have used the synchronnous RFC Calls , that RFC will return the flag as 'Y' or 'N' , for Either succesfully inserted or Not successful .
In this synchronous how can i use the JDBC Receiver adapter ?
If 'Y' or 'N' I have to update the<b> same table ,same row</b> which have sent to RFC . My doubt , we are wrirtng the SQL select query as " <b>select * from table name where UpdateStatus is null</b> " .
So it will return multiple rows right ? I have to uses the synchronous response form RFC to update the row of the same table using JDBC Adapter right ?
Can you please explain me little bit more ? I am new to xi .
Best Regards .,
V.Rangarajan
Maybe you are looking for
-
ITunes Music files taking too much space???
In my innocence, I had imagined that the storage requirements of iTunes would match those of my iPod. The iTunes programme now tells me that I have 6,694 songs in my library, using 46.43 GB of space. However, my iTunes Music directory boasts 10,278 f
-
How do I add locations to photos through iPhoto on iPad?
Hi There, I have tried searching through the forums to find an answer to this but can't seem to find it, but apologies if I've just completely missed this and it has been covered! My understanding is that when you want to add a location to a photo th
-
Why does my iPad drop from my Safari session?
Since I upgraded my iPad to version 5.0.1 my Safari session drops in the middle of whatever I'm doing. Anyone else having this problem?
-
Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party. Are you sure you want to continue sending this information? I get two options: Continue or Cance
-
I am trying to run USMM report in our BI system (SAP EHP 1 for SAP NetWeaver 7.0). I am running into error when I run "System Measurement" report in USMM. Error message I encounter: Error during price list-specific measurement - BV140 Steps I followe