How to Read a program with  HTML tags from SO10

Hi All,
I have a html program in Standard text (SO10).But when I am trying read the program content using FM:  READ_TEXT, the html tags <b> </p> etc are creating problem. 
They are retrieved as <(><<)>b>.
What should we do to get same/original text as in SO10?  Is there any other FM for that? Any other way to achieve this?
Thanks & Regards,
Vimalan Ram

here is the code sample.
after reading the text using READ_TEXT you have to use CONVERT_ITF_TO_ASCII to convert the contents.
DATA: itf_tab TYPE STANDARD TABLE OF   tline ,
wa_itf TYPE tline .
DATA: c_datatab TYPE tdtab_c132 .
CALL FUNCTION 'READ_TEXT'
  EXPORTING
   client                        = sy-mandt
    id                            = 'ST'
    language                      = sy-langu
    name                          = 'Y_RAJA_HTML'
    object                        = 'TEXT'
*   ARCHIVE_HANDLE                = 0
*   LOCAL_CAT                     = ' '
* IMPORTING
*   HEADER                        = HEADER
  TABLES
    lines                         = itf_tab
EXCEPTIONS
   id                            = 1
   language                      = 2
   name                          = 3
   not_found                     = 4
   object                        = 5
   reference_check               = 6
   wrong_access_to_archive       = 7
   OTHERS                        = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
EXPORTING
*   CODEPAGE                = '0000'
*   FORMATWIDTH             = 72
   language                = sy-langu
   tabletype               = 'ASC'
*   TAB_SUBSTITUTE          = ' '
*   LF_SUBSTITUTE           = ' '
*   REPLACE_SYMBOLS         = 'X'
*   REPLACE_SAPCHARS        = 'X'
IMPORTING
*   FORMATWIDTH_E           = FORMATWIDTH_E
*   X_DATATAB               = X_DATATAB
   c_datatab               = c_datatab
*   X_SIZE                  = X_SIZE
  TABLES
    itf_lines               = itf_tab
EXCEPTIONS
   invalid_tabletype       = 1
   OTHERS                  = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Raja
Message was edited by: Durairaj Athavan Raja

Similar Messages

  • How to send a mail with HTML body from Oracle

    Hi Team,
    Can somebody guide me how to send a mail with HTML body from oracle.
    Here is the piece of code i am trying to send a mail.
    procedure SEND_MAIL is
    cursor c_1 is select * from table_name;
    l_mail_id varchar2(40);
    -- ls_mailhost VARCHAR2(64) := Mailhost;
    ls_from VARCHAR2(64) := ‘[email protected]
    ls_subject VARCHAR2(200);
    ls_to VARCHAR2(64);
    l_mail_conn UTL_SMTP.connection;
    ls_left_menu_name VARCHAR2(64);
    ll_emp_num number(8);
    begin
    for i in c_1 loop
    begin
    l_mail_conn := UTL_SMTP.OPEN_CONNECTION('IP');
    UTL_SMTP.HELO(l_mail_conn, 'IP');
    UTL_SMTP.MAIL(l_mail_conn, LS_FROM);
    UTL_SMTP.RCPT(L_mail_conn, LS_TO);
    UTL_SMTP.DATA(l_mail_conn,'From: ' ||ls_from || utl_tcp.crlf ||
    'To: ' ||ls_to || utl_tcp.crlf ||
    'Subject: ' ||ls_subject|| utl_tcp.crlf);
    UTL_SMTP.QUIT(l_mail_conn);
    exception
    when no_data_found then
    null;
    when others then
    RAISE_APPLICATION_ERROR(-20000, 'Failed to send mail due to the following error: ' || sqlerrm);
    end;
    end loop;
    end;
    Thnx

    Hi Nicolas!
    Have you tried to set "Output Format" for "RAW Text" to HTM in SCOT.
    If HTM is missing in your dropdown-list, you could check out table SXCONVERT2. Copy the line with category T/format TXT, and change the format from TXT to HTM. The existing function
    SX_OBJECT_CONVERT__T.TXT does not need to be changed. Now you should be able to choose HTM in SCOT. You will probably need som HTML-tags in your text to make it look good.
    Hope this helps!
    Regards
    Geir

  • Extract text file with HTML tags from JTextPane

    hello world
    I have a big problem !
    I am creating an applet with a JTextPane ...
    so I can write text, (bold, italic etc), i can insert images.
    Now i want to create a text file with all the HTML tags
    corresponding to what I wrote in my JTextPane.
    I want to have and save the HTML file corresponding to what i wrote ...
    Is it possible ? Help me please ....
    Jeremie

    writing to a file from an applet is going to take a fair amount of work on your part.
    in order to write to a file from your applet, you have to use servlets or jsp to write to a file on your server. if you wish to write locally, look into signing your applet or policy settings of your browser.
    for writing to a file to the server, i suggest you look into servlets and tomcat to run the servlets.
    i just finished a project that used servlets and they take some time to figure out, but its definitely worth your time.
    here are some websites...
    http://www.j-nine.com/pubs/applet2servlet/Applet2Servlet.html
    http://jakarta.apache.org
    other websites have tutorials that you can look at too
    Andy

  • How do I set BI Publisher to read html tags from the database?

    How do I set BI Publisher (Release 10.1.3.4) to read html tags from the database? For example if the text is quoted with a bold tag I want my output to display the text in bold. Is there a setting or something I can set?

    I took a look at Tim Dexter's blog as suggested and the sample worked, but for the elements in the xml file not for the value coming from the database, however this is good to know as well!
    I have data in the data base column which looks like this:
    'MS Applied <B(bold tag)> Mathematics</B(bold tag)>University of Southern California'
    I want the data to be rendered like this:
    'MS Applied <B>Mathematics</B> University of Southern California'.
    In Report Builder on the property sheet I would set Contains HTML Tags property to Yes and the report would render correctly.
    In BI Publisher 10.1.3.4 I can not seem set it to read this I have change the configure properties of the report to Character set to HTML and Make HTML output accessible to True. I just can't figure out what I'm missing.
    Thank you for any assistance you can offer.

  • How to put String with html tags as it is into xml

    I am using apache dom API to create xml from java.
    I have a string with html tags in it .when I add the string to xml, its replacing all the "<"; with &lt and ">" with > I would like the html tags to look as it is instead of the > and & lt;. How can I acheive that
    this is the code snippet of what I am doing
    In java class
    String titleString = "<font color=red>This Is an Example of a Red Subject</font>"
    Document doc = new DocumentImpl();
    Element root = doc.createElement("bulletin");
    Element item = doc.createElement("title");
    item.appendChild(doc.createTextNode(titleString));
    In Xml it looks like below
    <title><font color=red>This Is an Example of a Red Subject</font></title>
    but I would like to have the xml like below
    <title><font color="red">This Is an Example of a Red Subject</font></title>
    Can you please suggest me whats the best way to acheive this.
    I appreciate all your help
    Thank you
    Suma

    One problem is that you don't understand escaping. If you re-read what you posted you'll see that what you say you get, and what you say you want, are identical. That's because you didn't escape one of the two properly. So your first step should be to find the section about escaping in Chapter 1 of your XML book and read it carefully. Figure out what you should have done here (yes, the same rules apply).
    However, to attempt to answer what I think your question is: if you have a String which contains markup, and you want to convert that String to XML elements, then you have to feed the String into an XML parser.

  • Text in internal table with HTML tags.

    Hi ,
    I have Text in internal table with HTML tags.
    The text has to be shown in output of smartform as formatted text.
    That is the smartform should READ the HTML TAGS , convert the text accordingly and show in the output as formatted text.
    I dont want to make a webform . This is for NORMAL SPOOL output and NOT for WEB OUTPUT.
    IN SHORT
    :- the text in the internal table is like this ( please ignore the dot in the HTML TAG )--
    <html><.U>this is heading</.U>Line with no break<.br>some content text</.br>
    </html>
    OUTPUT
    <U>this is heading</U>Line with no break<br>some content text</br>
    1)  Can I can get the output and store it as text in a string variable and show in the smartform  ?
    In this case I want to know how to convert  and store in a variable  in sap .
    OR
    2) Can the text element convert the text with HTML TAGS to html formatted output and show it ?
    Regards,
    Jagat

    Hi,
    Use the FM SCP_REPLACE_STRANGE_CHARS and check
    See the
    Converting html special characters to plain characters (e.g. u00FC to u00FC)

  • How to call java program by HTML page

    Hi guys,
    I'm new java programer and want to build an HTML page to access to ORACLE database on NT server by JDBC, Can anyone give me a sample?
    I already know how to access database by JDBC, but I don't know how to call java program by HTML page.
    If you have small sample,pls send to me. [email protected], thanks in advance
    Jian

    This code goes with the tutorial from this web page
    http://java.sun.com/docs/books/tutorial/jdbc/basics/applet.html
    good luck.
    * This is a demonstration JDBC applet.
    * It displays some simple standard output from the Coffee database.
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.util.Vector;
    import java.sql.*;
    public class OutputApplet extends Applet implements Runnable {
    private Thread worker;
    private Vector queryResults;
    private String message = "Initializing";
    public synchronized void start() {
         // Every time "start" is called we create a worker thread to
         // re-evaluate the database query.
         if (worker == null) {     
         message = "Connecting to database";
    worker = new Thread(this);
         worker.start();
    * The "run" method is called from the worker thread. Notice that
    * because this method is doing potentially slow databases accesses
    * we avoid making it a synchronized method.
    public void run() {
         String url = "jdbc:mySubprotocol:myDataSource";
         String query = "select COF_NAME, PRICE from COFFEES";
         try {
         Class.forName("myDriver.ClassName");
         } catch(Exception ex) {
         setError("Can't find Database driver class: " + ex);
         return;
         try {
         Vector results = new Vector();
         Connection con = DriverManager.getConnection(url,
                                  "myLogin", "myPassword");
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);
         while (rs.next()) {
              String s = rs.getString("COF_NAME");
              float f = rs.getFloat("PRICE");
              String text = s + " " + f;
              results.addElement(text);
         stmt.close();
         con.close();
         setResults(results);
         } catch(SQLException ex) {
         setError("SQLException: " + ex);
    * The "paint" method is called by AWT when it wants us to
    * display our current state on the screen.
    public synchronized void paint(Graphics g) {
         // If there are no results available, display the current message.
         if (queryResults == null) {
         g.drawString(message, 5, 50);
         return;
         // Display the results.
         g.drawString("Prices of coffee per pound: ", 5, 10);
         int y = 30;
         java.util.Enumeration enum = queryResults.elements();
         while (enum.hasMoreElements()) {
         String text = (String)enum.nextElement();
         g.drawString(text, 5, y);
         y = y + 15;
    * This private method is used to record an error message for
    * later display.
    private synchronized void setError(String mess) {
         queryResults = null;     
         message = mess;     
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();
    * This private method is used to record the results of a query, for
    * later display.
    private synchronized void setResults(Vector results) {
         queryResults = results;
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();

  • How to change inner content of HTML tag using HTMLDocument?

    I want to change the inner content of an HTML tag from a HTMLDocument. The tag is like
    <span id ="id1">Replace me</span>.
    So I want to change the text "Replace me" inside the span tag and replace it with an other text.
    I can get the span element using
    HTMLDocument.getElement("id1")
    I have tried many things with the Element instance i got from getElement. But I find no way to change the inner content of the HTML element. Any ideas?

    If I use JDK 1.5 the SPAN tag works, so I checked the core of the problem which is inserting HTML code in an HTML tag.
    setInnerHTML works fine for block tags like DIV but not if the tag is a leaf element like the SPAN tag. I have tried to use the following code for leaf elements:
    Element elem = m_htmlDocument.getElement(id);
    int nStartOffest = elem.getStartOffset();
    int nEndOffset = elem.getEndOffset();
    int nLength = nEndOffset - nStartOffest;
    m_htmlDocument.replace(nStartOffest, nLength, html, elem.getAttributes());
    This works, but only if the new HTML string does not contain HTML tags like a link <href..... >. If the string contains HTML tags the replace method masks all characters like < or >. So the link is not shown as link in the HTML page but as HTML text.
    The next thing I have tried is using
    m_htmlDocument.setOuterHTML(elem, html);
    This works too but it replaces the whole original HTML element like the SPAN tag.
    So there is still the question how to insert HTML text into a leaf Element in a HTMLDocument.

  • How do you close programs with new iOS7? Old way doesn't seem to work!

    How do you close programs with new iOS7? Old way doesn't seem to work!

    After double tap home button, swipe up on the app card that appears above the icon.

  • How to remove HTML tags from a String ?

    Hello,
    How can I remove all HTML Tags from a String ?
    Would you please to give me a simple example ?
    Best regards,
    Eric

    Here's some code I cooked up. I have created an object that processes code so that it can be incorporated directly into a project. There is some redundancy so that the it can be used in more than one way. Depending on your situation you might have to make the condition statement a little more sophisticated to catch stray ">" tags.
    I have also included a Tester application.
    //This removes Html tags from a String either by submitting the String during construction and then
    // calling getProcessedString() or
    // by simply calling " stringwithoutTags=removeHtmlTags(stringWithTagsSubmission); "
    //Note: This code assumes that all"<" tags are accompanied by a ">" tag in the proper order.
    public class HtmlTagRemover
         private String stringSubmission,processedString,stringBeingProcessed;
         private int indexOfTagStart,indexOfTagEnd;
         public HtmlTagRemover()
         public HtmlTagRemover(String s)
              removeHtmlTags(s);          
         public String removeHtmlTags(String s)
              stringSubmission=s;
              stringBeingProcessed=stringSubmission;
              removeNextTag();
              return processedString;
         private void removeNextTag()
              checkForNextTag();
              while((!(indexOfTagStart==-1||indexOfTagEnd==-1))&<indexOfTagEnd)
                   removeTag();
                   checkForNextTag();
              processedString=stringBeingProcessed;
         private void checkForNextTag()
              indexOfTagStart=stringBeingProcessed.indexOf("<");
              indexOfTagEnd=stringBeingProcessed.indexOf(">");
         private void removeTag()
              StringBuffer sb=new StringBuffer("");
              sb.append(stringBeingProcessed);
              sb.delete(indexOfTagStart,indexOfTagEnd+1);
              stringBeingProcessed=sb.toString();
         public String getProcessedString()
              return processedString;
         public String getLastStringSubmission()
              return stringSubmission;
    public class HtmlRemovalTester
         static void main(String[] args)
              String output;
              HtmlTagRemover h=new HtmlTagRemover();
              output="The processed String: "+h.removeHtmlTags("<Html tag>This is a test<another Html tag> string<yet another Html tag>.");
              output=output+"\n"+" The original string:"+h.getLastStringSubmission();
              System.out.print(output);

  • How to exlcude HTML Tags from Excel Reports

    Hi Guys
    Within Project Online - OData extract to Excel
    Has anyone found a way to eliminate the HTML tags from Multi Line Text fields within Project Server? I can easily extract the text and generate nice Excel Reports, but the html tag is very annoying in the Excel Reports and it doesn't read easily.
    Any help would be appreciated.
    Marc Soester [MVP] http://marcsoester.blogspot.com

    Marc, 
    What you could do (given that you find the required time and energy to write the lines),
    would be to replace all (!) html characters like here (http://stackoverflow.com/questions/14705605/remove-html-tags-from-cell-strings-excel-formula -
    this is one of the Excel UDF/VB-based solutions, but will not refresh in Excel Services - however there is a good list of what to replace) with PowerQuery.
    That would refresh over a PowerBI subscription in the least..
    -Ville

  • How to open labview program with Quit Labview function inside?

    Hi Any idea how to open labview program with  Quit Labview function inside?
    I forgot to add and set the condition of the type for this program.
    If the program is an application, it would close straight away.
    If it is still labview work, it will go straight to editing program without closing.
    So I need to recover, open it and make some changes.
    Clement
    Solved!
    Go to Solution.

    Put the VI in a project and open it from there, then it shouldn't autorun. You can use App.kind property of application to decide whether to close or not.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Tablespace usage report generated with html tags instead of text

    Hi ,
    We have a unix shell script scheduled to find tablespace usage and sends the report to our mail id.
    For the past few weeks(no changes idone in the script) the report is coming with html tags instead of text as below.
    </head>
    <body>
    <p>
    <table border='1' width='90%' align='center' summary='Script output'>
    <tr>
    <th scope="col">
    TABLESPACE_NAME
    </th>
    <th scope="col">
    CUR_USE_MB
    </th>
    <th scope="col">
    CUR_SZ_MB
    </th>
    <th scope="col">
    CUR_PRCT_FULL
    </th>
    <th scope="col">
    FREE_SPACE_MB
    </th>
    <th scope="col">
    MAX_SZ_MB
    </th>
    <th scope="col">
    OVERALL_PRCT_FULL
    </th>
    </tr>
    <tr>
    <td>
    SYSTEM
    </td>
    <td align="right">
    268
    </td>
    <td align="right">
    500
    </td>
    <td align="right">
    54
    </td>
    Is this any settings issue or anything to be modified in the script.Could you please reply..
    Regards,
    Bharath.
    Edited by: 870384 on Jul 6, 2011 1:17 AM

    Hi Sven W,
    Please find the sql below that is generating the tablespace usage report. In the staring of the script markup is set to ON and at the end it is set to OFF.Do you suggest any changes to this..?
    SET ECHO OFF
    SET PAGES 999
    SET MARKUP HTML ON SPOOL ON
    col tablespace_name format a15 trunc
    col cur_use_mb for 999999999
    col cur_sz_mb for 999999999
    col free_space_mb for 999999999
    col max_sz_mb for 999999999
    compute sum of cur_use_mb on report
    compute sum of cur_sz_mb on report
    compute sum of free_space_mb on report
    compute sum of max_sz_mb on report
    break on report
    spool tablespace.html
    select tablespace_name,
    round(sum(total_mb)-sum(free_mb),2) cur_use_mb,
    round(sum(total_mb),2) cur_sz_mb,
    round((sum(total_mb)-sum(free_mb))/sum(total_mb)*100) cur_prct_full,
    round(sum(max_mb) - (sum(total_mb)-sum(free_mb)),2) free_space_mb,
    round(sum(max_mb),2) max_sz_mb,
    round((sum(total_mb)-sum(free_mb))/sum(max_mb)*100) overall_prct_full
    from (select tablespace_name,sum(bytes)/1024/1024 free_mb,0 total_mb,0 max_mb from DBA_FREE_SPACE group by tablespace_name
    union select tablespace_name,0 current_mb,sum(bytes)/1024/1024 total_mb,sum(decode(maxbytes, 0, bytes, maxbytes))/1024/1024 max_mb
    from DBA_DATA_FILES group by tablespace_name) a group by tablespace_name;
    select owner,segment_name,segment_type,bytes/(1024*1024) size_m
    from dba_segments
    where tablespace_name = 'SYSTEM' and segment_name='FGA_LOG$' order by size_m desc;
    spool off;
    SET MARKUP HTML OFF SPOOL OFF

  • How to read the code of html page

    Hi,
    I want to know how to read the code of html page through Java? And if anyone know the link of full implementation of Page Rank Algorithm in Java.
    Please let me know. I have to do the project on that topic.
    Regard
    Vivek

    Vivek_NITT wrote:
    I want to know how to read the code of html page through Java? Get the input stream from an HttpUrlConnection. Read from it like from any other stream.
    And if anyone know the link of full implementation of Page Rank Algorithm in Java.Which one?

  • Distributed programming with HTML DB?

    Hi!
    Has anyone done any distributed programming with HTML DB? If so, are there any crucial factors to be taken into account?
    I thought of extracting the original application, importing it into my DB, changing and creating pages, exporting the single pages and re-importing them into the original application.
    I suspect that creating new pages will cause trouble, but what about changing existing ones? Can they be overwritten without any problems?
    Thanks for sharing your experiences!
    Sabine

    Sabine,
    Do you want to make changes to you application only on a development machine then update production?
    If so then you can make a new version of the application and simply import the entire application back into production. My personal preference is to pick a new application id for the updated application when I re-import. That way my current production app is sitting there unchanged. I then point users to the new version and update the proprieties of the old one to stop users running it (with a message to log into the new application) It also allows me to back out easily if there are problems.
    Chris

Maybe you are looking for