Schema with carriage return

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.

Similar Messages

  • 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

  • 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

  • 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 Kormann

    kdetlev 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

  • 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,
    Chris

    HI,
    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.

  • 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,
    Martin

    Hi,
    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

  • 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

  • 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);
    }

  • 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, Vincent

    Hi 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).
    Robert

    By 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

  • Problem with SQL*Loader loading long description with carriage return

    I'm trying to load new items into mtl_system_items_interface via a concurrent
    program running the SQL*Loader. The load is erroring due to not finding a
    delimeter - I'm guessing it's having problems with the long_description.
    Here's my ctl file:
    LOAD
    INFILE 'create_prober_items.csv'
    INTO TABLE MTL_SYSTEM_ITEMS_INTERFACE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (PROCESS_FLAG "TRIM(:PROCESS_FLAG)",
    SET_PROCESS_ID "TRIM(:SET_PROCESS_ID)",
    TRANSACTION_TYPE "TRIM(:TRANSACTION_TYPE)",
    ORGANIZATION_ID "TRIM(:ORGANIZATION_ID)",
    TEMPLATE_ID "TRIM(:TEMPLATE_ID)",
    SEGMENT1 "TRIM(:SEGMENT1)",
    SEGMENT2 "TRIM(:SEGMENT2)",
    DESCRIPTION "TRIM(:DESCRIPTION)",
    LONG_DESCRIPTION "TRIM(:LONG_DESCRIPTION)")
    Here's a sample record from the csv file:
    1,1,CREATE,0,546,03,B00-100289,PROBEHEAD PH100 COMPLETE/ VACUUM/COAX ,"- Linear
    X axis, Y,Z pivots
    - Movement range: X: 8mm, Y: 6mm, Z: 25mm
    - Probe tip pressure adjustable contact
    - Vacuum adapter
    - With shielded arm
    - Incl. separate miniature female HF plug
    The long_description has to appear as:
    - something
    - something
    It can't appear as:
    -something-something
    Here's the errors:
    Record 1: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column
    LONG_DESCRIPTION.
    Logical record ended - second enclosure character not present
    Record 2: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column
    ORGANIZATION_ID.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    I've asked for help on the Metalink forum and was advised to add trailing nullcols to the ctl so the ctl line now looks like:
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    I don't think this was right because now I'm getting:
    Record 1: Rejected - Error on table "INV"."MTL_SYSTEM_ITEMS_INTERFACE", column LONG_DESCRIPTION.
    Logical record ended - second enclosure character not present
    Thanks for any help that may be offered.
    -Tracy

    LOAD
    INFILE 'create_prober_items.csv'
    CONTINUEIF LAST <> '"'
    INTO TABLE MTL_SYSTEM_ITEMS_INTERFACE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    (PROCESS_FLAG "TRIM(:PROCESS_FLAG)",
    SET_PROCESS_ID "TRIM(:SET_PROCESS_ID)",
    TRANSACTION_TYPE "TRIM(:TRANSACTION_TYPE)",
    ORGANIZATION_ID "TRIM(:ORGANIZATION_ID)",
    TEMPLATE_ID "TRIM(:TEMPLATE_ID)",
    SEGMENT1 "TRIM(:SEGMENT1)",
    SEGMENT2 "TRIM(:SEGMENT2)",
    DESCRIPTION "TRIM(:DESCRIPTION)",
    LONG_DESCRIPTION "REPLACE (TRIM(:LONG_DESCRIPTION), '-', CHR(10) || '-')")

  • 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

  • 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

  • Create a script that can create entire schema with data when run

    Hi,
    I need to create a script that creates the entire schema on a database when the script is run. the need is that the script should be capable of creating all schema objects with grants and all, including the table data.
    The same objective can be achived through export / import.But we don't want to deliver the dump files instead a script which will be executed on a database created with same database stucture of tablespaces etc.
    I have serched the net but yet to achive the goal.
    Is there any oracle utility / script file that can do this for me ?
    Can Oracle import be used to create the same, the way it is used to create index File ?
    Please suggest !!
    Regards

    You should look at the package dbms_metadata to be able to extract all ddl to recreate a schema. To load the data, you could write scripts that will generate insert statements and spool these to a file (sql generating sql), or you could write scripts that generates a delimited file and use sql loader to load the data into the target system. There are lots of little gotchas in either of these 2 solutions. The biggest 2 right away. 1 - picking a delimiter, 2 - dealing with carriage returns in text data. SQL Developer is able to do some extraction, so before you go writing this stuff yourself, I would check it out to see if it does what you are looking for before you reinvent the wheel.

  • Losing carriage returns in textarea / using plpdf to generate report

    Hello,
    I'm using Apex 3.1.1 and Oracle 10g database. I would appreciate any suggestions on how I can preserve carriage returns in a textarea when sending the text to a package that generates a report. Please see example of current problem (below code). I'm using an onkeypress function to check for keycode = 13 when the Enter key is pressed -- that is working. I also created an alert to show the url value -- I can see the text on multiple lines, so that appears to be working as well. The textarea value parameter in the package is defined as varchar2. Per the support folks at plpdf.com, chr(13) indicates an explicit line break, and they told me to check my text. I don't know what I'm missing. Thank you for any suggestions you may have.
    Lisa
      function callPLPDFRep()
          var url;
          url = '#OWNER#.' + $x('P&APP_PAGE_ID._REPORT_PROCEDURE').value + '?' + build_params();
          w = open(url, "winPDFRep", "Scrollbars=1, resizable=1, width=800, height=600");
          if (w.opener == null)
            w.opener = self;
            w.focus();
       function build_params()
        var lparms;
        lparms = '';
        lparms = lparms + '&p_incorrect=' + $x('P212_INCORRECT').value;
        lparms = lparms + '&p_correct=' + $x('P212_CORRECT').value;
        return lparms;
      }Text in textarea:
    035 5768 06/15/2010
    035 5768 06/16/2010
    035 5768 06/17/2010
    Printout on report:
    035 5768 06/15/2010035 5768 06/16/2010035 5768 06/17/2010

    Hello Michael,
    Thank you for your response. After doing some researching and experimenting, here's what I have found so far.
    First, using an onkeypress function to alert the keycode, a chr(13) is being returned when I press the Enter key in the textarea.
      function check_Enter(e)
        var keynum;
        var textval = $x('P212_INCORRECT').value;
        if(document.all) 
          keynum = e.keyCode
        else
          keynum = e.which
        alert(keynum);     
      }Next, when I access the value of the textarea via javascript with $x('P212_INCORRECT').value, the chr(13) is automatically converted to the newline character (\n). In an attempt to replace the \n with a \r so plpdf will recognize the carriage return, I added a javascript replace function before sending the text to the package, and it does not work.
      function build_params()
        var lparms;
        lparms = '';
        lparms = lparms + '&p_incorrect=' + $x('P212_INCORRECT').value;
        lparms = lparms + '&p_correct=' + $x('P212_CORRECT').value;
        alert(lparms.split(/\n/g).length - 1);  // confirm that a newline character is found
        lparms = lparms.replace( new RegExp( "\n", "g" ), "\r");  // replace newline character with carriage return
        return lparms;
      }When I tried to replace the newline character (\n) with chr(13), the chr(13) is printed out like it is text instead of a special character. In order to test that I have the correct syntax for the replace function in javascript, I tried replacing \n with '...', and then in the package that generates the PDF, I replaced the '...' with chr(13). That works!
    In response to your comment about the PLPDF procedure for multi line section, I am using: plpdf.PrintMultiLineCell(180, 6, l_incorrect, '0', 0). As a newbie to javascript, I am not sure why replacing \n with \r is not working. Can you advise how to use a chr(13) in the javascript replace function and have it recognized as a special character and not text? I don't know how to view special characters in the textarea other than checking for them with javascript.
    Thanks, Lisa

Maybe you are looking for

  • Time Machine encryption - after restart, drive won't mount

    Hi all. I enabled Time Machine on my Drobo drive, enabling encryption. All was good, Time Machine started encrypting away. I restarted my Mac, and now my Drobo won't mount. In Disk Utility, it looks like this: I'm unable to verify, repair or mount th

  • Late-2011 MacBook Pro 13" Freezes with Clicking Noise

    Hi guys, I bought a MacBook Pro for my birthday in April earlier this year (the model is the Late 2011 i5 13 inch model). Recently I have been encountering a problem where randomly a clicking noise will start and repeat every 5 or so seconds. On top

  • F110 - Payment document Text field SGTXT ?

    Hi Experts, The requirement is that Payment Document needs to have the same Text (field SGTXT) as the invoice document. If someone knows how to do this I will also appreciate your answer. Anil Edited by: Anil Kumar on Oct 14, 2011 8:45 AM

  • Changes in SAP b1 price list is not reflecting in webtools

    Hi, I have 5 price list in SAP B1 and it is synchronized with web tools so i am able to generate sales orders for a customer with same price whether from B1 or web tools. Now I have defined 5 new price list in B1 and changed default pricelist  on cus

  • DML on materialized view

    Hi, I generated materialized view and will maintain data on it when I run delete statement that show below error ORA-01732: data manipulation operation not legal on this view So my question is How to maintain data on M View (delete old data)? because