Delimited text file
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 this
hi ,
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
Similar Messages
-
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. -
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. -
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 -
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 -
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 -
EXcel to tab delimited text file
I am saving an excel file into a tab delimited text file so that i can use it for uploading data.
The excel file contains a text field in which there is a comma ',' .
for all the fields which has a comma in the excel file
the text file is adding double qoutes " in the beginning and end of the filed.
for example
contents of filed in excel file is : GASKET, FLAT OEM 1380X1530X3 SIL ARAMIDE
and in the text file it is coming as "GASKET, FLAT OEM 1380X1530X3 SIL ARAMIDE"
i dont want the " in the beginning and end
can anybody help.
points will be rewarded.
I am just saving the excel file as tab delimited text file and i am getting the quotes added in the begining and end.
Thanks.Thats to preserer the comma in between otherwise when you upload the same the data will split at comma.
Regards,
Amit
Reward all helpful replies. -
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 -
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 -
Small doubt reg upload from tab delimited text file
Hi all,
i am uploading a tab delimited text file to a ztable.
I moving the text file in to internal table
data : begin of i_tab occurs 0,
text(1024) type c,
end of i_tab.
then i have passed to FM GUI_UPLOAD.
and then splitting
loop at i_tab.
split i_tab at con_tab
into i_xyz-matnr
i_xyz-werks.
append i_xyz.
endloop..
is this the right approach . iam getting the results but iam just curious to know.
Do i need to internal like the one i created
data : begin of i_tab occurs 0,
text(1024) type c,
end of i_tab.
or do i need to create one with field that i have in text file.
data : begin of i_tab occurs 0,
matnr like mara-matnr,
werks like marc-werks
end of i_tab.
WHICH ONE OF THE TWO IS RIGHT.
THANKS IN ADVANCEThere will be NO difference,i guess in the 2 methods.
you can use which you like.
Check the below program,i also given quantity fields F2,F3.
its working fine
REPORT ZSRIM_TEMP13.
data : begin of itab occurs 0,
f1(20) type c,
f2 type i,
f3(10) type p DECIMALS 2,
end of itab.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'c:a.txt'
FILETYPE = 'ASC'
<b>HAS_FIELD_SEPARATOR = 'X'</b>
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH = FILELENGTH
* HEADER = HEADER
TABLES
DATA_TAB = ITAB
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.
ENDIF.
LOOP AT ITAB.
WRITE :/ ITAB-F1, ITAB-F2,ITAB-F3.
ENDLOOP.
my input file i created with TAB seperated text file,
here is the input file
LINE1 1000 123.25
LINE2 2000 234.25
LINE3 3000 345.25
LINE1 1000 123.25
LINE2 2000 234.25
LINE3 3000 345.25
Regards
Srikanth
Message was edited by: Srikanth Kidambi -
FM to upload TAB DELIMITED TEXT file into Internal table.
Hello Friends,
The FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' is used to upload EXCEL file into a Internal table.
Is there any FM which performs the simillar operation on TAB DELIMITED TEXT FILE.
Thanks in advance!
AshishHi,
To upload text file with tab delimated you can use FM
GUI_OPLOAD.
In this function you have put X in the field HAS_FIELD_SEPARATOR.
Regards,
Sujit -
Tab Delimited Text File to be Emailed (External Email ID) from SAP
Hi,
I have a requirement to email a tab delimited text file as an attachment to external email id from SAP. The text file is of line with type string and the length of each line is about 1024 char size. Can you please suggest me a suitable solution to this requirement? It looks like the FM: SO_NEW_DOCUMENT_ATT_SEND_API1 can handle a text file of 255 char length. I am not sure how to attach a text file of records with length more than 1025 char size.
Appreciate your help in advance.
Thanks,
KannanHi,
I have a requirement to email a tab delimited text file as an attachment to external email id from SAP. The text file is of line with type string and the length of each line is about 1024 char size. Can you please suggest me a suitable solution to this requirement? It looks like the FM: SO_NEW_DOCUMENT_ATT_SEND_API1 can handle a text file of 255 char length. I am not sure how to attach a text file of records with length more than 1025 char size.
Appreciate your help in advance.
Thanks,
Kannan
Maybe you are looking for
-
HT201318 How can i get a refund from storage i purchased?
Last week, I was unable to upgrade to IOS 6 on my iPhone. I purchased more storage ($40/25GB) via iCloud storage plan. However, storage doesn't seem to be the problem. I no longer feel that I need extra storage. Please tell me how I can get a refund
-
Newest problem-screen freezing!
I have a droid ultra that is running version 4.4.4 that was updated in July. I too keep getting the "messaging has stopped working" error. I can't upload any pictures that I take to social media, I get an error saying cant complete upload. My Xfini
-
Editing a form after it has been protected
I'm creating forms using acrobat and I distribute them manually to reader user's by activating reader extended features. Before doing that, I'm asked to protect the document with a password. Where do I input that password to turn my form back to ed
-
Cisco ISE and New Version of AntiVirus...not DAT
So I have ISE ready to go for our VPN users. Testing has been great and it looks like we are ready to roll out. Then comes along a new version of our corporate AntiVirus software. We have had Kaspersky EndPoint Security v8 since last August. Now Kasp
-
I am moving a computer to a new use and need to change the computer name. After reformatting the hard drive and installing OSX and running all updates I was surprised to see the original computer name in the Sharing preference pane. So I changed it t