Add double quotes (") surrounding each field in GUI_DOWNLOAD
Experts,
Does anyone know if it is possible to add double quotes (") to all fields in .txt file using FM GUI_DOWNLOAD besides manually concatenate the quotes into each field before calling the FM?
For example, output need to be:
"0000123" "NAME1" " 200.00"
Any advice is greatly appreciated.
Best regards,
Minami
If you are interested, here is a complete solution.
report zrich_0001.
data: it001 type table of t001.
data: xt001 type t001.
data: iflatf type table of string.
data: xflatf type string.
data: filename type string.
data: field_value type string.
field-symbols: <fs>.
* Selection Screen
selection-screen begin of block b1 with frame title text-002 .
parameters: p_file type localfile default
'C:Test.txt'.
selection-screen end of block b1.
start-of-selection.
select * into table it001 from t001.
loop at it001 into xt001.
do.
assign component sy-index of structure xt001 to <fs>.
if sy-subrc <> 0.
exit.
endif.
concatenate '"' <fs> '"' into field_value.
if sy-index = 1.
xflatf = field_value.
else.
concatenate xflatf field_value into xflatf separated by space.
endif.
enddo.
append xflatf to iflatf.
endloop.
filename = p_file.
call method cl_gui_frontend_services=>gui_download
exporting
filename = filename
filetype = 'ASC'
changing
data_tab = iflatf.
Regard,
Rich Heilman
Similar Messages
-
Double entry in each field of Adobe Acrobat Pro
I am using Adobe Acrobat Pro to complete a prepared form. Upon entering data in to blank fields, I get a duplicate entry in each field box in a different font size when I tab or enter to the next field. I am sure it is a setting, any suggestions?
Thank you George.
After messing around a bit I was able to open in acrobat pro and remove the duplicate fields. Thank you for your help.
Randy -
How to detect apostrophe and add double quote on that?
Hi!
I have a user name is CH'NG
His name has an apostrophe ' over there.
I use GUI_UPLOAD to read from a xml file and store inside a local variable,
<b>lv_name = 'CH'NG'.</b>
I encounter the problem of endless ending because of these 3 apostrophes.
Therefore, I wish to write some code like, if i detect the lv_name contains any apostrophe, i will add another 2 apostrophes infront of the single quote (which i viewed from other threads, saying that putting a 2 apostrophe can solve the problem ), such as:
IF lv_name CA apostrophe.
lv_length = strlen( lv_name ).
lv_len = sy-fdpos + 1.
CONCATENATE lv_name+0(sy-fdpos) 2 apostrophe lv_name+ lv_len(lv_length) into lv_result.
ENDIF.
so, my lv_result: CH'''NG
Kindly advise.
thanks a lot!
br,
hyHuai,
Just copy this code and execute
report ZTEST11.
DATA : V_len type i,
v_num type i.
parameters : v_str(20) .
start-of-selection.
v_len = strlen( v_str ).
do .
v_num = v_num + 1.
if v_len eq v_num.
exit.
else.
if v_str+0(v_num) ca '*'.
REPLACE '*' WITH space INTO v_str.
v_num = v_num - 1 .
v_len = v_len - 1.
endif.
endif.
enddo.
condense v_str.
write v_str.
don't forget to reward if useful -
JS - surrounding selected text with double quotes
I have a working script which places brackets around selected text in the main body of my document (not in a table), but when I changed the script to insert double curly quotes, the script wont work.
Why wont this JS work (script stalls on the var line):
var myObject = (app.selection[0].parent.constructor.name == "Cell") ? app.selection[0].parent.texts[0] : app.selection[0];
with (myObject)
insertionPoints[-1].contents = "";
insertionPoints[0].contents = "";
while this one does work:
var myObject = (app.selection[0].parent.constructor.name == "Cell") ? app.selection[0].parent.texts[0] : app.selection[0];
with (myObject)
insertionPoints[-1].contents = ")";
insertionPoints[0].contents = "(";
Thx Oz
PS The quotes are showing as three straight quotes above, but in my script they are two straight double quotes surrounding either a right or a left curly double quote.Perhaps there's a Smart Quotes interpreter in JS? Who knows.
If you find it failing again, try inserting the quotes as Unicode values, as these should not be subject to any translating.
I.e.,
>insertionPoints[-1].contents = "\u201c"; -
GetColList to return fields enclosed in double quote?
hi.. newbie question.. I searched but couldnt find an answer..
I have a connection to progress tables, where the tablenames & column names contain hyphen (ie: "gla-account"."account-no")..
the getColList from LKM failed to enclosed the column names in double quotes, I tried inserting \" into the getColList codes but it kept crashing.. what's the correct syntax to add double quotes ?
thanks..
HThi Cezar, actually, when i tested it - it worked fine with selecting tables if column-names do not contain hyphen.
when the datastore contains column with hyphen, getColList just refused to come back at all.. so it looks like getColList cannot read from the model ? -
I need to add " " within a sentence inside my CFscript. When
I applied it, I got an error, it seems that CFScript doesn't like
the extra "" within "". What should I do so the word "Warning"
appear to user within this double quotes
<CFSCRIPT>
.......some codes here
structFormText[numKey][1]["formText"] = "I have some text
here and I need to put double quotes surrounding a word within this
sentence so that my user will be able to see "Warning" like what
you are seeing now ";
................................some codes here
</CFSCRIPT>Yet another variation
<cfscript>
x="...my user will be able to see #chr(34)#Warning#chr(34)#
like what you are seeing now ...";
</cfscript>
<cfoutput>#x#</cfoutput> -
How to Include Double Quotes in the Column Name
Hi,
I am using Dynamic Sql for creating the columns of a table. I am getting a situation where the user will give the double quotes for some column names. So,Can we add double quote to the column name.
Thanks in advance.
Regards,
Alok Dubeyhttp://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements008.htm
However, neither quoted nor nonquoted identifiers can contain double quotation marks or the null character -
I have a table with 74 numerical fields for a given date. The table looks something like
RecordDate Field1
Field2 Field3
.... Field74
I would like a line chart for each field with the value on the Y axis and date on the X axis. That part is easy enough.
The problem is that if I put 74 lines on the same chart it will be unintelligible. Unfortunately I think the best way to observe trends in the data over time is a line chart for each.
I know that I could manually add a separate chart for each one. However, I'd like to dynamically add a chart for each field. We may potentially add Field75 down the road, so avoiding reengineering the report each time is desirable. Is something
like this possible?
Thanks!Hi Mateoc15,
If I understand correctly, you want to specify a Chart Area for a Series in order to increase the readability of the chart.
In Reporting Services, the bar, polar, or shape series can only be combined with series of the same chart types in the same chart area. If you are using a Polar or Shape chart, you can consider using a separate chart data region for each field that you wish
to show.
For the details, please refer to the link:
Specify a Chart Area for a Series (Report Builder and SSRS)
Regards,
Heidi Duan
Heidi Duan
TechNet Community Support -
Read CSV file each field is enveloped within double quotes
Hi All,
I have a txt file in Apps server which is separated by comma but each values are in double quotes.
Reason some text fields might have comma as value and not as separator
Example:-
"00601100001","","","","","BIJOUTERIE ,SARAH III","","1500"
How will i read this file.
thanks in advance.
SGHi,
try this code... file contains 3 fields , separtde by comma...
* report name
REPORT zupload_csv_file.
* data declarations
TYPES: BEGIN OF ttab,
rec(1000) TYPE c,
END OF ttab.
TYPES: BEGIN OF tdat,
fld1(10) TYPE c,
fld2(10) TYPE c,
fld3(10) TYPE c,
END OF tdat.
DATA: itab TYPE TABLE OF ttab WITH HEADER LINE.
DATA: idat TYPE TABLE OF tdat WITH HEADER LINE.
DATA: file_str TYPE string.
* selection screen design
PARAMETERS: p_file TYPE localfile.
* at selection screen for field
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
static = 'X'
CHANGING
file_name = p_file.
* start of selection
START-OF-SELECTION.
file_str = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_str
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.
* process and display output
LOOP AT itab.
CLEAR idat.
SPLIT itab-rec AT ',' INTO idat-fld1
idat-fld2
idat-fld3.
APPEND idat.
ENDLOOP.
LOOP AT idat.
WRITE:/ idat-fld1, idat-fld2, idat-fld3.
ENDLOOP.
With Rgds,
S.bharani -
Single and double quotes entered in form field cause corruption?
I am creating a database change request system using in APEX 2.2 and the main form has a description field (clob) and a API_description field (varchar2(4000)) that are text area fields on the page. The form seems to have trouble when the string data entered into the text area page items on the form contain single and double quotes.
<br><br>
I have pasted my test data below in this problem description(this is not true sql but it gets the point accross). I use the wizard created insert process to get the data into the db from the text fields in the wizard generated form, then use the wizard created fetch process to get the data back out and rendered on the same form. When I use the test data below, sometimes a few characters dissappear from my input data on the way out, sometime form fields go away, and their html is interspersed with the previous form field's data on the page. And I get different results on different tests with the same data.
<br><br>
Do I have to do something special for a vanilla htmldb text page item on a form to be able to receive single and double quotes in the string input in order to avoid that string data confusing the processing on the way in to the Database or on the way out for rendering?
<br><br>
Do I have to escape the characters? How do I do this?
<br><br>
The "varchar2(1) := ‘A’" part of the below TEST DATA string seem to cause the most trouble. The behavior is erratic - sometimes the pattern works, sometimes html is interspersed in one place, sometimes another (on the way back out)
<br><br>
START TEST DATA:
Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
Or
Create a file with following sql in it
Insert into sometable values(‘A’,sysdate);
Or
create new table as follows
create table “someschema”.“sometable”
(id number not null,
Name varchar2(20) not null,
Join_date sysdate
Active varchar2(1) := ‘A’
END TEST DATA:
<br><br>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Here is an example of the test data being displayed after being fetched back out of oracle (this will look like gibberish when rendered in the forum system (end of problem description except for example):
<br><br>
env
Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
Or
Create a file with following sql in it
Insert into sometable values(‘A’,sysdate);
Or
crete new tableas follws
crate table “somesca”.“sometable”
har2(20) not null,
Join_date sysdate
Active varchar2(1) := ‘A’
woextarea>
<a class="eLink" title="Edit" href="javascript:popupURL('f?p=4000:371:204538675714370::::P371_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:1034609472735510,104,2');" tabindex="999"><img src="/i/e.gif" alt="Edit" class="eLink" /></a></td></tr><tr><td nowrap align="right"><label ...I found a good php related post that has a nice set of the potentially problematic characters (this is in the context of word pasted into IE I think). I am pretty confident that at least single curly quotes do not work well in apex 2.2). I would not be surprised if some of the others were trouble as well.:
http://lists.evolt.org/archive/Week-of-Mon-20030602/141975.html
here is the list
$trans_tbl[chr(34)] = '"' ; // quote
$trans_tbl[chr(38)] = '&' ; // ampersand
$trans_tbl[chr(60)] = '<' ; // less-than
$trans_tbl[chr(62)] = '>' ; // more-than
$trans_tbl[chr(128)] = '€' ; // euro
$trans_tbl[chr(129)] = '€' ; // euro
$trans_tbl[chr(130)] = '‚' ; // low quote
$trans_tbl[chr(131)] = 'ƒ' ; // florin
$trans_tbl[chr(132)] = '„' ; // double low quote
$trans_tbl[chr(133)] = '…' ; // ellipsis
$trans_tbl[chr(134)] = '†' ; // dagger
$trans_tbl[chr(135)] = '‡' ; // double dagger
$trans_tbl[chr(136)] = 'ˆ' ; // circumflex
$trans_tbl[chr(137)] = '‰' ; // per thousand
$trans_tbl[chr(138)] = 'Š' ; // S caron
$trans_tbl[chr(139)] = '‹' ; // left angle quote
$trans_tbl[chr(140)] = 'Œ' ; // OE ligature
$trans_tbl[chr(142)] = 'Ž' ; // Z caron
$trans_tbl[chr(145)] = '‘' ; // left single quote
$trans_tbl[chr(146)] = '’' ; // right single quote
$trans_tbl[chr(147)] = '“' ; // left double quote
$trans_tbl[chr(148)] = '”' ; // right double quote
$trans_tbl[chr(149)] = '•' ; // bullet
$trans_tbl[chr(150)] = '–' ; // en dash
$trans_tbl[chr(151)] = '—' ; // em dash
$trans_tbl[chr(152)] = '˜' ; // small tilde
$trans_tbl[chr(153)] = '™' ; // trademark
$trans_tbl[chr(154)] = 'š' ; // small s caron
$trans_tbl[chr(155)] = '›' ; // right angle quote
$trans_tbl[chr(156)] = 'œ' ; // oe ligature
$trans_tbl[chr(158)] = 'ž' ; // small z caron
$trans_tbl[chr(159)] = 'Ÿ' ; // Y with diaeresis
<br>
-Geoffrey -
Can't import csv fields starting with double quotes but lack ending ones
Hi all,
When I'm trying to used external table to import a csv file, specified as using comma as delimiter optionally enclosed by double quotes, some records are rejected because a field in the record has starting double quotes, but without ending ones.
Assume the customer really want these starting double quotes, how do I change my external table specification such that these starting double quotes are treated as part of the field data and can be successfully inserted into db?
Many thanks.I have no access to Oracle during weekends, so nothing can be tested. So here it goes:
Suggestion: DELIMITED BY '","' and of course omitt ENCLOSED BY '"'
You will have to update each row of the rows just loaded setting the first_field to substr(first_field,2) and the last_field to substr(last_field,-2)
If all the fields are not enclosed in double quotes (TRUE for strings and FALSE for numbers and dates) the situation (syntax diagrams allow two delimiters only) is somehow more complicated, anyway you can specify DELIMITED BY ',' and update all varchar2 fields in each row of the rows just loaded setting the varchar2_field to substr(varchar2_field,2,length(varchar2_field) - 2).
Regards
Etbin
After posting I noticed it's difficult to distinguish between single and double quotes:
the first DELIMITED BY should read {single quote){double quote}{comma}{double quote}{single quote)
the ENCLOSED BY should read {single quote){double quote}{single quote)
Message was edited by: Etbin
user596003 -
Add Quotes "" to all fields of mapping
Hi,
I need to add Quotes "" to all mapping fields for an outbound interface.
Can this be done with FCC parameters?Hi Kushwaha,
Use the following parameters as i speceified i think it should match your requirement
node.fieldSeparator = "," (doublequotes + comma + doublequotes)
node.endSeparator = "'nl' (doublequotes + newline)
node.beginSeparator = " (double quotes)
Dont put any space in between the characters. Try this and let us know the output.
Thanks
Giridhar -
Gui_Download....How to Output the each field in different line
Hi All,
I need to create a text file that will be downloaded into the pc with the format as
Personnel Number
Amount
Bank
etc...
i.e each field should be in a new line.
and i have to add the Constants like :20:, :23B: etc before each field.
How can i make this possible?
Please Help its urgent.
Regards
ShareefHi,
Could you please provide a sample code for that.
i have tried with it but it is coming in one line.
Thanks in advance
Regards
Shareef -
CSV file with text qualifiers around each field causing error on Import
Hi
I have a csv file which I am trying to import - a one line extract is shown below. It is delimited by semi colon and each field has a text qualifier around it.
XXX Drinks Ltd;"BR01";"1";"001.2008";"2008";"Distribution";"-186";"-186";"-186"
When importing i get the following issue
1) BPC doesn't seem to handle the text qualifier for the fields. For example the "BR01" field above requires me to put a conversion as follows ""BR01"" i.e. I have to double the quotes because BPC adds them
2) Even after the required conversion, BPC does not like the double quotes around the amounts, even though when validating the transform I get no error message, when running the import package I get the following message
Record Count: 1
Accept Count: 1
Reject Count: 0
Skip Count
The number of failing rows exceeds the maximum specified. (Microsoft Data Transformation Services (DTS) Data Pump (8004202c): TransformCopy 'DTSTransformation__9' conversion error: General conversion failure on column pair 1 (source column 'SIGNEDDATA' (DBTYPE_STR), destination column 'SIGNEDDATA' (DBTYPE_NUMERIC)).)
Does this my source file can't have double quotes as a text qualifier?
thanks in advance
Scott FarringtonJames, thanks for your reply
does that mean that BPC can't deal with the double quotes? I understand about removing them and using a comma for a delimiter, but this is the file format I have been given.
What I really need to know is, given this format, using a transformation and/or mapping function, can I import the data the way it is?
And I still need an answer to my second point, about the error message received on running the import package,
thanks
Scott -
Double quotes missing in CSV file but exist in text file from AL11
Hi I am sending a file to AL11 with one of the fields having double quotes Like "field value" . When i download into Text file i am seeing the quotes but not when download as CSV file from Al11. Any SAP notes for this . If i add multiple quotes ' """" ' to have in csv I am seeing more quotes in text file which is not accepted . Please reply if anyone worked on this before . Thanks Kamesh
The CSV file also has the quotes (check in notepad), but when opened in MS Excel, Excel has a feature to ignore double quotes and consider the comma inside the quotes as part of field, not as a field separator.
Maybe you are looking for
-
Mac Pro files to new iMac via my Time Capsule
I've read a lot of post, but still am scared... In a nutshell I got my new iMac quad core. I have my intel Mac Pro and Macbook Pro both hooked up to my time capsule for internet and back-up. What are the safest/best steps for transfering my files fro
-
"Newbie" How do I "Make a URL"?
I am new to this and need to see if anyone can help me. So, apologies are in order in advance, if this is a dumb question. I work in a school district and I am trying to put our podcast on our streaming server. However, our Tech Director is so busy,
-
Hello , Can anybdy plese let me know any se16n table where we can obtain the ship to party via the sold to . I can get the sold to or payer from vbrp but it doesn't show the ship. Basically what i am trying to get is the tax data( in the item condi
-
TS3297 changed itune account; get "unknown error" when I try to download updates
I had a shared itune account. The main account changed email address and password. I opened up a new itune account with the old email address and a differnent password. I can log into the account. I can not update applications
-
Tried to cancel my membership after the second payment, but i cant do it
I tried to cancel my month-to-month membership, but i cant find the 'cancel my membership' button even after following the steps. PS: I already paid the second payment