Carriage Return ignored in ABAP Created HTML?

We are in the pre-production box for an upgrade.
We have ABAP source code that generates HTML logic. It worked fine in 4.6.
The carriage return/line feeds are being ignored.
I have already tried all the cl_abap_char_utilities=>NEWLINE
                                          cl_abap_char_utilities=>CR_LF
                                          cl_abap_char_utilities=>FORMFEED.....and more
I've tried the conversion utilities also.
When we look in the debugger we see the cr_lf values as ##, and 0d000a00 in hex, which should work, right?
But, when we view the source code on the web page - where arrays are not being built because the crlfs are being ignored- we can see that when the html is being written, the crlfs are ignored and the html is all over the place, unformatted.
I am thinking there must be a another HTML Function Module that might be available to format the html table before sending it out thru WWW_HTML_MERGER. Again, even in debug everything look good, but when it writes it to the URL the crlfs are ignored?
     Any suggestions?

Becuase you enter your patterns as expressions where some characters are used as control characters, and then have to esacpe some of the control characters in the expressions when you enter them as java strings.
So the expression is actually \r\n if you let a user enter it into a textfield, but you have to escape the \ if you write it as a String in the source code (since \ is an escape characters in strings)
/Kaj

Similar Messages

  • Carriage Returns in HTML Code Creating Extra Spaces Between Elements

    I've looked online all over and can't find the solution to my issue. I've found several pages explaining a similar event, but no solution.
    When placing many divs next to each other, I would like to visually view the code as one div per line: (see image) To get this, I have to use hard returns in my code (this method makes editing a lot easier visually). But doing so adds extra spacing between the divs which turns a 3 column set of thumbnails to 2 colums. I can fix this if I adjust the physical margins between the divs, but this can't be the only fix.
    The other fix is if I place the code back to back to back (see image): This makes the div's behave and appear as they should, but now the code is a visual mess because it's all cluttered.
    What I want is to be able to use as many carriage returns in my code and for browsers to disregard these types of line breaks in the code. So essentially, how can I get away from these extra spaces when using hard returns in code?

    I think that both your pages have a missing </div> at the end somewhere.
    Opps... that happened when I was stripping down the page to create a working example of my issue. I've fixed the missing div and re-uploaded both pages. The problem is still there.
    Change display: inline; to float: left; and add margin: 0 0 4px 4px; (as shown below)
    I had already tried using float, but something else in the code was forcing the columns to 2 instead of 3.
    Have you used "Apply Source Formatting" ?
    I use that religiously. I'm quite anal about visually clean code.
    Well, I just fixed the problem while replying... funny... I removed the margins from the actual img element (.imageThumb img) and placed it on the div which surrounds the img (.imageThumb). I also reapplied the float. Thanks all for the help - it helped me rethink. But I could have sworn I had once placed the margins on .imageThumb before and it didn't work.
    .imageThumb {
        width: 100px;
        height: 75px;
        display: inline;
        float: left;   
        margin: 0px 10px 10px 0px;
        cursor: pointer;
    .imageThumb img {
        /*margin: 0px 10px 10px 0px;*/

  • SQLLDR ignoring carriage returns

    Can SQLLDR ignore carriage returns? I am trying to load records
    from Access to Oracle. The columns I am loading contain content
    for displaying on the web (Text inter-mixed with HTML code).
    Because these columns were created/updated via a web interface,
    they contain a lot of carriage returns. The problem I am having
    in SQLLDR is when it sees a carriage return, it thinks it is a
    new record. Can I prevent this without manually removing the
    carriage returns in the Access records?

    Hi William,
    The Workbench should help you since it uses the following SQL
    Loader syntax :-
    "str '<er>'" specifies that the end of record delimiter is <er>.
    This means carriage returns will be preserved. Also <ec> is the
    end of column delimiter.
    load data
    infile 'AUTHORS.dat' "str '<er>'"
    into table AUTHORS
    fields terminated by '<ec>'
    (AU_ID ,
    AU_LNAME ,
    AU_FNAME ,
    PHONE ,
    ADDRESS ,
    CITY ,
    STATE ,
    ZIP ,
    CONTRACT )

  • Outputting XML carriage return in HTML via XSLT

    Hi,
    I have a scenario where I execute a View Object query in ADF to retrieve results from a particular table in the Database. I then iterate through the results in my Java managed bean and manually construct an XML file with all the appropriate tags. I then pass the XML file through a Transformer class in the Java bean based on an XSLT I have created to produce an HTML page. However I have an issue when it comes to handling carriage returns. One of the database table columns can contain carriage returns within its value but in the final HTML page the carriage returns don't have any effect and the text just displays on one line.
    In the database, the values are stored with the carriage return and in SQL Developer, Toad etc this can be seen e.g. Text1 Text2 Text3 Text4 will display on separate lines. In the XML, the carriage return seems to still be there as when I open the file my element which contains the carriage returns shows each part on a new line e.g. <textElement>Text1
                                                           Text2
                                                           Text3
                                                           Text4</textElement>     (The Text2, Text3 and Text4 all start on a new line at the beginning and there's no prior white space as shown in this post)
    The XML file in JDeveloper also shows carriage return arrow symbols where there is one.
    The HTML page just shows them as Text1 Text2 Text3 Text4 all on one line. Inspecting the source of the HTML shows that the carriage return is in fact there as it also displays as per the XML with the values on separate lines.
    Outputting the value from the View Object in Java to the log shows the value coming out like this - Text1 Text2Text3Text4, which is strange but I know the carriage returns are there so I'm not too fussed about this.
    I have tried escaping the characters in the Java by doing str.replaceAll("[\\r\\n]", ""); (but replacing the "" with &#xD; &#xA; or &x0A;) so in the XML it replaces carriage returns and line feeds with these escaped characters. However, when the XSLT parses the XML it doesn't pick these up and instead actually outputs these actual characters as they are e.g. Text1&x0A;Text2&x0A;Text3&x0A;Text4
    So I can confirm that the carriage return is carrying all the way through to the XSL but I can't help but think that maybe I need to do something in the XSL to process this somehow, e.g. doing the equivalent of the 'replace' in Java but I don't know what I need to search for in the XML and also what to actually replace it with..Do I just replace it with a </BR> in HTML?
    We also parse the XML using PDF and Excel XSL Transformer class and see the same results.
    Any help would be appreciated.
    Thanks

    That's a very commonly asked question.
    HTML doesn't preserve linefeeds, except for the <pre> tag.
    You'll have to replace those characters with <BR/> tags in the XSLT.
    Search the Internet for terms like "XSLT HTML LF", you'll find some XSLT sample templates to handle the replacement.

  • HTML Textarea removing Carriage Returns

    Hi,
    Hoping someone can assist, I am retrieving some data from a table that currently consists of carriage returns but when I try and retrieve this information via Ajax and pass it back into the HTML page textarea field within ApEx, the value returned is one continuous string.
    All my carriage returns are removed.
    Can someone please assist, possibly using a javascript solution or some other type as to how I can preserve the carriage returns.
    Thanks.
    Tony.

    Hi Tony,
    I suspect the problem is simply due to the way HTML handles line breaks, which is to say, it generally ignores them. For example, this html:
    <p>To be or not to be, that is the question;
    Whether 'tis nobler in the mind to suffer
    The slings and arrows of outrageous fortune,
    Or to take arms against a sea of troubles,
    And by opposing, end them. To die, to sleep;
    No more; </p>would be displayed in a browser as:
    To be or not to be, that is the question; Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing, end them. To die, to sleep; No more;
    One way to get around this is to wrap the string in {font:Courier}&lt;pre&gt;&lt;/pre&gt;{font} tags; another would be to replace the carriage returns with {font:Courier}&lt;br&gt;{font}
    Hope this helps.
    tx, --Jen                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Ignore carriage returns in select statement

    Within Oracle Report builder, I am using a select startment
    select descr
    from atable
    "descr" contains carriage returns at the end of the input ie people have enter 'enter' when inputting the data.
    how do write the select statement to ignore the carriage return 'enter' contain within "descr".
    Thanks

    SQL> SELECT 'aa' || chr(10) || 'bb' c FROM dual;
    C
    aa
    bb
    SQL> SELECT translate('aa' || chr(10) || 'bb', chr(10),' ') c FROM dual;
    C
    aa bb
    SQL> SELECT 'aa' || chr(13) || 'bb' c FROM dual;
    C
    aa
    bb
    SQL> SELECT translate('aa' || chr(13) || 'bb', chr(13),' ') c FROM dual;
    C
    aa bb
    SQL> "For Windows"
    Message was edited by:
    mennan
    Message was edited by:
    mennan

  • Converting carriage return in HTML spool

    I've written an sql for spooling the result of a Select in HTML format by using "set markup html on spool on head".
    The problem is that when I open the HTML file I no longer find the carriage returns. I mean the carriage returns that were in CLOB field of the table now miss. Could you help me?
    This is the script:
    set pagesize 10000
    set scan off
    set markup html on spool on head ' - '
    column text heading "TEXT"
    spool c:\temp\report.html
    select dbms_lob.substr (t.field, 5000, 1)     text
    from table t;
    spool off;
    exit;
    The "field" contains a long text with carriage returns that aren't in the report.html anymore

    user12180597 wrote:
    I've written an sql for spooling the result of a Select in HTML format by using "set markup html on spool on head".
    The problem is that when I open the HTML file I no longer find the carriage returns. I mean the carriage returns that were in CLOB field of the table now miss. Could you help me?
    This is the script:
    set pagesize 10000
    set scan off
    set markup html on spool on head ' - '
    column text heading "TEXT"
    spool c:\temp\report.html
    select dbms_lob.substr (t.field, 5000, 1)     text
    from table t;
    spool off;
    exit;
    The "field" contains a long text with carriage returns that aren't in the report.html anymoreset preformat to ON:
    set markup html on spool on head ' - ' PRE ON

  • - How do you refer to an HTML carriage return in PHP?

    Someone sent me a php script that replaces foul language with
    kinder words
    in message board postings. I'd like the same script to weed
    out carriage
    returns, but we can't find the correct syntax for it.
    We're using :
    $patterns[0] = '/\n\r/';
    What's the correct syntax to use in this situation?
    Thanks!

    "David Powers" <[email protected]> wrote in message
    news:[email protected]...
    > Reese wrote:
    >> "David Powers" <[email protected]> wrote in
    message
    >>>
    >>>$patterns[0] = '/[\n\r]/';
    >>>
    >>>That searches for either a newline character or a
    carriage return.
    >>
    >> I'm told this will only work in Windows. That Macs
    would require a
    >> different string. Two, even.
    >>
    >> Anyone know if this is true?
    >
    > What you have been told is only partly correct. Windows
    uses a carriage
    > return followed by a newline character (\r\n). Macs just
    use a newline
    > character (\n).
    >
    > The pattern I have given you search for either a newline
    character or
    > carriage return. So if it's applied in such a way as to
    remove all
    > instances, it will work on both Windows and Mac. An
    alternative pattern
    > which would also work on both is this:
    >
    > $patterns[0] = '/\r?\n/';
    >
    > It looks for an optional carriage return followed by a
    newline character.
    > In other words, it still matches if there isn't a
    carriage return.
    The response of my know-it-all roumanian programmer with an
    ego the size of
    Texas to that was :
    http://www.regular-expressions.info/characters.html
    (bottom of the page)
    \r\n = windows
    \n = Linux (not Mac)
    \r = Mac
    http://www.regular-expressions.info/optional.html
    (tells you what the '?'
    does)
    (it means that the character before it can be there 0 or 1
    times)
    \r?\n = \n (Linux) or \r\n (windows)
    It leaves out the \r all alone, like added by the Mac.
    So, it will not delete the Mac new lines (might delete the
    Mac OSX ones
    since that one is passed on Linux, but not the older ones.)
    Now, you can contradict me all you want and have a busted
    code (then you
    will say it doesn't work because I made it wrong), or do it
    like I told you
    and get it working like it should.
    To this, I told him I would present this to you for a
    rebuttal, but not
    before asking him why he used only the '/\r?\n/' model as an
    example, and
    not the recommended '/[\n\r]/'. Something tells me he has no
    idea what [
    and ] do in this context, so he's avoiding it altogether --
    even though it
    may very well solve the problem on its own the way you claim
    it does.

  • How to replace an html br tag in the field to a carriage return?

    Hi All,
    I have a requirement to replace the <<br>> tag in the text field with a carriage return character "
    Currently the data in the Comments field looks like :
    "20100627 -115541 SECURITY WILL MEET AT MAIN ENTERANCE"<<<br>>"20100627 -115605 Officer notified: ALPHA : DF-10-011891; ST VINCENTS HOSPITAL, ST VINCENTS HOSPITAL, SAINT VINCENTS HOSP, MERRION RD, MERRION, BOOTERSTOWN, DUBLIN; FIRE/ALARM ACTIVATION;'<<br>>'20100627 -115609 PDA MOBILISED AFTER AMENDMENT VIN1'<<br>>'20100627 -"
    The <<br>> break tag was used for HTML purpose and now I would like to replace it with a carriage return character for BI Publisher report.
    Appreciate3 your help.
    Regards
    B
    Edited by: Bees on Jul 21, 2010 4:36 AM

    I downloaded your html template and it works fine for that template and the xml, but in my case it is not working. I need to assign the template just for one field called "Comments" where I need <<br>> tag to work.
    I modified the html as you suggested with the Tidy software, here is what I have done may be you can help me here. I very much appreciate your help.
    1. I have imported the template with the tag <<?import:file:///C:/dfb/biPub/code/htmlmarkup.xsl?>> and it works fine.
    2. Assigned the xsl - assign-template to the comments field.
    <xsl:apply-templates select="Fact._COMMENTS_" />
    *** IncidentsFact_._COMMENTS is the field name where it has <<br>><</br>> embedded into the comments data.
    Edited by: Bees on Jul 30, 2010 6:29 AM

  • Ignore carriage return in a text area

    Hi
    I've a JTextArea of 3 rows on an applet screen.
    I want to disable the carriage return key on the text area.
    Thanx in advance

    Look at the API documentation for JTextField; it contains an example of a class called UpperCaseField. You could modify this code to ignore line-end characters; the concept works with JTextArea as well as JTextField. This code would prevent people from pasting line-end characters as well as from keying them.

  • Carriage return  in a HTML AREA

    i have an HTML where i have put some line of text.
    But in the BOX of creation AREA i vie the line feed (carriage return =, but whe i see it on running it write all without carriage return .
    There ia way to soove this problem ??
    Thank's !

    ok, work very well !!
    Thank's'!

  • Pdfs created on my iMac add hidden carriage returns after each word

    Hello Community,
    This problem exists on my iMac but not my wife's Powerbook.
    Whenever I created a pdf from Preview by printing and then selecting "save as pdf" I got a lovely looking pdf which I could send to anyone and they could view just fine.  However, if I or anyone else selected text from that pdf and pasted it into any other program, it came out with an exclamation point instead of the space between words which is, needless to say, quite undesirable.  Searching around, one thing that was suggested was clearing the font cache so I did this (several times).  It did indeed make a difference:  now instead of exclamation points a carriage return appears after every word!  Once again the pdf looks just fine, but when you copy and paste text from the pdf into any other text program this happens.
    So then I downloaded Adobe Acrobat (the one month fully functional trial program) and made pdfs with this program to see if that was the problem but, no, the same thing occurs.  So it really seems to be a strange glitch in my iMac and my system?
    Any advice would be greatly appreciated.
    Best regards,
    ---Norm

    There is no Flash player version 15... as in your code:
    <param name="swfversion" value="15.0.0.0" />
    For some reason Adobe thought it would be a good idea to target a Flash player version (15) as default.....which may be out a couple years in the future. Go figure!!!
    If you don't like player version 9, change to 10 or 11.... just not 15 (yet).
    Best wishes,
    Adninjastrator

  • Creating Wordpress blog entries with Safari 3 loses carriage returns

    Hi all,
    Ever since I started using Safari on Leopard, I've been losing all my carriage returns in my Wordpress entries. I don't know what's causing it, but Safari for Tiger, and Firefox 2.0.0.8 running on Tiger, Leopard, and Windows XP don't cause this to happen.
    Anyone have a clue as to why this is happening? The carriage returns are apparently getting erased somehow because where there should be a <p />, there's instead no space between the last period of a sentence and the first letter of the next.
    eg:
    This is the end of the line.This is the next line
    I'm not sure this is fixable by the users.
    Message was edited by: Michael Gaines

    Hi all,
    Same safari/wordpress problem here.
    And not the only one! (cookies, crashes)
    With the safari troubles I am now using camino more and more often. If it did copy formated text properly it would now be my first choice.
    However I do like safiris search/find a lot!!
    Detlev

  • textarea text lost in ITS when using carriage return

    If the user hits carriage return in a <textarea>, i.e. to create a new line of text, everything after the carriage return is ignored by R/3 when retrieving the text.
    Is there a way to avoid this loss of text.
    Thanks
    Karen

    Try with this.
    On the html:
    <textarea name="ztdline1[]" cols="100" rows="3">`if (ztdline1.dim > 0)` `repeat with r from 1 to 3; if ( ztdline1[r] != "*" ) ;write (strSub (ztdline1[r], 3, 132), "\r\n"); end; end` `end`</textarea>
    On the PBO dynpro:
      loop at ztdline1 cursor top_line.
      endloop.
    On the PAI dynpro:
      module get_text1.
      loop.
      endloop.
    where module get_text1 is:
      clear ztdline1.
      refresh ztdline1.
      do.
        field-get 'ZTDLINE1' sy-index message_line datalen.
        if sy-subrc <> 0.
          exit.
        endif.
        read table message_line index 1.
        if sy-subrc eq 0.
          ztdline1-tdline = message_line.
          append ztdline1.
        else.
          clear ztdline1-tdline.
          append ztdline1.
        endif.
      enddo.

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

Maybe you are looking for

  • I have created an ibook in ibook author and it appears in ibook on my Mac.  How do I get it on my iPad?  It is too big to email.

    I have created an ibook in ibook author and it appears in ibook on my Mac.  How do I get it on my iPad.  It is too big to email.

  • ABAP Server Proxy

    Hi, I have generated a server proxy in my back-end SAP System based on a deep structure XML message type. I would like to access the data received in my proxy class. My question is how to access an Internal table within another Internal table? Regard

  • Gone, and never called me mother

    A major problem has happened today on iTunes 6.0 on my PC. It was working fine up this afternoon, but I've just booted it up & my whole library of tunes (both off CD and the many MP3's i've downloaded over the last year and a half) have just dissapea

  • Swing button

    hi i am writing swing event handling application in which i want write button event which executes (run) different classes? how to write button event ? i write a public class that does not implement ActionListener interface why ?

  • Syncing Exchange with Google contacts

    I would like to be able to sync my Exchange contacts and my Google Contacts, so they always match. (Explanation: I am using Google Contacts on webmail and Exchange contacts on Exchange, in Mavericks general and on iOS). I can acces both via the Adres