Tab Delimited Data Outpu
Can anyone help to get a Tab Delimited datafile as ouput in
Spool? How to get the tab between fields?
Select fielda, ',', fieldb, ',' , fieldc
from tablename;
will do it for a quick and easy fix. However, it doesn't
protect you from embedded commas in a text field.
Select '"'||Rtrim(textfield)||'"', ',' , numberfield
from tablename;
Will give an output with "textfield",89 etc.
Similar Messages
-
Import tab delimited data in livecycle designed form
Hello,
Is it possible to import tab delimited data in livecycle designed xdp form?
Also will it work when we user right enable form so that user can import their data in PDf form?
Thanks
ManojHi Paul,
This is what I get when in use the function importData
NotAllowedError: Security settings prevent access to this property or method.
Doc.importXFAData:-1:XFA:topmostSubform[0]:Receipt[0]:Button8[0]:click
so what settings are needed and how should my file be formatted. doe sthis function work for XMl or text files or both?
Now when I use load xml function I get this error
Xml parsing error: syntax error (error code 2), line 1, column 1 of file
the file contents are:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Receipt>
<cfien>This is the new string</cfien>
</Receipt>
where receipt is my form name and cfien is my field name.
Can you tell me how to make an XMl file to load the data or give a sample file. Do I need to have SOM expressions in field names?
Thanks
Manoj -
Tab Delimited data from file into array
Could someone give me a full example of how to pull strings out of a text file and insert into an array. I have posted a couple of times and the segments of code that I get back isn't working. I don't know where I am going wrong exactly, so I would like to see a full example. Here is what I posted last.
I don't want to use a loop. I want to specify what each array element is and how may there are before it is run.
import java.util.StringTokenizer;
import java.io.*;
public class ReadDataFile
public static void main(String args[])
try
FileReader fr = new FileReader("DataFile");
BufferedReader br = new BufferedReader(fr);
String s;
String data[] = new String[12];
int count = 0;
while((s = br.readLine()) != null)
StringTokenizer st =new StringTokenizer(s);
data[0] = st.nextToken();
data[1] = st.nextToken();
data[2] = st.nextToken();
data[3] = st.nextToken();
data[4] = st.nextToken();
data[5] = st.nextToken();
data[6] = st.nextToken();
data[7] = st.nextToken();
data[8] = st.nextToken();
data[9] = st.nextToken();
data[10] = st.nextToken();
data[11] = st.nextToken();
data[12] = st.nextToken();
System.out.println(data[3]);
catch(IOException ioe)
System.out.println(ioe.getMessage());
With this I get this error when I try to run it.
Exception in thread "main" java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:235)
at ReadDataFile.main(ReadADataFile.java:37)
ThanksJust return String array instead of returning vector and change tokanizer according to ur requirement
public Vector valuesarr(HttpServletRequest req, HttpServletResponse res,String user,String filename,String folder)
PrintWriter out =null;
boolean indbool=false;
boolean fd=false;
try{
out = res.getWriter();
BufferedReader br =null;
String fl=folder+"/txt/"+filename+".txt";
File tt = new File(fl);
String s, s2 = new String();
String userval;
String files;
int ind=0;
boolean indigo=true;
Vector v=new Vector();
if( tt.exists() )
String mainarr[]=null;
br = new BufferedReader(new FileReader(fl));
while((s = br.readLine())!=null)
s2=s+"\n";
if (s.indexOf(user) > -1)
ind=s.indexOf(user);
StringTokenizer st = new StringTokenizer(s,";=");
String [] filearr1=new String[s.length()];
int t=0;
while(st.hasMoreTokens())
String stfiles1=st.nextToken();
filearr1[t]=stfiles1;
t++;
String filearr2 []=new String[t];
for( int a=0;a<t;a++)
if(filearr1[a]!=null)
v.addElement(filearr1[a]);
return v;
}catch(FileNotFoundException f)
out.println(f.getMessage());
return null;
catch(IOException io)
out.println(io.getMessage());
return null; -
Acquire data from a tab delimited file using a popup dialog object on a stamp
I am trying to import data from a tab delimited file using a popup dialog object on a stamp. I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix.
My problem is understanding how to bring the data into the dialog object from the file.
I don't want to plagiarize his book--so am electing at this time not to show my code. The script is reading the file, just not bringing in the records from the file so that I can select which line to import into the stamp.
I have typed in the code exactly how the book describes, but when the popup dialog object is selected, there is nothing in the drop-down. When I click OK, the first record is put on the stamp--except for the fields that I am wanting to appear in the dialog object popup box.
I have searched the forums, and also the JavaScript reference. There are examples of the popup dialog object, but none of them show how to import the data from a file--just for the items to be typed in as the list.
Any help would be greatly appreciated! i have been trying to work on this for several months now.Karl
Thank you for getting back with me!
In answer to your questions:
1. Your trusted function is not a trusted function. Did you put this
function into a folder level script so that it will get executed at system
startup?--
yes--I saved the script as a .js file and put it in the following path (I have Acrobat XI Pro for Windows)
C:\Documents and Settings\tjohnson\Application Data\Adobe\Acrobat\Privileged\11.0\JavaScripts\GetTabData.js
2. The script cannot find your tab delimited data file, or it cannot
extract the data. Did you add the data file in the correct location? The
location from the script in the book would be c:\mydata\Contacts.txt
Yes--the file is in the same path as the book.
Below is my code that references the file.
var cPath = "/c/mydata/Contacts.txt";
the slashes in the book go in the direction of the text above--should they go in the direction that you have in your question?
Also, the name and email address need to be separated by one Tab character.
They are.
3. The fields need to be named the same way as the columns in the data file (the two names are in the first line of the file).
My headings are RevByFromTab and EmailFromTab--which match the names of the two fields on the stamp.
So, check that you are not getting any errors in the JavaScript console
(Ctrl-J or Cmd-J), and verify that the tab delimited file is in the correct
location
When I run in the java script console--and I just run the script on the stamp,
it says
TypeError: event.source is null
17:Console:Exec
undefined
When I place the stamp on the page, the popup box is working, but when you click on the down arrow, there is nothing listed. When I click OK, the RevByFromTab is populated by the first item in the file, but the EmailFromTab field says undefined.
Thank you
Message was edited by: tdjohnson7700 -
No support for tab-delimited (or other character-delimited) data export
First, to echo others' comments, I am thoroughly impressed with this project. This is a well-designed application that feels very professional and reasonably robust for beta. I only wish that Oracle had invested the resources to do this earlier.
To the point, in the right-click pop-up menu within the data results tab there is an "Export" sub-menu. This menu has various options for exporting raw data. However, it does not provide the ability to export tab-delimited data or to change the delimiter arbitrarily.
This feature is particularly important for data containing special characters. For example address data, even after parsing into standard fields, may still contain commas rendering a CSV export useless.
This would be a very useful enhancement.There is an export to Tables in Microsoft Excel option. Did you try that?
-
Tab delimited file on app server. How to do that?
Hello,
When i transfer a tab delimited file from pre. server(windows) to app. server(windows) using CG3Z , the tab delimitation is not working.
for eg : the file with below layout
01.04.2007 31.03.2008 1 120
01.05.2007 31.07.2008 2 140
is getting changed like
01.04.2007#31.03.2008#1#120
01.05.2007#31.07.2008#2#140
All i need is a tab delimited file in app server also . Wats that i need to do for this ? Also how can i write a tab delimited file on app server through my program using open dataset.
Thanks for ur time.
Jeeva.Hi..
Check this code: you will find the solution:
Using the Static Attribute <b>CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB</b>
Example:
This is the Simple way you can download the ITAB with Tab delimiter:
DATA : V_REC(200).
OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT ITAB INTO WA.
Concatenate WA-FIELD1 WA-FIELD2
INTO V_REC
SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
TRANSFER V_REC TO P_FILE.
ENDLOOP.
CLOSE DATASET P_FILE.
Note: if there are any Numeric fields ( Type I, P, F) In your ITAB then before CONCATENATE you have to Move them to Char fields ..
Reward if Helpful.
Example:
DATA: V_RECORD(200).
OPEN DATASET P_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
DO.
READ DATASET P_FILE INTO V_RECORD.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
SPLIT V_Record at CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
INTO WA-FIELD1 WA-FIELD2.
APPEND WA TO ITAB.
ENDDO.
<b>reward if Helpful.</b> -
Large line to internal tables from tab delimited file
Dear All
I am trying to upload the large file of tab delimited data into a SAP internal table. I am basically stuck with the fact that there are multiple lines and multiple columns in tab delimited file. There are around 300 columns which are tab delimited and separated
For e.g (* indicates tab)
1material*****************1**9888**********5**********34*********3*********346************************-->upto 5000 columns
1material*****************1**99338************4***********************************6************7************-->upto 5000 columns
1material*****************1**22888********************5*********7*********************6*****7**************-->upto 5000 columns
1material*****************1**44844************************5***5*********************************************-->upto 5000 columns
1material***********34****1**54*******33********33*****33**************************************************-->upto 5000 columns
1material*****************1**99888*****************************************************************************-->upto 5000 columns
below upto 500 rows or more
I want to read this file into a columner internal table.
I am trying several ways . I have file on APP server. However Line breaks after 1024 characters or comes on another line.
Currently I am not able to load it in single line of internal table. The structure of file is dynamic .. not static
AmolHi Amolsonaikar,
you may try like this:
TYPES:
begin of line,
t_field type table of string,
end of line,
t_line type table of line.
DATA:
lt_line type t_line,
lv_line type string,
lt_field type table of string.
open dataset 'XYZ' for input in text mode encoding default.
while sy-subrc = 0.
read dataset into lv_line.
split lv_line at '|' into lt_field.
append lt_field to lt_line.
endwhile.
Regards,
Clemens -
GUI_UPLOAD can't upload data in a tab-delimited text file
Hi.
I was trying to upload data in a tab-delimited textfile.
I could do it for a ASC textfile (by setting FILETYPE = 'ASC'), but I couldn't do it for a tab-delimited textfile (by setting FILETYPE = 'DAT').
Any help is appreciated.hi kian,
If u r using DAT file then HAS_FIELD_SEPERATOR should contain X.
<b>check the following code:</b>
parameters: p_file like rlgrap-filename. " File Name.
call function 'GUI_UPLOAD'
exporting
filename = p_file " NAME of the file
<b> filetype = 'DAT'
has_field_separator = 'X '</b> " <b>X indicates Fields are separated by tabs.</b>
tables
data_tab = t_file " Internal table that contains the file data
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17.
<b>IF the file type is DAT then following rules applies.</b>
The components of the internal table are filled from the file. If the
table contains several columns, the entries in the file must be
separated by tabs. No conversion exits are carried out.
The following applies for the different data types:
- I or N or P or F
The numbers must be formatted according to the decimal representation
defined in the user settings.
- D
The date must be defined according to the date format defined in the
user settings.
- T
The time must have the format hh:mm:ss.
Reward me if useful...
Harimanjesh AN -
T-code F.27 or F.61 send raw data (tab delimited) to customers statements
To enable intercompany customers to reconcile their accounts with ease we want to give them an excel file of all open items.
Our thoughts are to use T-code F.27 (standard transaction for generating account statements) or F.61 and instead of sending a form, we would like to send raw data (tab delimited) which can easily be opened in excel to their email address.
Each time I try I can only get a pdf or fixed file.
Has anyone else done this?
How to do, create this?
Export text file to SAP Gui ?
Many thanks for any ideas or help
Edited by: Christine Kendall on Mar 16, 2010 6:00 PM
*has anyone else extracted info to send to customers in format that can be amended i.e excel ? *Hi
do you find a solution for your issue? Or did anyone else know how to send raw data instead of the pdf or fixed file from transaction F.61?
Thanks for any ideas or help
Axel -
Importing data from tab delimited file
Hi everyone,
This is my first question on here so I hope I am doing the right thing.
I've searched online as much as I can to find an answer or a way to fix my problem but I have not been able to find a resolution.
My issue is I'm trying to import name and contact information from a excel file, that I have saved as a tab delimited file, into a fillable PDF file. I'm able select the text file through the import option and it shows the correct information as different rows that I can import but when I select one and click on to finish the import of the data I get an error message advising that some of the text could not be imported. The issue is nothing is being imported at all.
I've made sure that all the relevant fields are the same name as what the form has but still cannot get anything to import.
Does anyone have any ideas why this may not be working? Also I basically have no ability to write JavaScript to import the information otherwise I would look at travelling down that path.
Please let me know if I need to be any more specific.
Regards,
AdamOk I can share the form itself and will need to quickly create some data itself to go along with it
PDF Form Shared Files - Acrobat.com
Here is the tab delimited file I am trying to use (well the format anyway).
Test Data File Shared Files - Acrobat.com
Adam
Thanks Pat Willener -
Transfer data in unix with tab-delimited
Hi,
How can we transfer data to unix with tab-delimited? I have incoming file with tab-delimited and want to copy as backup file in another folder in unix. When I read the incoming file, tab separator is translated into '#' so when I do transfer data to the backup folder, the file contains '#'.
Is there a way to transfer data in tab-delimited?
thank you
aliatry to use delimiter cl_abap_char_utilities=>HORIZONTAL_TAB.
here is a piece of code:
REPORT ztestfile .
DATA: BEGIN OF gt_file_out OCCURS 0,
filed(2000),
END OF gt_file_out.
START-OF-SELECTION.
DATA: lv_file_out LIKE filename-fileextern.
CONCATENATE 'Hello' 'World' INTO gt_file_out SEPARATED
BY cl_abap_char_utilities=>horizontal_tab.
APPEND gt_file_out.
lv_file_out = '
XXXX\XXXX\mytest1.txt'.
OPEN DATASET lv_file_out FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT gt_file_out.
TRANSFER gt_file_out TO lv_file_out.
ENDLOOP.
CLOSE DATASET lv_file_out.
Message was edited by: joseph fryda -
Storing Sapscript data in Tab delimited format
Hi All,
Can anyone please advise me how can I store my Sapcript data in Application server in a Tab delimited format?
Is there any FM for that or should I use Open dataset?
Please send sample code, if anyone have.
Moreover, please let me know where to write the code in application form of print wrokbench?
Thanks & Regards,
Anshumita.Hi Baski ,
1.First u have to get the OTF data of the Scripts ,after calling Close_form.
2.Write that data into Application Server by using Commaands <b>Open data set</b>.
Regards
Prabhu -
Efficent method to sort data from tab delimited text file
I am currently writing a program to sort through data that was acquired and display it on a graph and some other indicators. The file is a tab delimited text file with possibly 100,000s of data points. the current method that I have tried using was that if I wanted all of the data from Oct, I would parse out the month from the timestamp, compare that to the desired month, and add it to the array if it is the same. Other possible options of sorting are yearly and daily, possibly even hourly.
The method does work, however it does take some time (up to a minute on a P4 3.6 GHz with 2 gb ram), and most of the other computers are not nearly as fast or with as much memory. Is there a more efficent method to sorting the data??
I attached my sorting vi as well as a sample data file.
thanks for the advice. It is saved in LV8.0.1
Kenny
Kenny
Attachments:
data sort.zip 84 KB
oven1.txt 21 KBFirst of all, "sorting" has usually a different meaning (Sorting and numeric array ascending or descending, a string array aphabetically, etc.). Your data already seems sorted by date and time, you just want to pick a subset having certain characteristics.
The main problem that is slowing you down is your constant growing of large arrays. This causes constant memory reallocations.
Since your data is already sorted by date and time, all you need is to place your data in a sutable data structure, find the start and end point of your selection, then use "array subset" for example.
Your code also seems to have a lot of unecessary complexity. See for example your "test for sort data" (see image below).
the four cases only differ by filename --> only the file name belongs into the case and the file operation outside the inner case. Even better, just use autoindexing.
that shift register does not do anything, because it always contains the same data. Using "index array" with index wired to [i] is equivalent to an autoindexing tunnel.
You have a case structure to select which files to read, skipped files give you an empty array. Do you really need to do all these operations on an empty array. Why not place all code inside the TRUE case??
Below is an image of one possible code alternative that addresses some of these points.
Message Edited by altenbach on 10-26-2006 09:32 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
testForSortData.png 33 KB -
Program to upload data from a tab-delimited file ...
I have to upload data from a tab-delimited file with following fields into database table(ZCBU) with same fields:
CBU (parent)
KUNNR (child)
ERDAT (effective from)
MANDT (client)
SFID (salesforce ID)
AEDAT (effective to)
AENAM (assigned by).
This file can be of type PC(txt) or UNIX.
plz tell me how to do this in both type of filesHi,
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: xfile TYPE string.
DATA: BEGIN OF itab OCCURS 0,
empno TYPE zmemp-empno,
name TYPE zmemp-first_name,
last TYPE zmemp-last_name,
comp TYPE zmemp-comp,
place TYPE zmemp-place,
END OF itab.
PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Form to get the file path of legacy data stored on presentation server
PERFORM get_file_path.
START-OF-SELECTION.
MOVE p_file TO xfile.
to get the data from excel sheet data into an internal table
PERFORM get_data.
LOOP AT itab .
REFRESH bdcdata.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9001'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9001_EMPNO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CREA'.
PERFORM bdc_field USING 'S9001_EMPNO'
itab-empno.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9002_PLACE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_field USING 'S9002_EMPNO'
itab-empno.
PERFORM bdc_field USING 'S9002_FIRST_NAME'
itab-name.
PERFORM bdc_field USING 'S9002_LAST_NAME'
itab-last.
PERFORM bdc_field USING 'S9002_COMP'
itab-comp.
PERFORM bdc_field USING 'S9002_PLACE'
itab-place.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9001'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9001_EMPNO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
CALL TRANSACTION 'ZMEMP'
USING bdcdata
UPDATE 'A'
MODE 'N'.
ENDLOOP.
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "BDC_FIELD
*& Form get_file_path
FORM get_file_path .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = p_file.
ENDFORM. " get_file_path
*& Form get_data
FORM get_data .
DATA : lines1 TYPE i.
MOVE p_file TO xfile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = xfile
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = itab.
DESCRIBE TABLE itab LINES lines1.
WRITE : / lines1 , 'REcords uploaded' .
ENDFORM. " get_data
Regards,
Nihar Swain, -
How t o make data in file as tab delimited..
Hi frndz,
How to make data in file as tab delimited.For tab delimiting pl use the following snippet..I guess you are aware of the rest of the stuff..
data: w_tab type c value cl_abap_char_utilities=>horizontal_tab,
rec_file type string.
concatenate <fld1> <fld2> ...<fldn> into rec_file
separated by w_tab.
~Suresh
Maybe you are looking for
-
Windows install goes nowhere; OS X can't boot
Hello, This morning I used Bootcamp Assistant to create a 32GB partition. I inserted my Windows 7 DVD and let the assistant reboot my iMac. It got to a blank grey screen and never went any further. I heard the CD drive spin down, and it never made an
-
JOptionPane.show* cannot be used in DropTargetListener
Hi guys! I am doing a File Explorer using Drag and Drop. In the my own DropTargetListener class, it seems that i can't use JOptionPane.showMessageDialog, InputDialog and the likes. It hangs!!! The Dialog pops up correctly but the entire application h
-
Hi I was wondering how did they get this alpha channel, is there a tutorial any one knows or just what technich its called cause i cant find a thing how they did it http://hotfile.com/dl/57865326/b1bed5b/ShockBall.dds.html I cant upload the image her
-
I have been searching online for hours and hours, and could find no solutions:?Last spring, my Zen Micro began having the "headphone jack problem." After finally becoming fed up with it, my dad found a guide showing how to solder and fix it. I had ne
-
How do I find what the various Firefox revisions fix or address?
How do I find what the various Firefox revisions fix or address?