How to send the content of an agent (PDF Report) to local machine in 11g
Hi all,
I want to export my reports (PDF format) from an agent on a local disk.
Through an action such as javascript. After more research I do not find a solution.
Someone should track it on the subject?
Best regards,
Ben
Of course !
This is the javascript :
**var fso=new ActiveXObject("Scripting.FileSystemObject");**
**var maintenant=new Date();**
**var jour=maintenant.getDate();**
**var mois=maintenant.getMonth()+1;**
**var an=maintenant.getFullYear();**
**var MaDate = jour + " " + mois + " " + an;**
**var fileName = ['E:\\Extranet\\Reports\\'] + MaDate + " " + Parameter(1) + ['.xls'];**
**var fooFile = fso.CopyFile(Parameter(0), fileName, true);**
(NB : the var MaDate is just for me to specify the date in the filename)
You must also create an action to invoke the javascript. Follow the link to see an example http://hpics.li/7cf7d3e
Best regards,
Ben
Similar Messages
-
ADF : how to send the content of a selectInputText to a dialog
Greetings,
I have linked a selectInputText to a dialog.
I need to transmit the content of the text field to the dialog window.
Does ADF provide a simple way to to do this?Thanks.
In my case, the 'row' variable is not linked to my selectInputText.
So, row.textField does not return anything.
I tried assigning it an ID ( e.g. id="theField" ) and using it in the 'from' field ( e.g. #{theField.textField} ), but it did not work either.
What should I do? -
How to send the content as HTML in email?
Hi,
I need to develop a program which sends email in HTML format.
Can u advice me how to do this????
Thanks,
NeerajHi,
You simply set the doc_type to 'HTM' instead of the default 'RAW'.
Regards,
Darren -
How to send the file contents in the application server to ftp server
Hi,
how to send the file contents in the application server to ftp server.
regards,
sreeTest SAP FTP functions
DATA: BEGIN OF MTAB_DATA OCCURS 0,
LINE(132) TYPE C,
END OF MTAB_DATA.
DATA: MC_PASSWORD(20) TYPE C,
MI_KEY TYPE I VALUE 26101957,
MI_PWD_LEN TYPE I,
MI_HANDLE TYPE I.
START-OF-SELECTION.
MC_PASSWORD = 'password'.
DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
*-- FTP_CONNECT requires an encrypted password to work
CALL 'AB_RFC_X_SCRAMBLE_STRING'
ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
ID 'DSTLEN' FIELD MI_PWD_LEN.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
USER = 'userid'
PASSWORD = MC_PASSWORD
HOST = 'servername'
RFC_DESTINATION = 'SAPFTP'
IMPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
NOT_CONNECTED = 1
OTHERS = 2.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
HANDLE = MI_HANDLE
COMMAND = 'dir'
TABLES
DATA = MTAB_DATA
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
LOOP AT MTAB_DATA.
WRITE: / MTAB_DATA.
ENDLOOP.
ELSE.
do some error checking.
ENDIF.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
OTHERS = 1.
Execute external commands (FTP Scripts)
The following code shows the syntax of the FM 'SXPG_COMMAND_EXECUTE'. You pass it the external command created within transaction SM69 and it will execute it.
DATA: ld_comline
LIKE sxpgcolist-name,
ld_param LIKE sxpgcolist-parameters,
ld_status LIKE extcmdexex-status,
ld_output LIKE btcxpm OCCURS 0 WITH HEADER LINE,
ld_subrc LIKE sy-subrc.
REFRESH ld_output.
MOVE 'FTP_DATA_IN' to ld_comline. "Maintained using trans SM69
Execute external command, contained in 'ld_comline'
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = ld_comline
additional_parameters = ld_param "Params passed to script
operatingsystem
= 'UNIX'
IMPORTING
status = ld_status
TABLES
exec_protocol = ld_output
EXCEPTIONS
no_permission
= 1
command_not_found
= 2
parameters_too_long
= 3
security_risk
= 4
wrong_check_call_interface = 5
program_start_error = 6
program_termination_error = 7
x_error = 8
parameter_expected = 9
too_many_parameters = 10
illegal_command = 11
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry
= 13
jobcount_generation_error
= 14
OTHERS
= 15.
IF sy-subrc NE 0.
ENDIF. -
How to transfer the content in a StringBuffer into a InputStream
I need append the comment to the buttom of each file. I read the file into the stringbuffer first, appending the comments. After completed, how can I send the content in the StringBuffer back into a InputString in order to continue with some other file manipulation?
I saw a method StringBuffer.toString(), but nothing to transfer back to InputString
Thank you in advanceHow aboutnew StringReader(sb.toString());Since you are working with text data, you should be working with Readers instead of InputStreams.
(And if you are appending data to a file, wouldn't it be more effective to just use the version of FileWriter that allows you to append the data, instead of reading the whole file and writing the updated file back?) -
Help on how to read the content of an XML file from the payload
I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
Im trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
In the Bean I want to read the content of the attached XML file, it could be the order number.
The filename should then be Order number.XML.
<u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
<i><b>Frank</b></i>hi,
check this: http://jakarta.apache.org/poi/ -
How to fecth the contents of a mail from the server by using jsp
hi
Can any body tell me how to fetch the contents of mail from the server by using javamail api...please send me code if some one have
bye.hi
Can any body tell me how to fetch the contents of mail from the server by using javamail api...please send me code if some one have
bye. -
How to send the payload to a jsp using receiver Http adapter?
Hi experts,
I have this scenario from Legacy to XI to external app server.I have a test jsp to execute that functionality .Its a jsp which has 1 textarea named "test" and when I click on the submit buton I get a response back.This way I am able to test this independently.Now from XI when I am executing my scenario I am getting status code '1250' and message as ' http request(test) is null'.Now in the scenario in http adapter I just provide the target host : ip of server ,
service number : port no ,
path: the container or the request handler. But this scenario fails and gives me the above erroneous response.Now Basically I am not able to get how to send the value to the textarea "test"? please provide help as soon as possible.Do we have to put the name of the jsp in the "path" in http adapter and use prolog as test=.I tried this but it doesnt work.
Is there any way to check the URL that it forms after appending the querystring in the url ...?
So please provide help on this or suggest a solution to [email protected] as soon as possible.....
Thanx in advance.
Akshatahey Shekhar,
thanx for that prompt reply but I have configured the communication channel in the same manner as suggested by u.
actually I have this jsp page http://xx.xx.xx.xx:8080/abcdef/try/efg.jsp where there is a textarea "test" which has to be filled and there is a submit button.When I test this http client i.e the above jsp page independently then it goes to handler
http://xx.xx.xx.xx:8080/abcdef/trial/ And it gives a proper response message after clicking on the submit button.
now I want to carry out the same using receiver http adapter. I need to pass the value for this inputfield names "test" on that jsp . so right now I have configyured the adapter as
addressing type: url
target host : xx.xx.xx.xx
service no:8080
path : here I have given the path of handler i.e /abcdef/trial I tried giving the jsp page also but logically I guess it should be the handler.
content type: text/xml; charset=iso-8859-1
xml code: UTF-8
Mask special characters (URL escaping) checked.
now since the name of the inputfield is "test" in the prolog I gave test=
But it doesnt work I get this error "http request parameter [test] is null" in the response message which I guess suggests that it is not able to send the value for the field"test" to that handler.Please suggest how to send this and tell me if there are any other configurations that I have to do in the receiver communication channel.
Thanx ,
Akshata -
Mailto link to send the content of the page when clicked.
I want to set up a mailto link that sends the contents of the page to a predefined address when clicked. I want this to work from a webpage viewed on an iPad as well as a desktop computer. If this is possible, how do I do it?
You cannot, but you may be able to send the link to an address, just not the webpage content itself.
-
How to send the report output to the application server in a excel file
Hello,
how to send the report output to the application server in a excel file.
and the report runs in background.
Thanks in advance.
SundeepDear Sundeep.
I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
D A T A D E C L A R A T I O N *
TYPES: BEGIN OF TY_EXCEL,
CELL_01(80) TYPE C,
CELL_02(80) TYPE C,
CELL_03(80) TYPE C,
CELL_04(80) TYPE C,
CELL_05(80) TYPE C,
CELL_06(80) TYPE C,
CELL_07(80) TYPE C,
CELL_08(80) TYPE C,
CELL_09(80) TYPE C,
CELL_10(80) TYPE C,
END OF TY_EXCEL.
DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
WA_EXCEL TYPE TY_EXCEL..
E V E N T : S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Here you populate the Internal Table.
Display - Top of the Page.
PERFORM DISPLAY_TOP_OF_PAGE.
E V E N T : E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
SET PF-STATUS 'GUI_STATUS'.
E V E N T : A T U S E R - C O M M AN D *
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'EXPORT'.
Exporting the report data to Excel.
PERFORM EXPORT_TO_EXCEL.
ENDCASE.
*& Form DISPLAY_TOP_OF_PAGE
text
--> p1 text
<-- p2 text
FORM DISPLAY_TOP_OF_PAGE .
SKIP.
WRITE: /05(128) SY-ULINE,
/05 SY-VLINE,
06(127) 'O R I C A'
CENTERED COLOR 1,
132 SY-VLINE.
WRITE: /05(128) SY-ULINE,
/05 SY-VLINE,
06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
CENTERED COLOR 4 INTENSIFIED OFF,
132 SY-VLINE.
WRITE: /05(128) SY-ULINE.
E X C E L O P E R A T I O N
CLEAR: IT_EXCEL[],
WA_EXCEL.
PERFORM APPEND_BLANK_LINE USING 1.
WA_EXCEL-cell_02 = ' XYZ Ltd. '.
APPEND WA_EXCEL TO IT_EXCEL.
CLEAR: WA_EXCEL.
WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
APPEND WA_EXCEL TO IT_EXCEL.
PERFORM APPEND_BLANK_LINE USING 1.
ENDFORM. " DISPLAY_TOP_OF_PAGE
*& Form APPEND_BLANK_LINE
text
-->P_1 text
FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
DO P_LINE TIMES.
CLEAR: WA_EXCEL.
APPEND WA_EXCEL TO IT_EXCEL.
enddo.
ENDFORM.
*& Form EXPORT_TO_EXCEL
text
--> p1 text
<-- p2 text
FORM EXPORT_TO_EXCEL .
DATA: L_FILE_NAME(60) TYPE C.
Create a file name
CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
'.' SY-DATUM+0(4) INTO L_FILE_NAME.
Pass the internal table (it_excel which is already populated )
to the function module for excel download.
CALL FUNCTION 'WS_EXCEL'
exporting
filename = L_FILE_NAME
tables
data = IT_EXCEL
exceptions
unknown_error = 1
others = 2.
if sy-subrc <> 0.
message e001(ymm) with 'Error in exporting to Excel.'.
endif.
ENDFORM. " EXPORT_TO_EXCEL
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
Regards,
Abir
Don't forget to award Points * -
I need this file "How to Use the Content Conversion Module in JMS Adapter"
Can someone send me this file:
"How to Use the Content Conversion Module in JMS Adapter"
I am not able to find it.
Thanks
Antonellopls refer guide
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-adapters/how%20to%20use%20the%20content%20conversion%20module%20with%20xi%203.0%20j2ee%20jms%20adapter.pdf
Regards,
Swetha. -
How to change the Content-Transfer-Encoding for the fmddataa.fmd from base
Dear all,
When I using this SO_DOCUMENT_REPOSITORY_MANAGERto send email,I find the fmddata.fmd file have been changed to binary file attachment. I don't hope so.any one have good idea to avoid this case occur?
Can you tell me how to change the Content-Transfer-Encoding for the fmddata.fmd from base64 to quoted-printable. The quoted-printable is the Content-Transfer-Encoding for text file with extension .txt
Best Regards,
MerryThank you
-
How to Send the material master data from sap4.6c to ECC6.0
Hi
Friends this is shalini Shah, i got one requirement that is
how to send the materail master data from SAP 4.6C to ECC6.0 using XI.
i know the file to idoc and idoc to file scenarios but i don't know this one.
please help me friends, Thanks in advance.
Regards
Shalini ShahHi Shalini,
To trigger IDoc these configurations should be done in the SAP 4.6, XI and ECC 6.0.
SAP XI
1) RFC Destination (SM59)
a) Choose create.
b) Specify the name of the RFC destination
c) Select connection type as 3 and save
d) In the technical settings tab enter the details SAP SID/URL and system number#.
e) Enter the Gateway host as same details above SID/URL.
f) Gateway service is 3300+system number#.
g) In the Logon /Security tab, enter the client user & Password details of Destination system.
h) Test the connection and remote logon.
2) Create Port (IDX1)
a) Select create new button
b) Enter the port name as SAP+SID (The starting char should be SAP)
c) Enter the destination client.
d) Enter the RFC Destination created in SAP R/3 towards other system.
e) Save
3) Load Meta Data for IDOC (IDX2)
a) Create new
b) IDOC Message Type
c) Enter port created in IDX1.
SAP R/3 (4.6 and ECC 6.0)
1) RFC Destination (SM59)
a) Choose create.
b) Specify the name of the RFC destination
c) Select connection type as 3 and save
d) In the technical settings tab enter the details SAP SID/URL and system number#.
e) Enter the Gateway host as same details above SID/URL.
f) Gateway service is 3300+system number#.
g) In the Logon /Security tab, enter the client user & Password details of Destination system.
h) Test the connection and remote logon.
2) Create Port (We21)
a) First Select Transactional RFC and then click create button
b) Enter the destination port name as SAP+SID (The starting char should be SAP)
c) Enter the destination client.
d) Enter the RFC Destination created in SAP R/3 towards other system.
e) Save
3) Create Partner Profile (WE20)
a) Create New
b) Create the Partner no. name as same the logical system name of the destination system.
c) Select Partner type LS
d) Enter details for Type: US/USER, Agent, and Lang.
e) Click on the + button to select the message type.
f) Select Partner no. and LS which ever create above.
g) Select Message type
h) Select Process code related to the Message type.
I) save.
Also go ther the Blog <a href="/people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi Configuration for Pushing IDOC's from SAP to XI</a> By Swaroopa Vishwanath
U need to import the IDoc types both inbound and outbound to XI.
1. Create Inbound and Outbound Message interface.
2. Do one to one message mapping.
3. Define an Interface mapping.
ID:
1. Create 1 Sender aggrement.
2. Create 1 Receiver aggrement.
3. Define 1 RD and ID.
4. Only create an receiver IDoc CC.
Regards
San
<a href="Remember to set the thread to solved when you have received a solution to set the thread to solved when you have received a solution</a>
Where There is a <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/weblogs/topic/16">blog</a> there is a Way. -
URGENT !!! How to fecth the content of the mail
HI All,
I having a problem regarding how to fetch the body of the mail as well as attachment of the mail.
i get sender name, subject but i having the problem how to fetch the content of the mail.
i used
System.out.println(message[msgno].getContentType());
but it showing
javax.mail.internet.MimeMultipart@480457
it won't showing the content.
How can i fetch the content !!!!
Please help
I fetching accessing the mail server using "imap"
By
Ravi
email : [email protected]Code which i used
import java.io.*;
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
import java.lang.*;
import java.lang.Object;
public class GetMessageExample
public static void main(String args[]) throws Exception
String host = "...";
String username = "....";
String password = ".....";
// Create empty properties
Properties props = new Properties();
// Get session
Session session = Session.getDefaultInstance(props, null);
// Get the store
Store store = session.getStore("imap");
// Connect to store
store.connect(host, username, password);
// Get folder
Folder folder = store.getFolder("INBOX");
// Open read-only
folder.open(Folder.READ_ONLY);
// Get directory
Message message[] = folder.getMessages();
for (int i = 0, n = message.length; i < n; i++)
// Display from field and subject
System.out.println("From : "+message[0].getFrom()[0]);
System.out.println("Subject :"+message[0].getSubject());
// Display message content
System.out.println("ContentType :"+message[0].getContentType());
System.out.println("Content :"+message[0].getContent());
// Close connection
folder.close(false);
store.close();
i got this output :
From : Ravi Lal <[email protected]>
Subject :Testing
ContentType :multipart/alternative;
boundary="----=_Part_63386_12145160.1189402168311"
Content :javax.mail.internet.MimeMultipart@480457
As i having only one mail in my inbox.
I able to fetch everything from, subject but i fails to get the content i.e text of the mail.......
What i do ????????
!!! Help Me !!!
Ravi
Edited by: Ravi_InSun on Sep 13, 2007 10:51 AM -
How to read the content in one node of XML in Java? Pls help
My dear brothers,
I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
1. Create a GUI form which gives the ability for user to choose a XML file (ok)
2. Load XML and return the file (ok)
3. Read the file from node to node to create the node in Tree View (?!)
Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
Hoang Yen BinhI hope this one helps you.
<ABC Type="ProductBased" ProdName="One" Location="India">
<CEO>Raj</CEO>
<Finance>Vikram</Finance>
<HR>Karthik</HR>
<Technical>Satish</Technical>
</ABC>
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Attr;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.DOMException;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import java.io.File;
import java.io.IOException;
public class XmlReading {
Document doc;
Element element;
public static void main(String[] args) throws Exception{
XmlReading xr = new XmlReading();
xr.getXmlParser(args);
public void getXmlParser(String[] args) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
if(args.length != 1) {
System.err.println("Argument Required");
try {
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(new File(args[0]));
}catch(ParserConfigurationException e1) {
}catch(SAXException e2) {
}catch(IOException e3) {
getAttributes();
public void getAttributes() {
// Retrive the entire Document from the Dom Tree
element = doc.getDocumentElement();
// System.out.println(element);
NamedNodeMap attrs = element.getAttributes();
// Get number of attributes in the element
int numAttrs = attrs.getLength();
// Process each attribute
for (int i=0; i<numAttrs; i++) {
Node node = attrs.item(i);
// Get attribute name and value
String attrName = node.getNodeName();
String attrValue = node.getNodeValue();
System.out.println(attrName + ": " + attrValue);
String s1 = element.getTagName();
System.out.println(s1);
// To get all the elements in a DOM Tree
NodeList nl1 = element.getElementsByTagName("*");
int i2 = nl1.getLength();
System.out.println(i2);
for(int i=0; i<i2; i++) {
System.out.println(nl1.item(i) + "\n");
}
Maybe you are looking for
-
DO NOT BUY HP PAVILLION TOUCHSMART 20 ALL-IN-ONE
My experience with this desktop has been very poor. I have owned a computer since they have been offered to consumers and I say from experience that this is the worst computer I have owned. I have been on the phone with techs twice for over an hour
-
Error in SE16n - PIR exsist only in EINE table & does not exist in EINA tab
Hello All, This is regarding error in Pucrahsing Info Record in which PIR only exist in EINE table & not in EINA table. This is not normal behavior of SAP standard. In this issue we are able to see P. Info Record (5300083719) details in EINE table on
-
My operating system is Snow Leopard 10.6.8. How do I upgrade to Maverick?
My operating system is Snow Leopard 10.6.8. How do I upgrade to Maverick?
-
Hi, We are trying to install SSL certificate (Verisign Class 3) on iPlanet Web Server (version 7). However, at the final step we are getting the error "ADMIN4118: Only one server certificate can be installed at a time" We are following the below step
-
64 bit xp and/or 64 bit windows 7
Currently i have a (June) Mac Pro, Radeon 4870, 8gb Ram, and a 640GB HDD, with Snow Leopard. Well right when I got it I added a second 500GB HDD dedicated for windows XP, well at the time, x64 wasnt supported, so in windows mode, which i mostly use,