XSL mapping of ARTMAS IDoc - carriage returns and white space

Hi all. I have tried all sorts here and am completely stuck. I am mapping an article master ARTMAS IDoc using XSL mapping and an extra carriage return and white space characters are being added to the FIELD1 and FIELD2 fields of the E1BPE1MARAEXTRT segment and I don't know why! These fields contain all our bespoke field values joined together so they are 229 and 250 characters long respectively, which I think is related to the problem. The mapping program looks like this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="yes"/>
<xsl:template match="/">
<ARTMAS04>
<IDOC>
  <xsl:copy-of select="//ARTMAS04/IDOC/EDI_DC40"/>
  <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MATHEAD"/>
  <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MARART"/>
  <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MARAEXTRT"/>
  <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MAKTRT"/>
  <xsl:for-each select="//ARTMAS04/IDOC/E1BPE1MARCRT">
    <xsl:if test="(PLANT='D100') or (PLANT='D200') or (PLANT='D300')">
      <xsl:copy-of select="."/>
    </xsl:if>
  </xsl:for-each>
  <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MARMRT"/>
  <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MEANRT"/>
</IDOC>
</ARTMAS04>
</xsl:template>
</xsl:stylesheet>
I have a test IDoc going through this and the first 3 characters of the FIELD1 are "BIK". If I look at the source of the XML file, the problem area looks like this:
<E1BPE1MARAEXTRT SEGMENT="1">
      <FUNCTION>004</FUNCTION>
      <MATERIAL>000000000000895649</MATERIAL>
      <b><FIELD1>
        BIK</b>      0  0.00 T                                    000000001CARRERA FURY 04 20"     CARRERA FURY 04 20" 2005092420040622    X                    00000000   20031104 00200406140000000000                    0.00 0000000
      </FIELD1>
You can't really see it above, but there is a carriage return and 8 white spaces before the BIK. Where does this carriage return and white space come from?! Any help would be really appreciated - this is driving me crazy!
Many thanks,
Stuart Richards

Stuart,
I think I know the cause to your problem. I am not an XSLT programmer but based on searching this forum I found how I can acheive the carriage return at the end of my document. Your xsl statement is as follows:
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="yes"/>
Change the indent value from yes to no. This should remove the carraige return. Hope this works for you.
I actually need a carriage return and line feed on my document so I am still stuck. All I have acheived is the carraige return.
Thanks,
Jim

Similar Messages

  • Carriage Returns and Tabs in XML element

    I have a number of carriage returns and tabs within an xml element. When I take that element I would like it to transform to html in which I am then displaying within a JEditorPane. However, when I do this it is one long string. I have tried the xml:space="preserve" within that element and this still is not working.
    Here is part of the xml with the carriage return line feeds. The element that I am talking about is called pseudocode. You can see it is displayed correctly below.
    Design Document XML : <?xml version="1.0" encoding="ISO-8859-1"?><design-doc><title-page><title>Testing Document</title><class-prepared-for>Lloyd</class-prepared-for><authors>Ben Garbers</authors><date-created>September 23, 2004</date-created></title-page><introduction text="This is the introduction. This is the introduction."/><class-definitions><class-definition class-name="ClassOne" visibility="public" class-complexity="not complex"><global-variables><variable visibility="public" name="VariableOne" object="String" comments="This is a String."/><variable visibility="public" name="VariableTwo" object="Integer" comments="This is an Integer."/></global-variables><methods><method name="MethodOne" synopsis="This will do some things." purpose="public" visibility="public"><input-parms><variable visibility="null" name="firstName" object="String" comments="null"/></input-parms><output-parms><variable visibility="null" name="lastName" object="String" comments="null"/></output-parms><local-variables><variable visibility="null" name="age" object="int" comments="null"/></local-variables><pseudocode xml:space="preserve">/* Ensure that player name exist in the system*/
    if (player =null)
         NullPlayerException;
              if (NOT (isPlayerNameExist(player)))
                   throw PlayerNameNotExistException;
              /* Ensure player name exist in the team already*/
              i ? 1;
              while (i <= length(mPlayers)) {
                   if (mPlayers.mPlayerName != playerName)
                        throw PlayerNameNotExistInTeamException;
    this.mPlayers ? this.mPlayers - player;</pseudocode>
    However, when I do the transformation I get the following with the pseudocode:
    /* Ensure that player name exist in the system*/if (player =null)     NullPlayerException;          if (NOT (isPlayerNameExist(player)))               throw PlayerNameNotExistException;          /* Ensure player name exist in the team already*/          i ? 1;          while (i <= length(mPlayers)) {               if (mPlayers[i].mPlayerName != playerName)                    throw PlayerNameNotExistInTeamException;}this.mPlayers ? this.mPlayers - player;
    It looks like it adds some spaces but no carriage returns or line feeds.
    My transformation code is the following:
         public ParseFile(String xmlString) {
              try {
              //Here we will load the correct style sheet for the message
              //that will be formatted.
              String urlString = "DesignDocument.xsl";
              URL url = this.getClass().getResource(urlString);
              System.out.println("URL to style sheet = " + url.toString());
              String styleSheetName = url.getFile();
              System.out.println("Style sheet name : " + styleSheetName);
              InputStream styleSheetInputStream = this.getClass().getResourceAsStream(urlString);
              //We will than load our SAXParerFactory and parse the message.
              SAXParserFactory SPFactory = SAXParserFactory.newInstance();
              SPFactory.setValidating(true);
              SAXParser sp = SPFactory.newSAXParser();
              XMLReader sax2parser = sp.getXMLReader();
              //NO Validation done on for this because we do NOT have a DTD.
              sax2parser.setFeature(
                   "http://xml.org/sax/features/validation",
                   false);
              sax2parser.setContentHandler(new FileContentHandler());
              //we create a character array of the length of the xml message String
              char[] messageCharacterArray =
                   new char[xmlString.length()];
              // we then put the xml string into the character array.
              messageCharacterArray = xmlString.toCharArray();
              // after this ew end up creating a CharArrayReader that will be used by the Sax
              // parser to parse the xml.
              CharArrayReader xmlCharArrayReader =
                   new CharArrayReader(messageCharacterArray);
              // we put the xml character array within the Input Source which will then be parsed
              // by the Sax2 parser.
              InputSource in = new InputSource(xmlCharArrayReader);
              // Use a Transformer for outputting the message into our formatted xml using
              // the stylesheet defined up in a messages own sxl stylesheet file.
              TransformerFactory tFactory = TransformerFactory.newInstance();
              tFactory.setURIResolver(new BasicURIResolver());
              StreamSource stylesource = new StreamSource(styleSheetInputStream);
              Transformer transformer = tFactory.newTransformer(stylesource);
    //          transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    //          transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    //          Properties properties = new Properties();
    //          properties.setProperty("indent", "yes");
    //          properties.setProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    //          transformer.setOutputProperties(properties);
              // We will use a ByteArrayOutputStream to put our transformed xml.
              ByteArrayOutputStream bos = new ByteArrayOutputStream();
              StreamResult result = new StreamResult(bos);
              SAXSource source = new SAXSource(in);
              transformer.transform(source, result);
              String s = bos.toString();
              StringBuffer sb = new StringBuffer();
              //This will make sure the Version Line is not shown.
              BufferedReader br = new BufferedReader(new StringReader(s));
              String line = "";
              while ((line = br.readLine()) != null) {
                        sb.append(line);
              bos.close();
              br.close();
              formattedXmlString = sb.toString();
              System.out.println("--------------------------------");
              System.out.println(formattedXmlString);
              System.out.println("--------------------------------");
              } catch (Exception e) {
                   e.printStackTrace();
    I have been searching and trying to figure this out forever. Any help would be greatly appreciated. Bottom line is that I want carriage returns and tabs to work when transferring from the xml to xsl.

    I get the following line when adding the <pre> tags.
    /* Ensure that player name exist in the system*/if (player =null)     NullPlayerException;          if (NOT (isPlayerNameExist(player)))               throw PlayerNameNotExistException;          /* Ensure player name exist in the team already*/          i ? 1;          while (i <= length(mPlayers)) {               if (mPlayers[i].mPlayerName != playerName)                    throw PlayerNameNotExistInTeamException;}this.mPlayers ? this.mPlayers - player;
    On the screen this is shown on 1 line. It looks like the tabs are working correctly. However, the carriage return, line feeds do not seem to be working. The xml that is pushed into the transformation has the carriage returns and line feeds and is formatted correctly. There has to be something happening when the xsl takes the xml String. When I add <BR></BR> within the xml that doesn't seem to work either.
    I am really sumpted. If you could help DrClap I would really be appreciated.

  • How to find a carriage return and Line feed?

    I need to detect if a crriage retunr and line feed present on each row in my text file before allowing user to upload the text file
    I know how to remove them from each line but what I need is to detect them no removing them from file.
    Our concern is when the a row does not have carriage return and line feed.
    Is there a way to find this using CF? Please help
    thanks

    That is exactly the problem Dave, if some rows do not have line feed, they're not being inserted into DB, it skips other steps and go right to finish. It looks
    like the file is done processing.
    So I need to do early rejection to this kind of file.
    I used cfloop to catch anything else that do not follow the formatting rules.
    Here is what I already done:
    Right after the file got uploaded, I have these codes:   
    <cfloop  index="x" file="#MyFile#" >
      <CFSETMyLine = Replace(x,chr(9),"|", "ALL")>
      I'm using a few functions, such as, Left(), Mid(), Right(), etc to make sure certain rules are followed.
      Up till here, it's done and tested, everything is working.
      The only problem is when 1 or more rows don't end up with line feed and or carriage return.
      I plan to add some codes to check the end of each row for chr(10) since it is looping for every row anyway.
      If detected, process file normally otherwise stop processing.
    </cfloop>
    So this can't be done in CF?

  • File sender  - carriage return and new line as endseparator

    Hi All,
    I'm stumbled with a problem to set carriage return and newline character as the endseparator (record delimiter)
    Scenario: The input file PI is receiving has got few fields which has text in it and the content in this text has got newline characters. So to identify record separator, at  the end of each record the combination of carriage return and new line is added.
    In file sender content conversion I've set the folllowing parameters to achieve this:
    Row.fieldSeparator :   ,  (comma)
    Row.endSeparator  :  '0x0D''0x0A'
    Problem: In my sample input file, the first row has a text field with a newline character. When executed PI is splitting the record at the newline character in the text field (instead of combination of carriagereturn and newline which is set in the endSeparator paramter).
    Pls advice on how to resolve this .
    Happy Holidays!!
    amar

    Rajesh..Thanks for your quick response
    I'm trying with the actual file being provided by the trading partner. I did not generate the file nor changed the file..
    Before identifying the combination of carraige return and new line, the adapter is splitting the record when encountered with new line character within one of the text fields.
    As you said it worked for you, you do have new line characters within fields in a record?..pls throw some light..let me know for any information..
    Thank you
    amar--

  • How to retain carriage return and spaces in a report..

    Hi everyone,
    I have a TEXT AREA where users enter comments in that like
    First record
    Hi           Carriage returns          spaces
    Second  record
    Hi
    carriage returns
    spaces
    Third record
    Hi
         carriage returns
                                 spaces
    Is it possible to retain the carriage returns and spaces when i am displaying the records in a report.
    For carriage returns i replaced  chr(10) with '
    (without the single quotes). I works fine. But how i can i retain the spacesplease give me some suggestions
    Thanks
    phani

    Hi dimitri,
    Thanks for the reply
    For carriage returns i am doing like this replace(column_name,chr(10),'<"br">') (Ignore the double quotes)
    For spaces is there any ASCII code like chr(10) for carriage returns..
    I mean how to identify Number of spaces in database..
    Thanks
    phani
    Message was edited by:
    phani marella

  • Search for multiple values separated by carriage return and not commas

    I have developed a report in BI Publisher that allows a user to enter multiple values that are separated by commas.
    Is there any way of entering multiple values that are separated by carriage return and not commas?
    Any help would be appreciated.
    Thanks

    Here below, without function :
    SQL> with tbl as
      2  (select 0 c1, 'j' c2 from dual union all
      3   select 1 c1, 'k' c2 from dual union all
      4   select 2 c1, 'l' c2 from dual union all
      5   select 3 c1, 'm' c2 from dual union all
      6   select 4 c1, 'n' c2 from dual )
      7  select *
      8  from   tbl
      9  where   c1 in (select substr(mystring,instr(mystring,',',1,rownum)+1,instr(mystring,',',1,rownum+1)-instr(mystring,',',1,rownum)-1)
    10                 from   (select ','||'&str'||',' mystring from dual)
    11                 connect by  level <= length(mystring)-length(replace(mystring,','))-1);
    Enter value for str: 1,2,3
    old  10:                from   (select ','||'&str'||',' mystring from dual)
    new  10:                from   (select ','||'1,2,3'||',' mystring from dual)
            C1 C
             1 k
             2 l
             3 m
    SQL> /
    Enter value for str: 0
    old  10:                from   (select ','||'&str'||',' mystring from dual)
    new  10:                from   (select ','||'0'||',' mystring from dual)
            C1 C
             0 j
    SQL> Nicolas.

  • Storing carriage return and other special characters in a TestStand variable and passing to LabVIEW

    I am using TestStand step to call a LabVIEW VI that writes commands to a serial device.  The device expects a carriage return at the end of the command.  I can create a constant string in TestStand with the carriage return, e.g., "ATA\x0D" and pass that to a LabVIEW string control which shows ATA\r and the VI works properly.
    To provide consistency and flexibility in my code, I want to store the terminator character(s) in a TestStand variable.  However, when I try to use an expression to create the command string, i.e. "ATA" + "Locals.Terminator", where Locals.Terminator is set to "\x0D", my LabVIEW VI string control shows "ATA\\x0D" which doesn't work.  And when I try Locals.Terminator set to "\r", the LabVIEW string control shows "ATA\\r" which doesn't work either.
    Is there a way to store special characters in a TestStand variable and pass them to LabVIEW as special characters?  I saw in another post that if you edit the TestStand variable by pressing Cntl-Enter, it will store  the newline \n properly and it can be sent to LabVIEW - that works for me as well for \n.  But  I need to send a carriage return.
    I've attached my test sequence and the corresponding LabVIEW VI with a string control.
    Hans
    Attachments:
    Special Chars.seq ‏27 KB
    String Passing.vi ‏13 KB

    Hi Hans, 
    Thanks for your detailed explanation and examples.  In TestStand, change the String parameter's String Type to Binary String instead of ASCII.  Then it will pass the desired value.
    Cheers,
    David Goldberg
    National Instruments
    Software R&D

  • 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

  • Footer and white space? Help?

    Hi there,
    I am fairly new to muse, but I have tried for so long to delete the white space at the bottom of my website.
    When designing, it shows about an inch of white space which I do not want at all. The image below shows this.
    I'd like the mustard coloured footer to be right at the bottom of the page.
    However, to make it worse, when I preview in browser, the white space increases dramatically. See Below:
    I have tried other solutions such as unlocking everything and then using the TAB key to see if anything small is affecting the length of the page, but there isn't anything. I have tried altering the page and footer setting but still unsuccessful.
    Hope someone can help, thanks!
    Simon

    Here are the settings for the master page:
    And for my index:
    Thanks again for the help,
    Simon

  • Get-Recipient or Get-Mailbox and "white spaces" after import user to TXT files.

    Hi Guys,
    In this week I had small task to move mailboxes from old SBS to new Exchange user. I have done this task with small problems. I decided of course to use Powershell to make my life simple.
    Step 1.
    Get-Recipient | Select-Object name, Database | where database -Match "Mailbox Database" |  FT - Property name | Out-File -FilePath c:\ex_users.txt
    or
    Get-Mailbox  | select name, servername | where ServerName -match Server1 | select Name | Out-File -FilePath c:\ex_users.txt -Encoding UTF8
    Unfortunately I had to spent some time to clean output files. After export files I noticed that something is wrong with text format.
    How can I avoid "white spaces" ?                                                                                                      

    We always want to do our filtering as close to the left of a command as possible. Keeping this in mind, the first thing I looked for was to see if Get-Recipient had a filter parameter and it does.
    Get-Recipient -Filter {Database -eq 'CN=Mailbox Database,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mydomin,DC=com'} | Select-Object -ExpandProperty Name | Out-File -FilePath 'C:\outfile-filter.txt'
    This seemed somewhat cumbersome because it required a lengthy DistinguishedName (DN). By the way, to get the DN of a database, use a modified version of this code.
    Get-MailboxDatabase -Identity databasename | Select-Object DistinguishedName
    I decided we would try filtering with the Where-Object cmdlet much like you did in your example. Noticed that I bumped it to the left so our filter ran prior to our select - something you should always do.
    Get-Recipient | Where-Object {$_.Database -match 'Mailbox Database'} | Select-Object -ExpandProperty Name | Out-File -FilePath 'C:\outfile-where.txt'
    Whichever way you do this, either the first or third code sample should help you write your data to a text file without the white space issue. I haven't looked at your second example but I suspect you could use some of this post to figure that one out yourself.
    Let us know and good luck.

  • SAP R/3 Mapping with EDI IDOC's 846 and 852 (Outbound)

    Hi:
    How are the following EDI IDOC Types mapped in SAP - R/3?
    1. Inventory Inquiry / Advice (846)
    2. Product Activity Data (852)
    What is the basic type, message type, idoc type that has to be used
    in both the cases - outbound based ones.
    This is a consumer products industry and not a retail industry. This
    is a hypothetical scenario where the end customer would like to see
    the price and the stock from all the plants and then place an order
    (846); and also see what is being planned in aparticaular plant for
    a planning period (852). The cycle countings are carried out based
    on the type of product in question and SAP-R/3 has been set up for
    this. What is the trigger point for the enitre activitiy to take
    place. Any valuable suggestions or guidelines are most welcome.
    Regards
    Rohit

    Check this link and see if it leads you somewhere.
    http://sap.ittoolbox.com/groups/technical-functional/sap-interfaces/information-on-the-edi-idoc-types-1739410
    http://www.jt77.com/CRM/related-discussion-1111.html
    Regards,
    Ravi Kanth Talagana

  • Carriage Return and Line Feed in Receiver FTP

    Hi,
    what parameter needs to be used in receiver File content conversion to accomodate <CR> and <LF>
    The generated file from XI is CSV format and am now used only this option in the content conversion.
    record.fieldSeparator ,
    I did find something like record.endseparator '0x0D"0x0A' but not sure whether this is right

    If I were creating an output file, it would look something like this (this is off top of head...not from my actual code, so bug removal might be required):
    types: begin of outx,
                line(1024) type c,
             end of outx.
    data: out_file type table of outx.
             out_line type             outx.
    data: p_field(15) type p decimals 0,
             a_field(17).
    constants: gc_tab type x value '09',
                     gc_crlf(2) type x value '0D0A'.  "those are zeroes...
    field-symbols: <fs> type (same as your internal table),
                           <fsx> type any.
    loop at internal table assigning <fs>.
       if <fs> is assigned.
          do.
          assign component sy-index of structure <fs> to <fsx>.
        if sy-subrc ne 0.  "end of row encountered...exit do loop
          exit. 
       endif.
    * insert logic to do any data conversions (i to p to a, etc.), like:
    * if sy-index eq <somenumber>.
    * P_field =  <fsx>. " any I field.
    * a_field = p_field.
    * assign a_field to   <fsx> casting type char17.
    *endif.
    if sy-index eq 1.
       out_line-line= <fsx>.
    else.
       concatenate out_line-line <fsx> into out_line-line separated by gc_tab.
    endif.
    enddo.
    if outline-line is not initial.
    concatenate outline-line gc_crlf into outline-line.
    condense out_line-line.  "add no-gaps if appropriate
    append out_line to out_file.
    clear out_line.
    endif.
    endif. "is assigned
    endloop."internal table
    Edited by: BreakPoint on Dec 1, 2010 3:39 PM
    can't spell concatenate correctly.

  • Runtime.exec() and white space

    Hello,
    I am attempting to run a DOS -based hydrological modeling from NT using the Runtime.exec() method. When executing the command:
    "Hec1.exe filename"
    the model runs successfully.
    When I try executing the command:
    "Hec1.exe filename > null", the method recognizes the string array as "Hec1.exe filename>null", which causes the model to fail.
    Here is the code that I use to execute the process:
    Runtime rt = Runtime.getRuntime();
    String[] cmd = new String[4];
    cmd[0] = "Hec1.exe";
    cmd[1] = inputFile;
    cmd[2] = ">";
    cmd[3] = "null";
    Process p = rt.exec(cmd);
    Hopefully, there is some sort of workaround that one of you knows.
    Thanks for your time.
    -Joel Finkel

    and yes that batch file is correct but if you want it to be more usefull change that filename to $1 or %1 i forget which(been working in both *NIX and DOS too long)                                                                                                                                                                                                                                                                                                                                       

  • Issue with variables and white space in powershell script that calls a command line command

    Guys,
    I have a question regarding this script. Each time I run it, it creates the share, but with a space after it. Also I need help figuring out how to put in the variable for the folder path.
    Below is the code
    $Users=Import-Csv C:\users2.csv
    foreach($User in $Users){
         $User.SNCORP
         $User.HPB
         $User
         cmd /c "net share "$User.SNCORP"=D:\Users\"$User.HPB" /grant:Everyone,FULL"
    The csv file looks like this
    HPB,SNCORP
    ccarter,carterch$
    This is my output in powershell
    PS C:\> .\shareflip.ps1
    carterch$
    ccarter
    HPB                                                         SNCORP
    ccarter                                                     carterch$
    The syntax of this command is:
    NET SHARE
    sharename
              sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]]
                                   [/USERS:number | /UNLIMITED]
                                   [/REMARK:"text"]
                                   [/CACHE:Manual | Documents| Programs | BranchCache | None]
              sharename [/USERS:number | /UNLIMITED]
                        [/REMARK:"text"]
                        [/CACHE:Manual | Documents | Programs | BranchCache | None]
              {sharename | devicename | drive:path} /DELETE
              sharename \\computername /DELETE
    Any help is greatly appreciated. 
    Christopher

    There is no need to use cmd /c. You should be able to use:
    net share "$($User.SNCORP)=D:\Users\$($User.HPB)" "/grant:Everyone,Full"
    Use showargs.exe (from the article) at the beginning of this line to see the command line PowerShell is actually running (very useful for troubleshooting).
    -- Bill Stewart [Bill_Stewart]

  • 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

Maybe you are looking for