Uploading comma delimited text file
Dear Experts,
I want to upload comma delimited text file in sap and get that values into internal table
Can any 1 provide a sample code ??
thanx in advance.
Hi Suchitra ,
There is FM GUI_UPLOAD which will help you in this.
Its has got one parameter calles has_field_separator . Here you can pass comma. So that this will take care while uploading the data in Internal table.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = wf_file
filetype = 'ASC'
has_field_separator = ','
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = it_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
Hope this will help you.
Regards,
Nikhil
Similar Messages
-
Comma delimited text file using pl/sql ???
Hi friends
I want to create a comma delimited text file from emp table like using pl/sql program. I have oracle 8.0.4.0.0 production.
emp.txt
7844,TURNER,SALESMAN,7698,08-SEP-81,1500,0,30
7876,ADAMS,CLERK,7788,23-MAY-87,1100,,20
7900,JAMES,CLERK,7698,03-DEC-81,950,,30
Thanks
SaiHi Justin
I traced out the error message, is below,
1 declare
2 fh utl_file.file_type;
3 d varchar2(20) := 'sample data';
4 sql_err number(10);
5 error_info varchar2(60);
6 begin
7 fh := utl_file.fopen('c:\','A.TXT','A');
8 utl_file.put(fh,d);
9 dbms_output.put_line('file created');
10 d:='&urdata';
11 utl_file.putf(fh,'\n given data is %s\n',d);
12 utl_file.put_line(fh,'this is last line');
13 utl_file.put(fh,'hello');
14 utl_file.fflush(fh);
15 utl_file.fclose(fh);
16 exception
17 when others then
18 sql_err := SQLCODE;
19 error_info := SQLERRM;
20 dbms_output.put_line(SQL_ERR||'-'||error_info);
21 if utl_file.is_open(fh) then
22 utl_file.fclose(fh);
23 end if;
24* end;
SQL> /
Enter value for urdata: TEST
old 10: d:='&urdata';
new 10: d:='TEST';
1-User-Defined Exception
PL/SQL procedure successfully completed.
Sai -
Upload Comma separated Text file.
Hi all ,
i would like to upload a comma seperated text file into an internal table using CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD but am not able to load correctly. Please let me know any aditional parameters should be pass to this FM.
data **********
060000012,1001,01052005,2.5,C123,0198345678912
08000001,1001,01052005,5.0,C123,016545678912
08000001,1002,02052005,2.5,C234,012345678912
types : Begin of ty_itab,
pernr(10),
ABS_ATT_TYPE(4),
REC_CCTR(10),
work_order(12),
date(8),
hours(8).
types: end of ty_itab.
data : itab type standard table of ty_itab with header line .
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
EXPORTING
FILENAME = 'C:\LOAD.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
DAT_MODE = SPACE
CODEPAGE = SPACE
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
READ_BY_LINE = 'X'
IMPORTING
FILELENGTH =
HEADER =
CHANGING
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
NOT_SUPPORTED_BY_GUI = 17
ERROR_NO_GUI = 18
others = 19
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thx
Palanias you are telling that is comma delimited then save the file as comma delimited,
this can be done uisng excel , open the text fiel with excel and save it as .csv file. and try ...
or else i will tell another solution for it...
Data: begin of itab occurs 0,
rec(1000) type c,
end of itab.
Data: begin of itab2 occurs 0,
matnr type mara-matnr
werks type marc-werks
quant(10) type c.
end of itab2.
file = 'C:test.txt'.
call method cl_gui_frontend_services=>gui_upload
exporting
filename = file
filetype = 'ASC'
has_field_separator = 'X'
changing
data_tab = itab
exceptions
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.
clear itab2.
split itab-rec at ',' into itab2-matnr
itab2-werks
itab2-quant.
append itab2.
endloop.
you can do using any of the one... -
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 -
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 -
Pgm to upload a tab delimited text file
Hi ,
can anyone send me a program to upload a tab delimited text file into a ztable.
My email id is : [email protected]
Thanks
KajolCheck the below code:
*& Report Z_UPLOAD_MUNCPCODE *
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. -
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. -
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 -
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 -
SQL to match a single value in a field with comma-delimited text
I have a column that can contain none, one or many recordIDs
(from another table) stored as comma-delimited text strings (i.e.,
a list). I need to retrieve all records that match a single value
within that list.
For example, if I want to match all values that equal
recordID 3, and I use ... WHERE MyColumn IN ('3') ... , I will get
all records that have EXACTLY 3 as the value of MyColumn, but not
any MyColumn records whose values include 3, if they are instances
such as "3,17" or the like.
Also using the LIKE operator -- as WHERE MyColumn LIKE '%3%'
-- will get me unwanted records with values such as 35 or 13 ...
Can I use some sort of intervening ColdFusion list processing
to output only the desired records?Normalize your database so that your data becomes
accessible. -
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
Maybe you are looking for
-
Error: Internal error (WWC-00006) An unexpected error has occurred in pages: ORA-06502: PL/SQL: numeric or value error: character to number conversion error (WWC-44847) Couldn't save attribute Content_Owner. (WWV-03005) Couldn't save attribute Conten
-
File Adapter: Target directory does not exist
Hi All, Using RFC to File Scenario. While processing in File adapter, i get following error for the target directory. Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interface
-
Hi gurus, i have a question regarding bank routing code error. Heres the scenario.. Our vendor created 2 check request, one in US currency and one in AUD currency. When I executed the payment run, the payment doc that was in US currency was received
-
How to pass a single character to dll (as a parameter)
How do pass a single character to dll (as a parameter). This is a third party dll that i am unable to change. e.g.: int functionName(char* process, char myChar);
-
Hello, i am new to webmatrix or should i say web application in general. i have read and looked at the tutorial to see if there is any out there online that talks and teach about sending private message between users just like the facebook website.