Strange sqlloader loader issue with carriage return in Unix
Oracle 10g
Solaris
Hi All, I'm having issues in running some data into a table via sqlloader. The data was extracted using concatanated SQL with a | delimiter. sql script was executed in the shell to produce the data file.
eg
a,b,c|
d,e,f|
The control file specifies a string terminator as "str '|\n'" but when i run the sqlloadr command on the unix box I states that
no terminator found after TERMINATED and ENCLOSED field.
Ive tried it with \n\r same sort of issue.
The strange scneario i encountered was when I just specified "str '|'" as I read unix would default to \n, the weird thig was that my 6 records DID load into the table succesfully but a bad file was produced with a | character in it and the log file specfied that it tried to load 7 records where 6 were succesfull and 1 failed even though I only had 6 record to play with in the 1dst place.
Any ideas / thoughts greatly appreciated?!
Kind regards
Satnam
Hi All,
Ive updated the problem..with some output... essentially Ive get it to a situation wher I load ALL my records into the table but I still get a bad file with a "|" record issue and the log file still syas that Im trying to load 7 record when I only have the 6 records.
...............SQL statment...
set trimpspool on
set feedback off
set heading off
set linesize 500
set pagesize 0
spool loaddata_FP.lst
SELECT '"'||spart.x_lsm_region||'"'||','||
'"'||spart.x_sub_type||'"'||','||
'"'||spart.x_origin_type||'"' ||'|'
FROM siebel.cx_ls_part_ship spart;
spool off
-- sample of control file
load data infile 'loaddata_FP.lst' "str '|'"
into table siebel_data_fp fields terminated by "," optionally enclosed by '"'
(x_lsm_region,
x_sub_type,
x_cust_face_staff,
x_nature_partner,
x_origin_type)
--sample log file with error why is it telling me I have 7 records when I am processing 6?
value used for ROWS parameter changed from 64 to 22
Record 7: Rejected - Error on table SIEBEL_DATA_FP, column X_SUB_TYPE.
Column not found before end of logical record (use TRAILING NULLCOLS)
Table SIEBEL_DATA_FP:
6 Rows successfully loaded.
1 Row not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
--- sample bad file showing the pipe ... whay is sqlloader trying to process this pipe when its part of the record...
/u01/oracle/admin/adhoc/xxxl(TESTxx)$
/u01/oracle/admin/adhoc/xxx(TESTxx)$ vi FCT_PARTNERSHIP_ldrcontrol.bad
"FCT_PARTNERSHIP_ldrcontrol.bad" [Incomplete last line] 2 lines, 213 characters
|
~
~
~
any help appreciated!
Edited by: spliffer on 04-May-2010 05:06
Similar Messages
-
How to load data with carriage return through DRM action script ?
Hello,
We are using DRM to manage Essbase metadata. These metadata contain a field for member formula.
Currently it's a string data type property in DRM so we can't use carriage return and our formula are really hard to read.
But DRM support other data type property : memo or formatted memo where we can use carriage return.
Then in the export file, we have change the record delimiter to an other character than CRLF
Our issue : we are regularly using action script to load new metadata => How to load data properties with carriage return using action script ? There is no option to change the record delimiter.
Thanks!Hello Sandeep
here what I want to do through action script : loading a formula that use more on than one line:
Here, I write my formula using 4 lines but action script cannot load since one line = 1 record.
ChangeProp|Version_name|Hier_name|Node_name|Formula|@round(
qty*price
*m05*fy13 -
XML Comparision Using XDX - Issue with Carriage Return key
Hi
I am using oracle XDX for doing a comparision between 2 xml files .I have issue is any node contains a enterkey chr(13)||chr(10) the xml shows that node as different.Even though they are same .Hi All,
Ive updated the problem..with some output... essentially Ive get it to a situation wher I load ALL my records into the table but I still get a bad file with a "|" record issue and the log file still syas that Im trying to load 7 record when I only have the 6 records.
...............SQL statment...
set trimpspool on
set feedback off
set heading off
set linesize 500
set pagesize 0
spool loaddata_FP.lst
SELECT '"'||spart.x_lsm_region||'"'||','||
'"'||spart.x_sub_type||'"'||','||
'"'||spart.x_origin_type||'"' ||'|'
FROM siebel.cx_ls_part_ship spart;
spool off
-- sample of control file
load data infile 'loaddata_FP.lst' "str '|'"
into table siebel_data_fp fields terminated by "," optionally enclosed by '"'
(x_lsm_region,
x_sub_type,
x_cust_face_staff,
x_nature_partner,
x_origin_type)
--sample log file with error why is it telling me I have 7 records when I am processing 6?
value used for ROWS parameter changed from 64 to 22
Record 7: Rejected - Error on table SIEBEL_DATA_FP, column X_SUB_TYPE.
Column not found before end of logical record (use TRAILING NULLCOLS)
Table SIEBEL_DATA_FP:
6 Rows successfully loaded.
1 Row not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
--- sample bad file showing the pipe ... whay is sqlloader trying to process this pipe when its part of the record...
/u01/oracle/admin/adhoc/xxxl(TESTxx)$
/u01/oracle/admin/adhoc/xxx(TESTxx)$ vi FCT_PARTNERSHIP_ldrcontrol.bad
"FCT_PARTNERSHIP_ldrcontrol.bad" [Incomplete last line] 2 lines, 213 characters
|
~
~
~
any help appreciated!
Edited by: spliffer on 04-May-2010 05:06 -
I would get the batch file with details of individual jobs as the output schema. The xml file looks alright. However when opened in notepad does not come with carriage return included.
I know that we can include child delimiter if it's an input flat file converted to xml schema, but no idea on output files.
Is there anyway we can include the Carriage return line feed in the schema so that when opened in notepad it's readable.Assuming you're talking about the output XML rather than the schema; if you open the XML in Visual Studio press the following keys
<crtl>KD and the XML will be formatted with indentation (hold the
<crtl> key down while pressing both the K and
D keys).
If you want a simple command line utility to format XML for you, the following should do the trick (pass in the name of the XML file):
static void Main(string[] args)
XmlDocument document = new XmlDocument();
document.Load(args[0]);
XmlTextWriter writer = new XmlTextWriter(args[0], Encoding.UTF8);
writer.Formatting = Formatting.Indented;
document.Save(writer);
writer.Flush();
writer.Close();
NOTE: this key sequence also formats source code.
David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful. -
Receiver File channel for XML files: with carriage return
Hi all,
we are using a receiver FILE channel to generate an XML file that is sent to an external partner.
The XML file looks good in a parser (IExplorer). But in fact there are not carriage return / line feeds between the XML tags
of the XML payload in the file.
Our partner now requires the XML file in a more vertical structure which means: for every tag a separate line (like it is displayed in a parser)
Does anybody know a more general way to convert to a vertical XML structure (so with carriage return line feed).
There is one entry in the SDN dealing with this topic but suggesting using an UDF. I think this is a very specific way.
I don't think it is a good way to change/enhance the message mapping just because of a general formating change.
Is it better to use an XSLT mapping as a second step in the interface mapping or a JAVA adapter module to convert ?
any experiences? suggestions? examples?
Thank you very much
best regards
Hans
examples:
original by XI receiver FILE adapter
<?xml version="1.0" encoding="UTF-8"?>
<MT_batchStatus><type>BS</type><header><message><messageSender>SENDER</messageSender><messageDate>20090723143720</messageDate> ... and so on
required:
<?xml version="1.0" encoding="UTF-8"?>
<MT_batchStatus>
<type>BS</type>
<header>
<message>
<messageSender>SENDER</messageSender>
<messageDate>20090723143720</messageDate>
... and so on>
Hans Georg Walter wrote:
> Is it better to use an XSLT mapping as a second step in the interface mapping or a JAVA adapter module to convert ?
> any experiences? suggestions? examples?
In such a case, the best is to write an generic XSLT or Java mapping that will attempt to do the pretty printing/formatting of the xml.
The advantage of a generic one is that you can reuse the same class/jar for many other scenarios.
so the flow will be as below in your interface mapping;
1. your specific source to target mapping
2. the generic formatting class -
Help needed with Carriage Return in Unicode system
Hi Experts,
we have an issue with one of our programs regarding the carriage return that is used when creating a csv file. This issue has only came about because of the recent upgrade to ECC6.
The main change to the program was the redefinition of the line feed variable.
Existing statement was --> DATA: v_lf TYPE x VALUE '0D'.
This was then replaced with
New statement --> DATA: v_lf type c VALUE cl_abap_char_utilities=>cr_lf.
Since this change has been implemented, the csv file that is created and sent on as an attachment via the function SO_NEW_DOCUMENT_ATT_SEND_API1 is now not displayed correctly.
When looking at the attachment in trn SOST, a message is also displayed saying the file is not in a recognizable format when selecting the file to view.
The hex value for cl_abap_char_utilities=>cr_lf is 000D000A and this seems to be causing the issue.
I've also tried using Function FI_DME_CHARATERS as I only really want to use the CR. However, the hex value for this is 000D and not 0D.
Is there any way of converting this to have a hex value of 0D?
Thanks in advance,
ChrisHI,
Sorry it is not the CONTENTS_TXT it is CONTENTS_BIN. Instead of CONTENTS_BIN you need to pass to CONTENTS_HEX
Check my Code..i have used the CONTENTS_HEX instead of CONTENTS_BIN
DATA: l_tab_lines TYPE i,
l_string TYPE char300,
l_line TYPE string.
CONSTANTS : l_c_255(255) TYPE c VALUE '255',
l_c_txt(3) TYPE c VALUE 'TXT'.
DATA: lt_reclist TYPE STANDARD TABLE OF somlreci1, "Recipients
lt_objpack TYPE STANDARD TABLE OF sopcklsti1,
lt_objhead TYPE STANDARD TABLE OF solisti1,
lt_objtxt TYPE STANDARD TABLE OF solisti1, "Body of EMail
lt_objbin TYPE STANDARD TABLE OF solisti1."Attachment of EMail
DATA: l_doc_chng TYPE sodocchgi1, "attributes of document to send
l_reclist LIKE LINE OF lt_reclist,
l_objpack LIKE LINE OF lt_objpack,
l_obj LIKE LINE OF lt_objhead.
DATA :
l_hex LIKE solix,
lt_contents_hex LIKE STANDARD TABLE OF solix ,
conv TYPE REF TO cl_abap_conv_out_ce,
l_buffer TYPE xstring,
l_hexa(510) TYPE x.
* Completing the recipient list
l_reclist-receiver = p_emailid.
l_reclist-express = 'X'.
l_reclist-rec_type = 'U'.
APPEND l_reclist TO lt_reclist.
CLEAR l_reclist.
* Body of Email Message
APPEND l_obj TO lt_objtxt. CLEAR l_obj. " Blank line
l_obj-line = '<html>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '<body>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '<p><code>Hello,</p></code>'(t04).
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = cl_abap_char_utilities=>newline.
APPEND l_obj TO lt_objtxt. CLEAR l_obj. " Blank line
CONCATENATE
'<p><code>'(f01)
'Please click the link to access the Confirmation Form.'(t01)
'Kindly complete the same and return it to the HR contact 15 days' &
' prior to the date of confirmation of the employee.'(t02)
'</p></code>'(f02) INTO l_obj-line SEPARATED BY space.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = cl_abap_char_utilities=>newline.
APPEND l_obj TO lt_objtxt. CLEAR l_obj. " Blank line
CONCATENATE '<a href="' text-l01 text-l02 '">'
INTO l_obj-line.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
CONCATENATE '<p><code>'(f01)
'Link to Confirmation Forms'(034)
'</p></code>'(f02)
'</a>'
INTO l_obj-line.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = cl_abap_char_utilities=>newline.
APPEND l_obj TO lt_objtxt. CLEAR l_obj. " Blank line
l_obj-line = '<p><code>The details of the employees ' &
'are as follows:</p></code>'(017).
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = cl_abap_char_utilities=>newline.
APPEND l_obj TO lt_objtxt. CLEAR l_obj. " Blank line
* Table headings in the Mail Body
l_obj-line = '<table border="1">'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '<tr>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '<th><p><code>Name</p></code></th>'(030).
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '<th><p><code>Department</p></code></th>'(031).
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '<th><p><code>DOJ</p></code></th>'(032).
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '<th><p><code>Confirmation Date</p></code></th>'(033).
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '</tr>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
** Body of Email Message
* Email Attachment
* Append headings
CONCATENATE 'Employee No.'(002)
'Employee Group'(016)
'Employee Name'(001)
'Designation'(003)
'Joining Date'(004)
'Department'(005)
'Branch/Location'(006)
'Unit'(007)
'Confirmation Due'(008)
'Form sent on'(009)
'Form Return by'(010)
'Employee Group'(016)
'Qualification'(012)
'Trainee Category'(013)
INTO l_string
SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
APPEND l_string TO lt_objbin.
CLEAR l_string.
APPEND INITIAL LINE TO lt_objbin.
LOOP AT p_emp_details INTO i_emp_details_line.
CONCATENATE i_emp_details_line-pnalt
i_emp_details_line-egroup
i_emp_details_line-ename
i_emp_details_line-stext
i_emp_details_line-srvdt
i_emp_details_line-ltext
i_emp_details_line-pbtxt
i_emp_details_line-btrtx
i_emp_details_line-mndat
i_emp_details_line-fsdate
i_emp_details_line-frdate
i_emp_details_line-egroup
i_emp_details_line-ptext
i_emp_details_line-ftext
INTO l_string
SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
APPEND l_string TO lt_objbin.
CLEAR l_string.
l_obj-line = '<tr>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
CONCATENATE '<td>' '<p><code>'(f01)
i_emp_details_line-ename '</p></code>'(f02) '</td>'
INTO l_string.
APPEND l_string TO lt_objtxt. CLEAR l_string.
CONCATENATE '<td>' '<p><code>'(f01)
i_emp_details_line-ltext '</p></code>'(f02) '</td>'
INTO l_string.
APPEND l_string TO lt_objtxt. CLEAR l_string.
CONCATENATE '<td>' '<p><code>'(f01)
i_emp_details_line-srvdt '</p></code>'(f02) '</td>'
INTO l_string.
APPEND l_string TO lt_objtxt. CLEAR l_string.
CONCATENATE '<td>' '<p><code>'(f01)
i_emp_details_line-mndat '</p></code>'(f02) '</td>'
INTO l_string.
APPEND l_string TO lt_objtxt. CLEAR l_string.
l_obj-line = '</tr>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
ENDLOOP.
l_obj-line = ' </table>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '</body>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
l_obj-line = '</html>'.
APPEND l_obj TO lt_objtxt. CLEAR l_obj.
IF r_cprob EQ 'X'.
l_string = 'Completion of probation List'(018).
ELSE.
l_string = 'Completion of extension of probation List'(035).
ENDIF.
APPEND l_string TO lt_objhead.
* APPEND object_header.
CALL FUNCTION 'SO_RAW_TO_RTF'
TABLES
objcont_old = lt_objbin
objcont_new = lt_objbin.
LOOP AT lt_objbin INTO l_line.
conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' endian = 'B').
CALL METHOD conv->write( data = l_line ).
l_buffer = conv->get_buffer( ).
MOVE l_buffer TO l_hexa.
MOVE l_hexa TO l_hex-line.
APPEND l_hex TO lt_contents_hex.
ENDLOOP.
* File name for attachment
CONCATENATE 'Completion of probation List'(018)
sy-datum '.XLS' INTO l_obj SEPARATED BY space.
APPEND l_obj TO lt_objhead.
* Email Body Details
CLEAR l_tab_lines.
DESCRIBE TABLE lt_objtxt LINES l_tab_lines.
l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 +
STRLEN( l_string ). "size of doc in bytes
l_doc_chng-obj_name = sy-repid.
l_doc_chng-obj_langu = sy-langu.
l_doc_chng-obj_descr = l_string.
l_doc_chng-sensitivty = 'P'. " Send mail as a confidential
l_objpack-head_start = 1.
l_objpack-head_num = 1.
l_objpack-body_start = 1.
l_objpack-body_num = l_tab_lines.
l_objpack-doc_type = 'HTML'. "l_c_txt.
APPEND l_objpack TO lt_objpack.
CLEAR l_objpack.
* Email Attachment Details
CLEAR l_tab_lines.
DESCRIBE TABLE lt_objbin LINES l_tab_lines.
* Creation of the entry for the compressed attachment
l_objpack-transf_bin = 'X'.
l_objpack-head_start = 1.
l_objpack-head_num = 1.
l_objpack-body_start = 1.
l_objpack-doc_type = 'XLS'.
l_objpack-obj_name = l_obj.
l_objpack-obj_descr = l_obj.
l_objpack-body_num = l_tab_lines.
l_objpack-doc_size = l_tab_lines * l_c_255.
APPEND l_objpack TO lt_objpack.
CLEAR l_objpack.
* Send the document
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = l_doc_chng
put_in_outbox = ' '
commit_work = 'X'
TABLES
packing_list = lt_objpack
object_header = lt_objhead
* contents_bin = lt_objbin
contents_txt = lt_objtxt
contents_hex = lt_contents_hex
receivers = lt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8. -
Parsing a csv file with carriage return replaced with #
Hi,
We have a weird problem. We are able to download a csv file using standard FM HTTP_GET. We want to parse the file and upload the data into our SAP CRM system. However, the file downloaded, has the carriage return replaced and the character # replaces it and everything seems like its one line.
I understand that the system replaces the Carriage return with the charater #. My question is, if I try to pass this file into my program to parse for the data, will there be any issues in the system recognizing that "#" that it is a carriage return and that the data in the file is not 1 record but multiple records?Hi
'#' is what you see in the SAP. But the actuall ascii associated will be of carraige return itself. So to identify if you have multiple records of not don't use hard coded '#' but instead use the constant CL_ABAP_CHAR_UTILITIES=>CR_LF.
Regards
Ranganath -
Problem with "carriage Return" or "Line Feed" in a table
Hello,
I need help with the function Zeichen(), so called it in german, I'm not sure if it is char() in english.
In Pages Version 4.0.1 (746) I've created a table in Pages with this function to make an "carriage Return" in a cell.
Here an example: { ="Hello" & Zeichen(10) & "World" }, in the cell is now:
| Hello |
| World |
But in Pages Version 4.0.3 (766) this function ZEICHEN() not allow the number 10 and other till 32 (I allready read the manual and understand this problem).
Anybody an idea to make a "Carriage Return" or "Line feed" in a formular, in a cell, in a table, in Pages?
Thanks
Detlev Kormannkdetlev wrote:
Your workaround will not be possible in my table, because there is no empty cell in the table, but I think it is also a good help too.
*In fact I forgot that you are using a table in Pages.*
Remaining on my first idea, In Numbers we may achieve the same goal using an auxiliary table with a single cell containing the needed line break.
If this table is named "LineBreak",
the formula will be:
="Hello"&LineBreak :: $A$1&"World"
*In Pages, here is my workaround:*
Enter the cell
type a§b
don't type the character § but ctrl + return.
The cell will contain
a
b
with the arrow, move before the a
type =B2&"
delete the original a
move to the right
delete the original b
type "&C7
Yvan KOENIG (VALLAURIS, France) mercredi 7 octobre 2009 17:20:04 -
Data load issue with export data source - BW 3.5
Hi,
We are facing issues in loading data with the help of export data source.
We have created export data source of 0PCA_C01 cube. With the help of this export datasource, we are loading data to other custom cube. Scenario is working fine in development server.
But when we transported objects to quality server data is not getting loaded to custom target cube.
It is extracting zero records. All transports are ok and we have generated export datasource in quality before transports .Also regenerated export datasource after transport and activated infosource, update rule via RS* programs. Every object is active but data is not getting extracted.
RSA3 for 80PCA_C01 datasource isn't extracting any record in Quality. Records getting extracted in development. We are in BW 3.5 with patch level 19.
Please guide us to resolve the issue.
Thanks,
AdityaHi
Make sure that you have relevant Role & Authorization at Quality/PRS.
You have to Transport the Source Cube first and then Create a Generate Export Data Source in QAS. Then, replicate data sources for BW QAS Soruce System. Make sure this replicated Data Source in QAS. Only then can transport new update rules for second cube.
Hope it helps and clear -
Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping
Hi all,
I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
Many thanks,
MartinHi,
Just a cut and paste of yours with the field name changed:
htp.p('<script>');
htp.p('$x("P3_COMMENTS").readonly=true;');
htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
<script type="text/javascript" language="JavaScript">
function setReleaseToProd(wpTypeCode){
//setReleaseToProd($v(this))
var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
get.addParam('x01',wpTypeCode);
gReturn = get.get();
if(gReturn) {
$s('P3_RELEASE_TO_PROD',gReturn);
get = null;
</script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
Martin -
Receiving attachments with carriage return / enter after filename extension
Hello All,
For a while already I am seeing carriage return / enter / newline after the filename extension of (some of) my attachments.
Clicking the attachment fails to open it. The only remedy I have is to save the attachment, navigate to it, click the filename, and remove the extra newline after the filename.
It then asks me if i want to use the new extension, for example
Would you like to use
".pdf"
instead of
".pdf
(I had to cut up the sentence above to make the bogus CR visible)
After agreeing the file works fine and opens normally ( + Icon changes back to preview icon).
The file shows up as "symposium 2010.pdf??" in Terminal.
and
/Users/vincent/Desktop/symposium\ 2010.pdf
when pasted in vi - yes the third white line is included.
Did anyone see/solve this issue before? Wading through the forum here did not turn up a solution...
Regards, VincentHi Thomas,
I am getting following error:
Only one top level element is allowed in an XML document. Error processing resource 'file:///C:/Users/guptavis/AppData/Loca...
<SupportCaseID>0055000018</SupportCaseID>
-^
for the below code
DATA: LV_NEWLINE TYPE ABAP_CR_LF.
LV_NEWLINE = CL_ABAP_CHAR_UTILITIES=>CR_LF.
CONCATENATE
V_XML '<TimeStamp>' wa_XML-TimeStamp '</TimeStamp>' INTO V_XML.
CONCATENATE
V_XML lv_newline INTO V_XML.
CONCATENATE
V_XML '<SupportCaseID>' wa_XML-SupportCaseID '</SupportCaseID>' INTO V_XML.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = V_XML
MIMETYPE = ' '
ENCODING =
IMPORTING
BUFFER = V_XML1
EXCEPTIONS
FAILED = 1
OTHERS = 2.
CALL METHOD CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE
EXPORTING
I_FILENAME = 'C:/TEMP/TEST.XML'
I_CONTENT = V_XML1
I_MIME_TYPE = 'XML'.
Do you have anyu idea how can I rectify this error. As per my requirement I have conncatinate so many more lines.
Regards,
Vishal. -
XML is cluttered with carriage returns and line feeds - how to suppress?
Hi all,
at least within text paragraphs we would prefer 'clean' XML without carriage returns. Can Framemaker be configured to avoid these control character?
Below is an example of a DITA file produced by Framemaker. Evidently this is related to the Pretty Printing feature and I do admit that it increases the readability. However they cause some issues for us. Note that the carriage returns in the paragraph are at arbitrary positions, not at the end of the lines as they appear in the Framemaker editor (I inserted the word "End" at the end of the first line).
RobertBy default, FrameMaker adds a CR at around 70-80 characters unless instructed to do otherwise.
Also, soft returns (SHIFT+ENTER) are lost unless you're in a pre formatted element like a <codeblock> (which is probably why there's no CR after your "End" text.
If you want to limit the seemingly arbitrary CRs, you must tell FM where to put them. Add the following rule to the structure application rules file ..
element "p"
writer line break is 99999 characters;
…scott -
Strange character in place of carriage return.
The carriage returns look fine when viewing the file on my local drive (publish to folder). Then I upload the folder to an ftp site, and see ?? where the carriage returns are. Any ideas?
www.nebodyandpaint.com
I'm viewing with Safari v2.0.3.
Mac OS X (10.4.5)You have the wrong settings on your ftp program. See this note:
http://homepage.mac.com/thgewecke/iwebchars.html -
Class loading issue with JDK 1.5
I have recently loaded JDK 1.5 on a laptop that previously had version 1.3. The java code I need to run stopped working and I getget a java.lang.NoClassDefFoundError. I am logging the classpath and I see the jar file with the offending class is there.
I checked my pathing even, since I know java will have a problem with slashes at the beginning of the path when it is called via command line. But all my pathing is absolute.
In the code, I am using C to start up the JVM and then use JNI to communicate between java and C. Because of this complexity, I have searched the forums for problems with JNI and JDK 1.5. I found a case where turning off the JIT compilation kept the JVM from crashing for some users having issues with 1.5, but this approach did not work for me. Not too surprising, though, since this is really a classloading issue.
Where do I go next? Anyone else having this problem?[http://java.sun.com/javase/6/docs/technotes/guides/security/SunProviders.html]
Reminder: Cryptographic implementations in the Sun JDK are distributed through several different providers
("Sun", "SunJSSE", "SunJCE", "SunRsaSign")
for both historical reasons and by the types of services provided.
General purpose applications SHOULD NOT request cryptographic services from specific providers. That is:
getInstance("...", "SunJCE"); // not recommended
vs.
getInstance("..."); // recommended
Otherwise, applications are tied to specific providers which may not be available on other Java implementations.
They also might not be able to take advantage of available optimized providers (for example, hardware
accelerators via PKCS11 or native OS implementations such as Microsoft's MSCAPI) that have a
higher preference order than the specific requested provider. -
JTextArea will not display string with carriage return
Hello,
I am trying to display an XML file which i have converted into a string in a JTextArea to no avail. Any ideas how i can display the string in the JTextArea including the carriage return such that it still displays in the correct format?
Your pointers and suggestions will be much appreciated.Antananarivo wrote:
Hello,
I am trying to display an XML file which i have converted into a string in a JTextArea to no avail. Any ideas how i can display the string in the JTextArea including the carriage return such that it still displays in the correct format?
Your pointers and suggestions will be much appreciated.You haven't done the conversion properly.
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.WindowConstants;
public class XMLTextArea {
public static void main(String[] args) throws IOException {
File f = new File("someFile.xml");
BufferedReader br = new BufferedReader(new FileReader(f));
StringBuilder sb = new StringBuilder();
String nextLine = "";
while((nextLine = br.readLine()) != null) {
sb.append(nextLine).append("\n");
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.add(new JScrollPane(new JTextArea(sb.toString())));
frame.setSize(400,300);
frame.setVisible(true);
}
Maybe you are looking for
-
Anyone know how to delete an app icon bookmark?
I'm using an iPhone 4 with the 5.1 iOS. I downloaded an app for LG which turned out to be just a Safari bookmark with an app icon. It looks like a regular app but when you click it - Safari opens and it takes you to the LG webpage. Now I want to g
-
How do I stop all my devices ringing at the same time
AAll my devices iPad ipodtouch and iPhone all ring when I get a phone call how do I stop this?
-
How can you get photos back once you have deleted them?
Can anyone tell me if or how you can get photos back once you have deleted them from your ipad2?? I accidentaly deleted some very important pics. Please help!!
-
Loading external movies in specific frames
Here's what I'd like to have my project do: By clicking on a button in frame 5 I'd like to load a movie into an empty movie clip in frame 20. I'v ewritten the script to create the empty movie clip and also load the movie, but the movie loads into all
-
HT2688 are home sharing macs and pcs peers?
or, is one a "master" and the others "subordnates"?