I want to save data to txt file on as ,how can do it ?
hi~everyone
i have some data in inner table ,i wantto save the data into TXT file on AS, then i download the file from AS,how can come true it ?who can give me some demo or cues ,thank you very much!
Message was edited by:
deqiang zhang
Check the example program using GUI_DOWNLOAD and it may help you
report zan_guidownload no standard page heading.
tables : vttk.
data : begin of i_vttk occurs 0,
tknum like vttk-tknum,
shtyp like vttk-shtyp,
end of i_vttk.
data : begin of i_down occurs 0,
fld(255) type c,
end of i_down.
start-of-selection.
select tknum shtyp from vttk into table i_vttk.
end-of-selection.
loop at i_vttk.
concatenate i_vttk-tknum ',' i_vttk into i_down.
endloop.
call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = 'C:\down.xls'
filetype = 'ASC'
append = 'X'
write_field_separator = ','
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = i_vttk
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Thanks
Seshu
Similar Messages
-
SQL Loader - want to access data from .txt file but don't want to insert
Hello,
I have situation where I have some data in .txt file and I have to load that data into one of my table.
My problem is I have fundtion get_id(a,b,c) in database which I have to call while loading the data to find out value of x.
I have value of a, b and c in txt file which I can access it using POSITION(N:M) in sql loader, but After accessing that value I just want to past to get_id() function and dont want to insert into sql loader.
any helpMy control file is as below
Following field is not in database but I need to pass the value to the function to get a ESC_USER_ID. any help
OFFICE_NUM filler POSITION(32:35) ,
STATION_DESK filler POSITION(45:48),
LOAD DATA
INFILE REFERRALs.TXT
BADFILE REFERRAL_LOAD.BAD
DISCARDFILE REFERRAL_LOAD.DIS
INSERT
INTO TABLE REFERRAL
EVALUATE CHECK_CONSTRAINTS REENABLE DISABLED_CONSTRAINTS
TRAILING NULLCOLS
ID sequence (1,1),
JOB_ID POSITION (16:22) "GET_JOB_ID(:JOB_ID)" ,
CUS_ID POSITION (23:31) "GET_CUS_ID(:CUS_ID)" ,
STATUS_LU CONSTANT 'F' ,
REQUEST_USER_TYPE_LU CONSTANT 'S' ,
OFFICE_NUM filler POSITION(32:35) ,
STATION_DESK filler POSITION(45:48),
REQUEST_USER_ID POSITION(143:149) "GET_ESCUSER_ID(OFFICE_NUM,STATION_DESK,:REQUEST_USER_ID)" ,
REQUEST_DT POSITION (37:44) "to_date(:REQUEST_DT,'YYYY/MM/DD')" ,
REVIEW_USER_ID FILLER ,
REVIEW_DT FILLER ,
REFUSE_REASON_LU FILLER ,
RESULT_LU POSITION (97:97) ,
NOTIFY_STATUS_LU FILLER ,
NOTIFY_DT FILLER ,
APPOINTMENT_DT POSITION (106:113) "to_date(:APPOINTMENT_DT,'YYYY/MM/DD')" ,
RESULT_DT POSITION (98:105) "to_date(:RESULT_DT,'YYYY/MM/DD')" ,
NO_MATCH_IND CONSTANT 'N'
) -
Firefox wants to save a pdf I select online. How can I just read it?
When I select a pdf online, Firefox is set to save the file somewhere. How can I change this so that I can just read the pdf, then decide to save it later?
Hi,
Did you find a solution about this issue? I am working about Anoto Digital Pen and I need to capture customer's signature. How did you find that Anoto plug-in ?
Thank in advance
Murat
www.muratkuru.com.tr -
i'm using diadem version 8.1, and my operating system is windows Me.
i'm also want to know if the diadem hae an "undo button" or not??
Thansk.Hi,
To import EXCEL files you can open the device DATA and then go to the menu FILE->OPEN. In the following dialog you must set the FILE TYPE to Excel. If you open an Excel file with that settings the Excel-file-import-wizard will be launched. With the wizard you configure the parameters which should be imported (that includes header parameter too). Please refer to the NI-Web page to get the latest service pack "SP1d" for the Excel import filter (http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C104B?opendocument&node=132070_US)
Yes, in DIAdem 8.1 we support undo for displacements in the device GRAPH. For DIAdem 9 we expand this functionality.
I hope this information will help you.
Greetings
Walter Rick -
Please help me. I know I can place them on the desk top, and return each file one-by-one, but is time consuming. My time machine was backedup back in september, and I don't want to lose pics I took and saved since then. Please let me know if thre is a "restore" or "put back" feature on the Mac OS X 10.5.8.
Kind Regards,
SteveI don't think "Put Back" is available in 10.5. Might try Cmd-delete (but if Put Back is not available, I guess the shortcut won't be either.) If the shortcut works, you must restore them one by one.
If they are not from your user, you do not want to move them first to the Desktop and then move them to their original locations. Doing so will complete screw up their Permissions. If these are not from your home folder and If Put Back is not available, you must use what will be the very tedious sudo mv command in Terminal for each. But sounds like they are from your user, since they are pictures. -
QuickView (run in backgroud) - How to auto save data to local file
I am using Quickview to extract data. I want to run the Quickview query in background and auto save the data extracted into local file (ASCII file). Currently when I specify File Store (as my Output Format) and enter a file name (e.g C:\Temp\test.asc). Upon completion of extraction there is a little window popup that need me to select data format (e.g DAT, ASC) and click <Transfer> button to proceed to save data into local file.
Is there a way that I can save data into local file without have to manually select ASC data format and click <Transfer> button. I will not be able to schedule my QuickView query to run in background if I can't resolve this problem.
Note that I don't have access to ABAP programming, therefore this option is out.
Thanks in advance to anybody who can share your expertise experience.Tyr Fm's
1. WS_UPLOAD
2. GUI_UPLOAD
But using gui_upload and ws_upload can only upload data from txt.
actualy we have software to convert pdf to text file it freely availabe in internet...
after conversion you can use thesr fms.
plzz reward points usefull
Cheers,
Chandru -
Java.io.NotSerializableException when overwrite the JTable data into .txt file
hi everyone
this is my first time to get help from sun forums
i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
At the beginning, the code will be generate successfully and the jtable will be showing out with the data that been save in the studio1.txt previously,
but after i edit the data at the JTable, and when i trying to click the save button, the error had been showing out and i cannot succeed to save the JTable with the latest data.
After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
I hope i can get any solution at here and this will be very useful for me.
the following is my code...some of it i create it with the GUI netbean
but i dunno how to attach my .txt file with this forum
did anyone need the .txt file?
this is the code that suspect maybe some error here
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String filename = "studio1.txt";
try {
FileOutputStream fos = new FileOutputStream(new File(filename));
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(jTable2);
oos.close();
catch(IOException e) {
System.out.println("Problem creating table file: " + e);
return;
System.out.println("JTable correctly saved to file " + filename);
}the full code will be at the next msgthis is the part 1 of the code
this is the full code...i had /*....*/ some of it to make it easier for reading
package gui;
import javax.swing.*;
import java.io.*;
public class timetables extends javax.swing.JFrame {
public timetables() {
initComponents();
@SuppressWarnings("unchecked")
private void initComponents() {
jDialog1 = new javax.swing.JDialog();
buttonGroup1 = new javax.swing.ButtonGroup();
buttonGroup2 = new javax.swing.ButtonGroup();
buttonGroup3 = new javax.swing.ButtonGroup();
buttonGroup4 = new javax.swing.ButtonGroup();
jTextField1 = new javax.swing.JTextField();
jLayeredPane1 = new javax.swing.JLayeredPane();
jLabel6 = new javax.swing.JLabel();
jTabbedPane1 = new javax.swing.JTabbedPane();
jScrollPane3 = new javax.swing.JScrollPane();
jTable2 = new javax.swing.JTable();
jScrollPane4 = new javax.swing.JScrollPane();
jTable3 = new javax.swing.JTable();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
/* org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
jDialog1.getContentPane().setLayout(jDialog1Layout);
jDialog1Layout.setHorizontalGroup(
jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 400, Short.MAX_VALUE)
jDialog1Layout.setVerticalGroup(
jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 300, Short.MAX_VALUE)
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);
String filename1 = "studio1.txt";
try {
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
jTable2 = (JTable) ois.readObject();
System.out.println("reading for " + filename1);
catch(Exception e) {
System.out.println("Problem reading back table from file: " + filename1);
return;
try {
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
jTable3 = (JTable) ois.readObject();
System.out.println("reading for " + filename1);
catch(Exception e) {
System.out.println("Problem reading back table from file: " + filename1);
return;
jTable2.setRowHeight(20);
jTable3.setRowHeight(20);
jScrollPane3.setViewportView(jTable2);
jScrollPane4.setViewportView(jTable3);
jTable2.getColumnModel().getColumn(4).setResizable(false);
jTable3.getColumnModel().getColumn(4).setResizable(false);
jTabbedPane1.addTab("STUDIO 1", jScrollPane3);
jTabbedPane1.addTab("STUDIO 2", jScrollPane4);
jTextField1.setText("again n again");
jLabel6.setText("jLabel5");
jLabel6.setBounds(0, 0, -1, -1);
jButton2.setText("jButton2");
jButton1.setText("jButton1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
-
How to store a data on txt file through java program
that means i want a coding for write data on txt file using java program.that storing data is stored like this formate,
sathees
krishnan
rama
suresh
Stored on one by one. not like this
sathees krishnan rama suresh.........import java.io.*;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
public class rsk1{
public static void main (String argv []){
try {
String sr[] = new String[100];
String s1=" ";
int j=0;
DataInputStream in = new DataInputStream(System.in);
OutputStream f1 = new FileOutputStream("file1.txt");
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File("book.xml"));
// normalize text representation
doc.getDocumentElement ().normalize ();
System.out.println ("Root element of the doc is " +
doc.getDocumentElement().getNodeName());
NodeList listOfPersons = doc.getElementsByTagName("person");
int totalPersons = listOfPersons.getLength();
System.out.println("Total no of people : " + totalPersons);
for(int s=0; s<listOfPersons.getLength() ; s++){
Node firstPersonNode = listOfPersons.item(s);
if(firstPersonNode.getNodeType() == Node.ELEMENT_NODE){
Element firstPersonElement = (Element)firstPersonNode;
NodeList firstNameList = firstPersonElement.getElementsByTagName("first");
Element firstNameElement = (Element)firstNameList.item(0);
NodeList textFNList = firstNameElement.getChildNodes();
sr[++j]=((Node)textFNList.item(0)).getNodeValue().trim();
NodeList lastNameList = firstPersonElement.getElementsByTagName("last");
Element lastNameElement = (Element)lastNameList.item(0);
NodeList textLNList = lastNameElement.getChildNodes();
sr[++j]=((Node)textLNList.item(0)).getNodeValue().trim();
NodeList ageList = firstPersonElement.getElementsByTagName("age");
Element ageElement = (Element)ageList.item(0);
NodeList textAgeList = ageElement.getChildNodes();
sr[++j]=((Node)textAgeList.item(0)).getNodeValue().trim();
NodeList stuList = firstPersonElement.getElementsByTagName("stu");
Element stuElement = (Element)stuList.item(0);
NodeList textstuList = stuElement.getChildNodes();
sr[++j]=((Node)textstuList.item(0)).getNodeValue().trim();
}//end of if clause
}//end of for loop with s var
System.out.println("Process completed");
for(int i=1;i<=j;i++)
byte buf[] = sr.getBytes();
byte buf1[] = s1.getBytes();
f1.write(buf);
f1.write(buf1);
f1.close();
}catch (SAXParseException err) {
System.out.println ("** Parsing error" + ", line "
+ err.getLineNumber () + ", uri " + err.getSystemId ());
System.out.println(" " + err.getMessage ());
}catch (SAXException e) {
Exception x = e.getException ();
((x == null) ? e : x).printStackTrace ();
}catch (Throwable t) {
t.printStackTrace ();
}//end of main -
Hi, I'm stuck at step 9. I don't see my external harddrive when I want to save the DMG backup file. Can you please help me with this? I'm desperate to make this backup! Big thanx in advance!
http://support.apple.com/kb/HT1553Repair permissions and restart your computer. If this does not work, zap the pram. You should now see your external hard drive.
-
Every time I try to download the new version of Adobe Flash Player it saves as a .txt file and I do not know how to get it to save in the correct format.
Please post in the Adobe Flash Player forum.
-
Have old MacBook Pro running tiger 10.4 want to save date to external hard drive and buy newer MacBook and still use same drive. Any suggestions, most WD drives say nothing about os tiger 10.4. The OS compatibility is much newer on the data. Totally confused. Not a computer person.
I haven't checked reviews recently but there's a difference between bare drives and drives with enclosures. Western Digital made some of the most reliable drives last time I checked, though the enclosures weren't all that great. It is convenient to get both in one package but I usually buy a highly rated enclosure and then put a highly rated drive in it myself. OWC sells some good enclosures but if they put a so-so drive inside of it then the package is only as good as its weakest component. If you get a package from them, ask them what drive is inside (some vendors have no idea what's inside - went to an Apple Store recently and they couldn't tell me what was inside some of their Apple brand enclosures). My first thought if buying a new drive would be to buy a OWC enclosure with a WD drive, but chek around because I may be out of date.
10 years ago Seagate was one of the best drives. Now they rate poorly in reviews. -
After I have converted PDF file to Word how can I select certain pages to save them as a new document? Thank you
You've said you have a Word file and want to use some pages in the file to create a new document.
Use Word to establish a new Word file that has the desired pages for the original Word file.
You now have a "new document" of the desired pages.
With Acrobat Standard or Pro installed you can create a "new document" PDF.
If you do not have Acrobat Standard or Pro or a subscription to an online Adobe service that can create PDF from MS Word you can use the Microsoft process to create PDF that comes with MS Word.
Be well... -
When insert my lexar USB flash drive I get the message that the disk was not readable by this computer. It has worked previous to this and I do not want to lose the data by reformatting the drive. How can I reformat this drive and not lose my data?
You can't reformat it and not wipe everything on it.
Have you tried a different USB port?
Only other option, back it up on a different computer. -
Using iPhoto 09, 8.1.2 How do I re-route saving pictures to the hard drive? Currently am saving to files on 'my' partition, and would like to change to save to a shared file so both partitions can view and access.
Drag the Library from the Pictures folder to the Users/Shared folder. I would point out that folks doing this on 10.6 and later frequently meet permissions issues. You might do better moving it to an appropriately formatted External Disk.
-
Hello, my iTunes dates are crashed on my mac, how can I download all my itunes match songs and save on my mac?
Hi mrmoo13!
You have a couple of options for transferring your music library from one computer to another. First, you can download all of your music that is stored in the cloud on iTunes Match by following the instructions on this page:
iTunes 11 for Mac: Access all your music anytime, anywhere with iTunes Match
http://support.apple.com/kb/PH12284
You can follow steps listed in the section right here:
Play or download songs from iCloud
You can play songs directly from iCloud, or you can download songs so you can play them when you’re not connected to the Internet.
If a song is available in iCloud, it has a Download button next to it.
To play the song, double-click it.
To download the song, click the Download button.
After you download a song to a computer, it remains in the computer’s iTunes library, even if you turn off iTunes Match.
To only display downloaded songs in your iTunes library, choose View > Hide Music in the Cloud. This also hides any previous iTunes Store purchases you haven’t downloaded.
For information about downloading and playing songs on an iOS device, see the documentation for the device.
In order to make it easier to download all of your music, you can highlight all of the songs in your iTunes Match section and then click download, as mentioned in these instructions.
You can also choose to transfer the music from your old computer to the new one by following the steps in this article, whcih will give you some other options for doing this transfer:
iTunes: How to move your music to a new computer
http://support.apple.com/kb/ht4527
Take care, and thanks for visiting the Apple Support Communities.
-Braden
Maybe you are looking for
-
How do I merge my iTunes libraries and make them accessible from multiple Systems?
Our family has several Macs using several versions of OSX. My Music collection, mostly converted from my large collection of CDs, is scattered across all the Macs and several hard drives with Systems running OSX 10.6.8, 10.8.5 and 10.9.4. The older M
-
PDF Links Won't Open in Safari 3.1.2
Whenever I click on a PDF link in Safari, I just get a blank gray page with a spinner. PDFs use to open with no problem. I did update to Adobe CS3 last week - don't know if that's part of the problem. I have plenty of memory and disk space. Any ideas
-
SD document type link to FI document type
Hi I have many document types for credit notes in SD. When the accounting document is created they have the same doc type DG. Our requirement is to have different FI document type for each of the SD document type. Where is the config to link this.
-
Question: What is use of the port directly next to the Zen Touch headphone ja
Directly next to the ZT headphone jack is another connector. What is that intended to be used for?
-
Hi Gurus My client is asking for Job Descriptions in OM. If I am right they can be maintained in the Description Infotype of any object. Would this be the right guess? Or should I think in another way? My client has clearly defined positions, but he