Broken pipe column delimiter text file in ssis
i have got one csv in which there is one comment column in which users can put any sort of words, including comma. pipe| etc so my only option is to use a text qualifier but even with text qualifier the sequence
is broken as user have put that text qualifier in some column only option left is to use a broken pipe which apparently users are not using, but when i put broken pipe as text qualifier ssis doesnt convert it propwerly. i am using utf8 in connection manager
code page.
urgent requirement plz help
"1","aa","ASAs/?|,kjsk"ssk"
as you can see third column is propblem and text qualifier doesnt work because " is used in that column.
hi sorry for not putting much detail,
i have got one csv in which there is one comment column in which users can put any sort of words, including comma. pipe| etc so my only option is to use a text qualifier but even with text qualifier the sequence is broken as user have put that text qualifier
in some column only option left is to use a broken pipe which apparently users are not using, but when i put broken pipe as text qualifier ssis doesnt convert it propwerly. i am using utf8 in connection manager code page.
urgent requirement plz help
"1","aa","ASAs/?|,kjsk"ssk"
as you can see third column is propblem and text qualifier doesnt work because " is used in that column.
Similar Messages
-
XML Column from table extract to Pipe Delimited Text File
Hi,
I have an XML column with large data in a Table ( Source SQL server Database).
I was asked to extract XML column to .txt file using SSIS.
Is it possible to extract xml column with huge data to text file ?
when I tried, select XML column from Table in source , I noticed that Property of column is taken as [DT_NTEXT] . I Converted it to DT_TEXT as Ansi donot support DT_NTEXT.
Execution method was success but it failed due to trucation. so wondering is there a way to get XML column extracted to Pipe delimited text file?
Is it advisable to do this ? or IS It Valid to export XML in Pipe Delimited File ?
Please Kindly advice
thanks
kodiAre you looking at shredding data within XML nodes and then importing it to text file or are you looking at exporting XML value as is? Also is SSIS a necessity?
If not, You can simply use T-SQL for this along with bcp for this. just use a query like
EXEC xp_cmdshell 'bcp "SELECT CAST(XMLColumn AS varchar(max)) AS Column FROM table" queryout <full file path> -c -S <ServerName> -T -t |'
provided you use trusted connection (windows authentication)
see
http://visakhm.blogspot.in/2013/10/bcp-out-custom-format-data-to-flat-file.html
If you want to shred the data use Xpath functions in the query as below
http://visakhm.blogspot.in/2012/10/shred-data-as-well-as-metadata-from-xml.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to get summary columns in delimited text file
How to get summary columns in delimited text file
I am trying to generate a delimited text file output with delimited_hdr = no.The report is a Group above report with summary columns at the bottom.In the text file the headers are not getting repeated & thats ok.The problem is the summary data is getting repeated for each row of data.Is there a way where i will get all the data & summary data will get displayed only once.I have to import the delimited text file in excel spreadsheet.Sorry there were a typos :
When I used desformat=DELIMITEDDATA with desttype=FILE, I get error "unknown printer driver DELIMITEDDATA". When you look for help, DELIMITED is not even listed as one of the values for DESTFORMAT. But if you scroll down and look for DELIMITER it says , this works only in conjuction with DESTFORMAT=DELIMITED !!!!!!??!! This is in 9i.
Has this thing worked for anybody ? Can anyone please tell if they were able to suppress the sumary columns or the parent columns of a master-detail data for that matter ? -
If you have answer, please provide specific and detailed steps.
Situation 1:
Start:
150+ files in .xls OR .xlsx format
data contains many characters EXCEPT "Tab"
Process:
Use Automator to:
Select Files from Finder window
Convert selected files from xls/xlsx to TAB-DELIMITED file format
End:
150+ files in .txt format
files have identical names to those from "Start:"
data is TAB-DELIMITED
Situation 2:
Start:
150+ files in .xls OR .xlsx format
data contains many characters EXCEPT | (pipe, vertical bar)
Process:
Use Automator to:
Select Files from Finder window
Convert selected files from xls/xlsx to |-delimited file format
End:
150+ files in .txt format
files have identical names to those from "Start:"
data is "|"-delimitedIf your post is addressed to my response then the answer is you have to write your own or search on-line to see if something exists to do what you want.
As you note there is no pre-built script for this.
regards
Message was edited by: Frank Caggiano - Are you certain there isn;t something in Excel to export as a tab delimited file?
This link Convert An Excel Spreadsheet To A Tab Delimited Text File seems to indicate that the function is in Excel already. -
Downloading pipe delimited text file on to desktop with data in internal
hi all,
how to download pipe delimited text file on to desktop with data in internal
table with an example plz.hi,
u can use the FM GUI_DOWNLOAD.
here is the sample code.
*Internal table to hold the employee details
DATA: it_details TYPE STANDARD TABLE OF x_details,
wa_details TYPE x_details.
*Internal table for file
DATA: BEGIN OF it_details_txt OCCURS 0,
line(700),
END OF it_details_txt.
*Employee details for the file
CLEAR wa_details.
LOOP AT it_details INTO wa_details.
CLEAR it_details_txt.
CONCATENATE
wa_details-var1
wa_details-var2
wa_details-var3
wa_details-var4
INTO it_details_txt-line SEPARATED BY '|'.
APPEND it_details_txt.
CLEAR wa_details.
ENDLOOP.
*Download file in .TXT format to local desktop
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'data.txt'
filetype = 'ASC'
TABLES
data_tab = it_details_txt
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
OTHERS = 11.
IF sy-subrc = 0.
MESSAGE 'Data downloaded successfully' TYPE 'S'.
ENDIF. -
Trying to Export Details Column as Text Files
In the bin, where all the information is columned regarding (on the right hand side) regarding duration/in/out... and all the other information...
Is there a way to export only that information as a text file of any sort? I have a feature film's length worth of footage, and I'm trying to create a list of all the available shots we have for the crew, what master tape they were captured from, their in and out points, and all that...
(As opposed to print screening the whole thing...)
Any help would be just fantastic and save me an incredible amount of time (or confirm I have to spend an incredible amount of time)
Thanks.Export "batch list" will give you a tab delimited text file that can be imported in to a spread sheet. Hide or add columns in the browser for further control.
-
OPEN DATASET output to Tab delimited text file???
Can anyone suggest the best way for downloading a TAB DELIMITED text file to the application server using open dataset.
I'm currently downloading the file, but I find that it puts "#"'s in place of empty numeric fields.
any help appreciated,
LeeHi Lee,
System identifies Tab delimited as #.
But its not a problem.
If you wang to download the data into intenal table,
you need to do declare delimiter.
Refer code:
CONSTANTS: c_split TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
c_hash TYPE c VALUE '#'.
data:wa_input_rec TYPE char2000.
OPEN DATASET p_appl IN TEXT MODE ENCODING DEFAULT FOR INPUT.
IF sy-subrc = 0.
DO.
READ DATASET p_appl INTO wa_input_rec.
IF sy-subrc <> 0.
EXIT.
ELSE.
*-- Split the Tab # into corresponding Columns fields.
PERFORM f0056_split_records.
APPEND wa_input_file TO i_input_file.
CLEAR: wa_input_rec, wa_input_file.
ENDIF.
ENDDO.
FORM f0056_split_records .
CLEAR wa_input_file.
SPLIT wa_input_rec AT c_split INTO
wa_input_file-column0
wa_input_file-column1
wa_input_file-column2
wa_input_file-column3
wa_input_file-column4 IN CHARACTER MODE.
ENDFORM. " f0056_split_records
Reward points if this helps.
Manish
Message was edited by: Manish Kumar
Message was edited by: Manish Kumar -
How to get tab delimited text file when Stored Procedure executes ?
Hello Everyone,
I have a stored procedure which returns 1 result set as an output.
I want the output as a Tab Delimited Text file.
I know that I can use SSIS and get the same output but I am not allowed to use SSIS in this case.
Is there any other ways ?
I will be really appreciate If someone can answer with, How many different ways I can get Tab delimited text file ?
Thanks in advance
Henaryyou can do that by using SQLCMD
http://blog.sqlauthority.com/2013/03/05/sql-server-exporting-query-results-to-csv-using-sqlcmd/
you can also use BCP
EXEC master..xp_cmdshell 'bcp "select * from tempdb.dbo.orders" queryout "c:\output.txt" -c -T'
EXEC master..xp_cmdshell 'bcp "exec usertest.dbo.proctest" queryout "c:\output.txt" -c -T'
--Prashanth -
Reading Tab Delimited Text File
HI
I am having problem in reading Tab Delimited text file.
If i place some spaces in name of text file. it dosn`t read the file.
if there is a simple name without space, then it reads easily.
but when having space in file name then it shows nothing.
PLZ help me .......
give me some code or links to solution
thanks!Could you post up an example of the file? With a FedEx report file, I created an application to read each line and split the String into an array where ever a [tab] exists. Since the columns aren't evenly tabbed, I used a regular expression to replace any whitespace in a with a \t (tab). Now it takes that line and splits it into an array where the [tab] exists. Then I access that specific column in the String by line.
08/28/2007 FedEx Ground COLO2
23:16:29 LANE FULL REPORT reptClaneFulls
Page 1
Next Sorters
Load Main Auto Smalls
Chute Point Primary Secondary Primary Secondary
0101 8001 0 11 0 0
0102 5333 0 9 0 0
0104 0142 0 441 0 0
0106 0328 0 5 0 0
0107 0452 0 2 0 0
0110 0333 0 2 0 0
0113 0447 0 7 0 0
0114 0447 0 1 0 0
0115 0303 0 11 0 0
0127 0132 0 2 0 0
0128 0132 0 11 0 0
0129 0132 0 9 0 0
0130 0405 0 102 0 0
0131 0371 0 270 0 0
0132 0371 0 168 0 0
0133 0122 0 13 0 0
0134 0456 0 36 0 0
0135 0146 0 152 0 0
0136 0146 0 2 0 0
0138 0371 0 24 0 0
0201 0552 0 9 0 0
0204 0445 0 69 0 0
0205 0445 0 51 0 0
0207 0641 0 1 0 0
0211 0551 0 1 0 0
0212 0454 0 7 0 0
0213 3441 0 39 0 0
0216 0841 0 1 0 0
0217 0631 0 211 0 0
0222 0441 0 12 0 0
0223 0 5 0 0
0224 0441 0 9 0 0
0225 0441 0 42 0 0
0226 0441 0 11 0 0
0227 0441 0 5 0 0
0229 0619 0 753 0 0
0230 0619 0 188 0 0
0231 0602 0 2 0 0
0232 0604 0 91 0 0
0233 0604 0 3 0 0
0238 0601 0 1 0 0
0304 1435 0 12 0 0
0307 2430 0 477 0 0
0309 1430 0 98 0 0
0310 1430 0 1 0 0
0311 0971 0 1 0 0
0312 0449 0 19 0 0
0313 0449 0 128 0 0
0315 0923 0 31 0 0
0316 0981 0 11 0 0
0317 0972 0 9 0 0
08/28/2007 FedEx Ground COLO2
23:16:29 LANE FULL REPORT reptClaneFulls
Page 2
Next Sorters
Load Main Auto Smalls
Chute Point Primary Secondary Primary Secondary
0318 0972 0 6 0 0
0319 2431 0 1 0 0
0323 0436 0 9 0 0
0324 0 3 0 0
0326 3431 0 12 0 0
0328 0958 0 55 0 0
0332 0430 0 84 0 0
0333 0430 0 16 0 0
0334 4430 0 29 0 0
0337 0480 0 2 0 0
0343 0555 0 36 0 0
0405 1437 0 52 0 0
0406 1437 0 51 0 0
0407 3152 0 58 0 0
0408 3152 0 2 0 0
0410 0152 0 5 0 0
0411 0152 0 3 0 0
0415 0100 0 55 0 0
0417 0253 0 95 0 0
0420 0282 0 1 0 0
0421 0282 0 82 0 0
0422 0753 0 13 0 0
0425 0165 0 9 0 0
0426 0165 0 8 0 0
0427 0089 0 21 0 0
0428 0089 0 10 0 0
0434 0437 0 3 0 0
0436 0170 0 4 0 0
0441 0263 0 9 0 0
0442 0219 0 1 0 0
0443 0219 0 20 0 0
0444 3258 0 3 0 0
0447 0156 0 89 0 0
0448 0156 0 59 0 0
0449 0156 0 1 0 0
0450 0760 0 14 0 0
0451 3163 0 16 0 0
0453 0212 0 27 0 0
0454 7760 0 2 0 0
107A 0219 0 0 0 88
108A 0219 0 0 0 89
110A 7061 0 0 0 185
111A 7061 0 0 0 190
112A 0170 0 0 0 3
113A 0170 0 0 0 1
114A 0170 0 0 0 3
118A 0089 0 0 0 261
119A 0089 0 0 0 255
120A 0282 0 0 0 5
121A 0282 0 0 0 4
122A 0753 0 0 0 6
08/28/2007 FedEx Ground COLO2
23:16:29 LANE FULL REPORT reptClaneFulls
Page 3
Next Sorters
Load Main Auto Smalls
Chute Point Primary Secondary Primary Secondary
124A 3156 0 0 0 258
125A 0258 0 0 0 74
126A 3258 0 0 0 3
127A 0263 0 0 0 34
128A 3263 0 0 0 7
129A 0152 0 0 0 39
130A 0152 0 0 0 44
131A 0152 0 0 0 33
132A 3152 0 0 0 176
133A 3152 0 0 0 181
134A 0253 0 0 0 34
135A 0253 0 0 0 34
136A 3253 0 0 0 103
137A 0156 0 0 0 85
138A 0156 0 0 0 87
139A 0437 0 0 0 271
140A 3437 0 0 0 111
141A 0165 0 0 0 204
142A 3165 0 0 0 5
143A 0163 0 0 0 9
144A 3163 0 0 0 5
147A 7760 0 0 0 9
201A 8001 0 0 0 1
202A 8001 0 0 0 2
205A 3435 0 0 0 62
206A 0402 0 0 0 218
208A 0405 0 0 0 15
212A 0411 0 0 0 5
213A 0411 0 0 0 5
214A 3441 0 0 0 224
215A 3441 0 0 0 225
216A 0410 0 0 0 9
217A 0449 0 0 0 49
218A 0449 0 0 0 51
219A 3452 0 0 0 12
220A 0452 0 0 0 4
221A 0452 0 0 0 6
222A 3431 0 0 0 33
223A 3431 0 0 0 38
224A 2430 0 0 0 14
225A 2430 0 0 0 14
226A 4430 0 0 0 15
227A 4430 0 0 0 15
228A 0430 0 0 0 4
229A 0430 0 0 0 4
230A 1430 0 0 0 11
231A 1430 0 0 0 23
232A 0456 0 0 0 96
233A 7433 0 0 0 9
234A 0333 0 0 0 3
235A 7641 0 0 0 10
08/28/2007 FedEx Ground COLO2
23:16:29 LANE FULL REPORT reptClaneFulls
Page 4
Next Sorters
Load Main Auto Smalls
Chute Point Primary Secondary Primary Secondary
236A 0802 0 0 0 5
240A 0631 0 0 0 111
241A 0551 0 0 0 3
245A 0958 0 0 0 71
246A 0554 0 0 0 72
247A 0923 0 0 0 48
248A 0371 0 0 0 31
249A 0972 0 0 0 49
250A 0381 0 0 0 3
251A 0619 0 0 0 27
253A 0604 0 0 0 48
254A 0132 0 0 0 57
255A 0132 0 0 0 53
257A 0942 0 0 0 16
307A 0951 0 0 0 138
308A 0464 0 0 0 22
309A 0641 0 0 0 45
310A 0641 0 0 0 47
311A 0122 0 0 0 16
312A 0971 0 0 0 76
313A 0602 0 0 0 37
314A 0841 0 0 0 9
315A 0841 0 0 0 8
317A 0958 0 0 0 2
318A 0532 0 0 0 35
320A 0604 0 0 0 16
322A 0981 0 0 0 90
323A 0371 0 0 0 42
324A 0972 0 0 0 13
325A 0372 0 0 0 35
326A 0928 0 0 0 14
327A 0619 0 0 0 78
328A 0328 0 0 0 17
330A 0303 0 0 0 27
331A 0923 0 0 0 1
332A 0336 0 0 0 3
333A 7850 0 0 0 7
335A 0146 0 0 0 8
337A 0454 0 0 0 20
338A 3445 0 0 0 86
339A 0445 0 0 0 371
340A 1441 0 0 0 42
341A 2442 0 0 0 111
342A 0441 0 0 0 59
343A 1442 0 0 0 23
344A 0442 0 0 0 28
345A 7441 0 0 0 66
346A 4441 0 0 0 73
347A 2441 0 0 0 72
348A 3462 0 0 0 12
349A 0462 0 0 0 62
08/28/2007 FedEx Ground COLO2
23:16:29 LANE FULL REPORT reptClaneFulls
Page 5
Next Sorters
Load Main Auto Smalls
Chute Point Primary Secondary Primary Secondary
350A 0447 0 0 0 36
351A 0447 0 0 0 43
352A 3468 0 0 0 2
353A 0468 0 0 0 13
354A 0142 0 0 0 26
356A 0436 0 0 0 7
357A 0436 0 0 0 5
359A 0480 0 0 0 20
RLBL 0 47 0 0
SSBL 0 127 0 0
SSGN 0 32 0 0
SSRD 0 323 0 0
======================================================
TOTAL: 0 5071 0 6630 -
Hi,
Can someone provide me a sample code on how to read data from a tab delimited text file into an internal table?.
Thanks,
SandeepFor example if u have 15 columns, define a internal table like this.
TYPES: BEGIN OF ty_input_file,
column1 TYPE char30,
column2 TYPE char50,
column3 TYPE char50,
column4 TYPE char50,
column5 TYPE char50,
column6 TYPE char50,
column7 TYPE char50,
column8 TYPE char50,
column9 TYPE char50,
column10 TYPE char50,
END OF ty_input_file.
DATA: i_input TYPE STANDARD TABLE OF ty_input_file.
Or if u know the data type of the value which is coming in the file u can define that in the internal table.
Then the use the below FM to upload the value to internal table.
lcl_filename will contain the file path in the file lies in the presentation server.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = i_input
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.
Also check a sample Program:
REPORT z_upload_muncpcode.
PARAMETERS : p_fname LIKE rlgrap-filename.
TYPES: BEGIN OF ty_munc,
land1 TYPE tzone-land1,
zone1 TYPE tzone-zone1,
vtext TYPE tzont-vtext,
END OF ty_munc.
DATA: i_munc TYPE STANDARD TABLE OF ty_munc,
i_tzone TYPE STANDARD TABLE OF tzone,
i_tzont TYPE STANDARD TABLE OF tzont,
wa_munc TYPE ty_munc,
wa_tzone TYPE tzone,
wa_tzont TYPE tzont.
CONSTANTS: c_path TYPE char20 VALUE 'C:\',
c_mask TYPE char9 VALUE ',*.*,*.*.',
c_mode TYPE char1 VALUE 'O',
c_filetype TYPE char10 VALUE 'ASC',
c_x TYPE char01 VALUE 'X'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
*-- Browse Presentation Server
PERFORM f4_presentation_file.
START-OF-SELECTION..
*-- Read presentation server file
PERFORM f1003_pre_file.
LOOP AT i_munc INTO wa_munc.
wa_tzone-mandt = wa_tzont-mandt = sy-mandt.
wa_tzone-land1 = wa_tzont-land1 = wa_munc-land1.
wa_tzone-zone1 = wa_tzont-zone1 = wa_munc-zone1.
wa_tzont-spras = sy-langu.
wa_tzont-vtext = wa_munc-vtext.
APPEND wa_tzont TO i_tzont.
APPEND wa_tzone TO i_tzone.
CLEAR: wa_munc, wa_tzont, wa_tzone.
ENDLOOP.
END-OF-SELECTION.
Modify Table TZONT
PERFORM enqueue_table USING text-001.
MODIFY tzont FROM TABLE i_tzont.
PERFORM dequeue_table USING text-001.
Modify Table TZONE
PERFORM enqueue_table USING text-002.
MODIFY tzone FROM TABLE i_tzone.
PERFORM dequeue_table USING text-002.
WRITE: 'Tables TZONE & TZONT are updated'.
*& Form f4_presentation_file
*& F4 Help for presentation server
FORM f4_presentation_file .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = c_path
mask = c_mask
mode = c_mode
title = text-001
IMPORTING
filename = p_fname
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 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.
ENDFORM. " f4_presentation_file
*& Form f1003_pre_file
*& Upload File
FORM f1003_pre_file .
DATA: lcl_filename TYPE string.
lcl_filename = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = c_filetype
has_field_separator = c_x
TABLES
data_tab = i_munc
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.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
ENDFORM. " f1003_pre_file
*& Form enqueue_table
*& Enqueue Table
FORM enqueue_table USING p_tabname.
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = p_tabname
EXCEPTIONS
foreign_lock = 1
system_failure = 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.
ENDFORM. " enqueue_table
*& Form dequeue_table
*& Dequeue Table
FORM dequeue_table USING p_tabname.
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
tabname = p_tabname.
ENDFORM. " dequeue_table
Regards,
Prakash.
Message was edited by: Prakash Ramu -
Receiver File Adapter - Tab delimited Text file
I am using receiver file adapter to convert message created by ABAP PROXY to convert tab delimited text file format.
XML message is in following format.
- <DT_R3_ROLES_OUTBOUND_REC>
<LIST_CATEGORY>SAP_HR</LIST_CATEGORY>
<USRID>MRUDULAP</USRID>
<EMAIL>[email protected]</EMAIL>
<NAME>MRUDULA PATEL</NAME>
</DT_R3_ROLES_OUTBOUND_REC>
- <DT_R3_ROLES_OUTBOUND_REC>
<LIST_CATEGORY>SAP_HR</LIST_CATEGORY>
<USRID>HCHD</USRID>
<EMAIL>[email protected]</EMAIL>
<NAME>H CHD</NAME>
</DT_R3_ROLES_OUTBOUND_REC>
I have used file content conversion in the adapter configuration.
Recordset structure = DT_LISTSERV_INBOUND_REC
DT_LISTSERV_INBOUND_REC.addHeaderLine = 0
DT_LISTSERV_INBOUND_REC.fieldSeparator = ','
How to use Tab as the delimiter in the fieldSeparator field?
Now the output in the file is as follows :
[email protected]'MRUDULA PATEL
[email protected]'H CHD
What I need to do to make the file as the tab delimited file?
Thanks in advance!
Mrudula PatelHi Mruddula,
Use fieldSeparator: '0x09' for horizontal tab
<b>DT_LISTSERV_INBOUND_REC.fieldSeparator: '0x09'</b>
Naveen -
How do I save a Number file to an delimited text file
I was trying to import all my conatct that I created from Number to iList, I kept on failing, after I did some reaserch, and found out I need to save to an delimited text file. Can anybody help me? Or if anyone can direct me from import an Number file into iList, it would be wonderful, please help.
Thank againYou have a couple of options to convert the data to a tab-delimited file. The easist may be to copy the table from Numbers & paste it into a Pages word processing document. From there you can export it as a plain text file which you can then import.
Jerry,
IList Data is a database app that may be a solution for those moving from AppleWorks. It's more than Bento & less than FileMaker. -
How can we read a column from text file
hai,
the Text file contains :
m1 m2 m4 89
m1 m2 m4 89
m0 m4 m2 90
I need one array for each column
m[0]= m1,m1,m0 (first column from text file)
m[1]= m2,m2,m2 (second column from text file)
m[2]= 89,89,90 (third column from text file)
andvance thanksIf a 2D array is OK (instead of 4 separate arrays), try something like this
import java.io.*;
import java.util.ArrayList;
class FileReadColumns
public static void main(String args[]) throws IOException, FileNotFoundException
String line;
ArrayList lines = new ArrayList();
BufferedReader in = new BufferedReader(new FileReader("data.txt"));
while ((line = in.readLine()) != null) lines.add(line);
String bits[];
bits = lines.get(0).toString().split(" ");
String grid[][] = new String[bits.length][];
for(int i=0;i<grid.length;i++)grid[i] = new String[lines.size()];
for(int i = 0; i < lines.size(); i++)
bits = lines.get(i).toString().split(" ");
for(int ii = 0; ii < bits.length; ii++) grid[ii] = bits[ii];
for(int i = 0; i < grid.length; i++)
for(int ii=0;ii<grid[i].length;ii++)System.out.print(grid[i][ii]+" ");
System.out.println();
System.exit(0); -
Hi friends,
My requirement is i need to download a tab delimited text file.
i am using the below coding but i am able to download a file but it is not coming with delimited.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = file_str
write_field_separator = 'X'
TABLES
data_tab = outab
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.
pls give solution for thishi ,
Plz chek the below code...
v_name1 is the destination where u want to store
c_asc is the constant '.ASC'
C_X MEANS 'X'.
Down load the contract error files to presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = v_name1
filetype = c_asc
write_field_separator = c_x
TABLES
data_tab = i_error
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 e140.
ENDIF.
Regards,
Nagaraj -
Application Server Download - Tab Delimited Text File
Hi,
I am trying to create a tab delimited text file in application server. Is there any option should i use with the Open Dataset / Transfer statements? My requirement is to download the file (Text - Tab Delimited) into Excel for further analysis. Can you please suggest me a suitable solution for this?
Thanks,
Kannan.Hi,
You can use transactions CG3Y and CG3Z. Its very simple.
Refer sample code:
constants: c_split TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
c_path TYPE VALUE char100 '/local/data/interface/A28/DM/OUT'.
*& Form f1001_browse_appl_file
Pick up the file path for the file in the application server
FORM f1001_browse_appl_file .
DATA: lcl_directory TYPE char128.
lcl_directory = p_direct.
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = lcl_directory
filemask = c_mask
IMPORTING
serverfile = p_f2
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE s000 WITH text-039.
EXIT.
ENDIF.
ENDFORM. " f1001_browse_appl_file
*& Form f1004_app_file
upload the file from the application server
FORM f1004_app_file .
REFRESH: i_input.
OPEN DATASET p_f2 IN TEXT MODE ENCODING DEFAULT FOR INPUT.
IF sy-subrc EQ 0.
DO.
READ DATASET p_f2 INTO wa_input_rec.
IF sy-subrc 0.
MESSAGE s000 WITH text-030.
EXIT.
ENDIF.
o
+ Split The CSV record into Work Area
PERFORM f0025_record_split.
o
+ Populate internal table.
APPEND wa_input TO i_input.
CLEAR wa_input.
ENDDO.
ENDIF.
ENDFORM. " f1004_app_file
*& Form f0025_record_split
Move the assembly layer file into the work area
FORM f0025_record_split .
CLEAR wa_input.
SPLIT wa_input_rec AT c_split INTO
wa_input-legacykey
wa_input-profile_role
wa_input-read_date.
ENDFORM. " f0025_record_split
DO your manipulation with the data records here.
Popualte data into final internal table and write it back to application server at the desired path.
*& Form f0020_write_application
Write error log to application Server
FORM f0020_write_application .
IF p_f1 IS NOT INITIAL.
CONCATENATE p_direct p_obj sy-datum text-037 INTO p_f2.
ELSEIF p_f2 IS NOT INITIAL.
REPLACE text-036 IN p_f2 WITH text-037.
ENDIF.
OPEN DATASET p_f2 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc 0.
EXIT.
ENDIF.
LOOP AT i_error INTO wa_error.
TRANSFER wa_error TO p_f2.
IF sy-subrc 0.
EXIT.
ENDIF.
CLEAR wa_error.
ENDLOOP.
CLOSE DATASET p_f2.
ENDFORM. " f0020_write_application
HTH,
Regards,
Dhruv Shah
Maybe you are looking for
-
Hi there. My question concerns http://www.energywa.co.za You can click on any of the 2 images on the right. When clickin in FF and Google Chrome, the lightbox works 100%. But, when trying it in IE 8, the image opens on the same page. When clicking an
-
Using the ACE 4710 for loadbalancing a Sharepoint site. We currently have a HTTP probe setup to check the port 80 status of the rserver. Is there anyway to get the HTTP probe to check a DNS entry for each of the application sites? For instance http:/
-
Hi at last i made a simple application in java which send mail like outlook using swing.now i want that my friends to use this but they did not have any jdk.i use InstallAnywhere but it is not working can any one tell me how to run it without using j
-
I just activated my iphone 4s but i am not getting service
just activated 5 mins ago and is not getting service. have plugged it into the computer and restarted it.
-
if i were to transfer the contents of my itunes library to an external hard drive how do I not lose it from my i pad the next time it syncs ?