Smartform with text containing html tags

I am reading from a table that contains html tags like
<br>
<menu>
<LI type="disc">This is a line which contains html tags
that goes over to 2nd line
<LI type="disc"> This is also another line which contains html
tags.
and each line is stored in a different row. The customer has agreed to use only 3 of the above html tags (
<br>, <menu> and <LI type="disc">
When the output is previewed in smartforms, the html tags needs to be formatted and not print in raw format as follows: 
<LI type="disc">This is a line which contains html tags
   that goes over to 2nd line
<LI type="disc"> This is also another line which contains html
   tags.
How can this be done ?

ok understood...
you can try this
Loop at i_html into wa_html.
tmp = strlen( wa_html-line).
do tmp times.
if wa_html-line+0(1) = <
l_start = 1.
__elseif wa_html-line+0(1) = >
l_start = 0.
concatenate l_char wa_html-line+0(1) into l_char.
endif.
if l_start = 1.
concatenate l_char wa_html-line+0(1) into l_char.
wa_html-line = wa_html-line+1(l_tmp - sy-index) OR use the keyword SHIFT LEFT...plz chk the syntax
elseif l_start = 0 and l_char = <LItype=disc>
concatenate <BULLET>  wa_html-line into  wa_html-line separated by space.
endif.
enddo.
modify i_html form wa_html.
endloop.
now u define two text element one with bullet and another without bullet. this is how u insert bullet:
goto to the texteditor of a text element in smartform. Its a small button on the left hand side of.
Then goto insert>characters>sap symbols.
for ur requirement u can use the symbol SYM_FILLED_CIRCLE.
Remember these icons or symbols whatever u will not be able to see in print preview....u have to take a print
and see
Now at the time of display check if the line contains the
tag <BULLET> ( if wa_html-line+0(8) = '<BULLET>')
if the line has the tag then display ur text in the text element with bullet
otherwise
display it in the non bullet text element..
remeber to remove the tag before dispalying
hope this solves ur prob...

Similar Messages

  • Contains HTML tags & print

    Hi,
    Reports6i patch10
    Scenario is: I have a column (database colummn text with embedded HTML ) where I set property 'Contains HTML tags'
    I get the column incl html rendered find where desformat=html&destype=file&desname=myfile.html '
    but when setting
    destype=printer&desformat=html&desname=myqueue and sending output straight to printerqueue the html is not being rendered in fact the column is not rendered at all
    HAs anyone similar experience ? solutions ?
    TIA
    Per

    Hello Per Elmgreen,
    When DESTYPE is specified as PRINTER, Reports formats output in PS or PCL format (depending on the printer language understood by the destination printer). Since these formats do not understand HTML tags, any such markup in the output will remain unformatted.
    In order to get properly formatted output using HTML tags, you could generate the report to a HTML file (with the 'Contains HTML tags' property set) and then print the file using a browser.
    Thanks,
    The Oracle Reports Team.

  • Want text input containing HTML tags to appear as HTML in output format

    Hi,
    We have a table in Oracle database that has a column named detail,one of its values is like this: <bold><italics>Good Morning</italics></bold>. What our client wants is that the output format should show: <b><i>Good Morning</b></i>. That is,Bi Publisher should be able to parse the HTML tags and provide the desired output. Please tell me how to achieve this. Any help is much appreciated.
    Thanks and regards,
    Debarati,
    [email protected]

    Hi,
    have a look here (http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html) to get an idea.
    regards
    Rainer

  • Help needed in formating the text using HTML tags in reports 10g

    Hi all,
    I have a situation here. We have an application which prints out Reports with a few lines of text in it. This text is entered by the user through our forms application in a field. That particular text is stored in each row of a particular long column. Here I want to modify the text, while printing, on the report like underline, bold, italics etc,.
    As of now I am using the HTML tags, in the forms, to do so as most the times the text in the report is same.
    I want to know if this can be done by the user itself while he is entering the data in the field through the form.
    Thanks in advance . I will explain you more clearly if you need.

    Hi,
    The code did work. But I am not sucessfully able to display the values entered in 2nd page in the 3rd page.Please find the code below:
    <html>
    <head>
    <script language="LiveScript">
    function WinOpen() {
    if (document.form1.cap.value == "")
    alert("Enter value in text box");
    return;
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    msg.document.write("<HTML><HEAD><TITLE>Yo!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>This is really cool!</B></h1></CENTER>");
    msg.document.write('<BODY><form name="form2">');
    for(var i =0; i < document.form1.cap.value; i++)
    msg.document.write("<INPUT type=text name=tbAlphaNumeric>");
    msg.document.write("<br>");
    msg.document.write('<input type="button" name="Button2" value="Steal" onClick="javascript:window.opener.WinShow();">');
    msg.document.write('</form></BODY></HTML>');
    function WinShow() {
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    msg.document.write("<HTML><HEAD><TITLE>Great!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>Display of second page text elements!</B></h1></CENTER>");
    msg.document.write('<BODY><form name="form3">');
    for(var j =0; j < document.form1.cap.value; j++)
    msg.document.write(document.form2.tbAlphaNumeric[j].value);
    msg.document.write("<br>");
    msg.document.write('</form></BODY></HTML>');
    </script>
    </head>
    <body>
    <form name="form1">
    <INPUT type= "text" name=cap>
    <input type="button" name="Button1" value="Push me" onClick="WinOpen()">
    </form>
    </body>
    </html>

  • Reports does not show data which contains HTML tags

    Dear Gurus
    Im trying to resolve this problem but im really stuck in it. I have the requirment to customize PO reports in R12 and at the end of every report we have to show its Terms and Conditions.I have the following query wich brings me the data i need.
    SELECT
    otu.document_number po_segment1,
    otu.document_id,
    otta.template_id,
    otta.template_name,
    otta.description,
    otta.intent,
    otta.status_code,
    otta.start_date,
    otta.end_date,
    otta.instruction_text,
    otu.document_type,
    otu.document_number po_segment1,
    otu.document_id po_header_id,
    osb.HEADING titulo_seccion,
    oav.display_name,
    oav.article_text article_text
    FROM
    apps.okc_terms_templates_all otta,
    apps.okc_template_usages otu,
    apps.okc_k_articles_b okab,
    apps.okc_sections_b osb,
    apps.okc_articles_all oaa,
    apps.okc_article_versions oav
    WHERE otta.template_id = otu.template_id
    AND otu.document_id = okab.document_id
    AND osb.scn_id(+) = okab.scn_id
    AND okab.article_version_id = oav.article_version_id
    AND oaa.article_id = oav.article_id
    AND otu.document_number='21000000111' -- Purchase Document
    AND otu.DOCUMENT_TYPE NOT IN ('RFQ_RESPONSE', 'RFQ','RFI_RESPONSE','RFI','AUCTION_RESPONSE','AUCTION')
    The problem is the field okc_article_versions.article_text storage data with HTML tags as an example : ''<P>COMPANY will make it’s best effort to provide an accurate forecast to CONTRACTOR, <B><I>at the end of every quarter,</I></B> however, a forecast in any form, shall not represent a firm commitment by COMPANY.,</P>"
    So when i tried to show the information my .rtf template nothing comes out. Does anybody knows whats happenig and how to resolve it??
    Please, resolve this issue is more than urgent an i guess somebody have the answe Thanks a lot
    Mily

    Hi ,
    Currently image url have value http://serverip:port/reports/rwservlet
    I don't know is this correct? Suggest What value it should have?
    Thanks
    Vinod

  • Method to Format a string column containing HTML tags as simple string.

    Hello,
    I am working with formating a string column which holds Html tags.
    I want to remove these tags from the actual data which has to be shown on the BI Publisher report.
    Can you suggest how can we format this in the DataSet designer of BI publisher so that my data is recognised on the Layout designer.
    I have been trying to create an expression using the "Add Element by Expression" option to format this html tag data as normal string without the tags.
    Can you suggest if this is the correct method to do this.
    I found this below code being used in an existing DateSet but i am not able to recreate a similar formating on this kind of data column.
    <![CDATA' || '['|| TO_CLOB(SUCCESS_CRITERIA) || ']' || ']>
    Kindly suggest if you have any idea on the above mentioned issue.
    Thanks,
    Shweta

    And read this:
    Navigate yourself around pitfalls related to the Runtime.exec() method
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Pulling Data Containing HTML TAGS

    We have a DB application that allows users to freely enter data. Our problem is that if a users enters HTML tags as their data and submits it to our DB, we are able to encode the response and store the data in it's original context (a requirement).
    Now, here is the problem. When the data is pulled out from the DB and displayed on the HTML page, if the user had submitted HTML tags, our page doesn't display the HTML tags but rather their browser interprets the tag.
    We do not want the browser to interpret the tag, just want the actual characters displayed.
    so if a user enteres <B> HELLO WORLD</B>
    we want the less than and greater than signs to be displayed..not the phrase HELLO WORLD to be displayed in bold.
    Any help is appreicated.

    Darn,
    When you pull the string from the DB, you would be able to pass it through a simple 'filter' method that converts important HTML characters to the display element equivelents.
    For example, you would want to change all < tags to &lt; all & to &amp; and quotes to &quot; This might just about do everything you would need.
    It might be as easy as doing a few
    dbString = dbString.replaceAll("<", "&lt;");
    etc...

  • How to render text containing enumeration tag in a list form

    We have text definition that include enumeration tag that are to publish as a enumeration
    <text>this is an enumeration of color :
    <enum>
    <enumItem>blue
    <enum>
    <enumItem>dark blue</enumItem>
    <enumItem>ligh blue</enumItem>
    </enum>
    </enumItem>
    <enumItem>red</enumItem>
    </enum> for the blue and the red
    <text>
    has to be rendered as :
    This is a enumeration of color :
    1. blue
    1.1 dark blue
    1.2 light blue
    2. red
    for the blue and the red
    The enumeration formatting is to be done in the template
    Is it possible with xml publisher template builder ? is it described somewhere ?

    Hi Tim
    Thank you for your answer but after i checked out again these chapters i didn't find the needed info.

  • Smartforms with text type DOKU

    Hi,
    I would like to display a text in a Smartforms. This text is a standard include from the QM module. The name is QM_QCERT_GENERAL_TEXT.
    Inside this text, when I display the content in the transaction SO10, there is the code :
    INCLUDE QM_QCERT_GENERAL_TEXT OBJECT DOKU ID TX
    When I press the preview button in SO10 I saw a text, but when I use this text in a smartform nothing append.
    Do you have any idea about this problem ?
    Rgd
    Frédéric

    Hi Matt,
    that didn't work, I can't find any "normal" way to insert this text.
    For the moment, I have created my own code like this :
    * Recupère la version max de la doc.
      select max( dokversion )
             into w_version
             from dokhl
             where id     eq 'TX'
             and   object eq 'QM_QCERT_GENERAL_TEXT'
             and   langu  eq sy-langu.
    * Recherche des textes d'en-tete du document QM.
      select dokformat doktext
             into table it_text_line
             from doktl
             where id         eq 'TX'
             and   object     eq 'QM_QCERT_GENERAL_TEXT'
             and   langu      eq sy-langu
             and   dokversion eq w_version.
    Rgd
    Frédéric

  • HTML tags in SmartForm

    Hi,
    We have a requirement where we want to push text containing html tags to a SmartForm and for this text to be output formatted in bold, italic (as it would on a html page) in the SmartForm.
    Does anyone know if this is possible?
    Thanks,
    Ian

    Hope the following thread will help you.
    Hyperlink in Smartform
    To change the format of the text, define a smart style and create a character type in required format(bold and italic).
    Use that character type for your text.

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

  • 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 can I eliminate HTML tags from Oracle Text Snippet?

    I perform a search on many tables and on many columns of those tables.
    Some of those columns are VARCHAR2 and some CLOB.
    Also, some of the searchable data are HTML and some are plain text.
    My problem is that ctx_doc.snippet fetches the HTML tags.
    For example I get this, as a snippet result in one of my searches: Qual Germany n1 &lt;p&gt;Test Qual Germany n1&lt;/p&gt;
    I want the result to be fetched without the HTML tags.
    In my index configuration I have used NULL FILTER and HTML_SECTION_GROUP.With that configuration I managed to eliminate the HTML tags but not in all cases!
    For example:
    I search table CONTENTS columns TITLE(VARCHAR2) and MAIN_TEXT(CLOB)
    I created the following procedure that concatenates the two columns:
    CREATE OR REPLACE PROCEDURE CONTENTS_PROC( p_id in rowid, p_lob IN OUT clob)
    IS
    BEGIN
    FOR c1 IN (SELECT main_text||' '||title data FROM contents WHERE ROWID = p_id)
    LOOP
    dbms_lob.copy( p_lob, c1.data,
    dbms_lob.getlength( c1.data ));
    END LOOP;
    END;
    I created a user Datastore:
    BEGIN
    ctx_ddl.create_preference( 'content_trans_datastore', 'user_datastore' );
    ctx_ddl.set_attribute( 'content_trans_datastore', 'procedure', 'CONTENTS_PROC' );
    END;
    and finally I create the index:
    CREATE INDEX content_trans_ot_idx ON contents(ORACLE_TEXT_COLUMN)
    INDEXTYPE IS ctxsys.CONTEXT PARAMETERS ('datastore content_trans_datastore SYNC(ON COMMIT) STORAGE INDEX_STORAGE filter ctxsys.null_filter section group ctxsys.html_section_group');
    When I perform the search on those data: &lt;p&gt; &lt;strong&gt;Test Doc-Test &lt;/strong&gt; &lt;/p&gt; the snippet I get is: Test Doc-Test.
    That's fine, the html tags are removed!
    In another case I search table NCP columns NAME(VARCHAR2) and BODY(VARCHAR2)
    I created the following procedure that concatenates the two columns:
    CREATE OR REPLACE PROCEDURE NCP_PROC( p_id in rowid, p_lob IN OUT clob)
    IS
    BEGIN
    FOR c1 IN (SELECT name||' '||body data FROM ncp WHERE ROWID = p_id)
    LOOP
    dbms_lob.copy( p_lob, c1.data,
    dbms_lob.getlength( c1.data ));
    END LOOP;
    END;
    I created a user Datastore:
    BEGIN
    ctx_ddl.create_preference( 'ncp_trans_datastore', 'user_datastore' );
    ctx_ddl.set_attribute( 'ncp_trans_datastore', 'procedure', 'NCP_PROC' );
    END;
    and finally I create the index:
    CREATE INDEX ncp_trans_ot_idx ON ncp(ORACLE_TEXT_COLUMN)
    INDEXTYPE IS ctxsys.CONTEXT PARAMETERS('datastore ncp_trans_datastore SYNC(ON COMMIT) STORAGE INDEX_STORAGE filter ctxsys.null_filter section group ctxsys.html_section_group');
    When I perform the search on those data: test &lt;strong&gt; &lt;/strong&gt;http://deleteme.com the snippet I get is: test &lt;strong&gt; &lt;/strong&gt;http://deleteme.com!!!!!!!!!!
    How is this possible? Why in the first case the HTML tags are eliminated and in the second case they are not?
    Thanks,
    Margarita
    Edited by: user13312701 on 07-Sep-2010 08:51

    Doing various tests I found out that the problem is when I need to search in multiple columns of a table.
    That is when I create a user_datastore that uses a procedure that concatenates the columns.
    And especially when the data with the html tags is in a VARCHAR2 column.
    e.g
    --create the table*
    CREATE TABLE CONTENT_TRANS (content_trans_id NUMBER,
    main_text CLOB,
    title vARCHAR2(2000),
    oracle_text_column VARCHAR2(1));
    alter table "CONTENT_TRANS" add constraint CONTENT_PK primary key("CONTENT_TRANS_ID") ;
    --Insert dummy data*
    Insert into CONTENT_TRANS
    (CONTENT_TRANS_ID,MAIN_TEXT,TITLE)
    values
    (1,'lorem','lorem <p>qualification</p> 2.1 ');
    Insert into CONTENT_TRANS
    (CONTENT_TRANS_ID,MAIN_TEXT,TITLE)
    values
    (2,'lorem','lorem <br>qualification</br> 2.1 ');
    --CREATE THE procedure that concatenates main_text(CLOB) and title(VARCHAR2)*
    CREATE OR REPLACE PROCEDURE CONTENT_TRANS_PROC( p_id in rowid, p_lob IN OUT clob)
    IS
    BEGIN
    FOR c1 IN (SELECT main_text||' '||title data FROM content_trans WHERE ROWID = p_id)
    LOOP
    dbms_lob.copy( p_lob, c1.data,
    dbms_lob.getlength( c1.data ));
    END LOOP;
    END;
    --Create the user datastore*
    BEGIN
    ctx_ddl.create_preference( 'content_trans_datastore', 'user_datastore' );
    ctx_ddl.set_attribute( 'content_trans_datastore', 'procedure', 'CONTENT_TRANS_PROC' );
    END;
    --Create the index*
    CREATE INDEX content_trans_ot_idx ON content_trans(ORACLE_TEXT_COLUMN)
    INDEXTYPE IS ctxsys.CONTEXT PARAMETERS ('datastore content_trans_datastore SYNC(ON COMMIT) filter ctxsys.null_filter section group ctxsys.html_section_group');
    exec ctx_doc.set_key_type('PRIMARY_KEY');
    --Perform the query
    SELECT SCORE(1),ct.content_trans_id, ctx_doc.snippet('content_trans_ot_idx', ct.content_trans_id, 'lorem') as snippet
    from content_trans ct
    where contains(ct.ORACLE_TEXT_COLUMN, 'lorem', 1) > 1;
    Results WITH NOT WANTED HTML TAGS:
    6     1     <b>lorem</b> <b>lorem</b> &lt;p&gt;qualification&lt;/p&gt; 2.1
    6     2     <b>lorem</b> <b>lorem</b> &lt;br&gt;qualification&lt;/br&gt; 2.1
    Edited by: user13312701 on 13-Oct-2010 01:18

  • [RB 6i] Format text in the field using HTML-tags. Or another way...

    If some fields of tables in database contain html tags such as 'H<sub>2</sub>O' (here is html tag 'sub') or 'some<b>text</b>'(here is html tag 'b') how can I to make Report Builder 6i to understand these tags or at least don't show them?
    Or how in another way can I format a part of text inside the field?
    thanx before
    Max

    Hi Maxim,
    If the output is PDF, the only way is to filter the incoming values yourself. You will need to create a PL/SQL column and remove the HTML markup tags. This, of course, leaves you without attributes you wanted in text (ie: the no "Bold" characters). You can still do this in with the same report basing the output from the PL/SQl formula column on the "desformat" input parameter.
    Reports doesn't have any "markup" capability. ie: A field only has one font & one colour. You can have multiple fonts for boilerplate text but, again, only a single colour.
    Robin.

  • HTML tags in Dynamic Text

    I am planning on building a website in flash with 90 percent
    of the site in dynamic text. Will flash read the html tags in a
    text file as text or html and code it as a browser would.

    yes, Flash will accept HTML tags, and there are a couple of
    different methods to make this work. But in my limited experience,
    it's a little tricky, and both require a little extra Actionscript
    to make them function. I read some info about this in some of the
    tutorials, but I can't point to them at the moment.
    First, one can use use the ' yourtext_txt.htmlText =
    yoursource_txt; ' method to read a plain text line that contains
    HTML tags. However there are some parameters that need to be set up
    before it will function properly, and there are several optionals
    to choose from, but it seems most importantly to set the HTML
    property to true as in ' yourtext_txt.html = true; ' but there
    still are several different things requried, especially if your
    looking for dynamic on-the-fly changes to different sections of
    text. here's a snipit I'd been working on that uses a similar
    system with arrays:
    did that work, huh? thought I was adding code.
    Another method is to use a CSS or by defining your own
    stylesheet tags within Flash Actionscript. This method seems to
    work better when using LoadVars, where you would define the
    ContentStyle. First you define the StyleSheet, then apply it to the
    dynamic text area (I'll try this again), here's a snipit: (OK I
    think i get it the code will attach to the end of this post, so I
    post the second set in a following post)
    These are just some examples though, from my own
    experimentations, and of course onw would define thier own
    variables. I'm no expert, but I hope this gets you going, just a
    few ideas.

Maybe you are looking for

  • Problem writing Imovie to disc using IDVD on my Mac

    Using a Mac OS X Snow Leopard 10.6.8 Intel Core with IMovie 11 and IDVD to create movies.  I created the discs using my Sony DVD Direct VRD MC6 and converted the files to .mp4 using Handbrake. I've created several but had some difficulties - mostly i

  • My 160gb classic Keeps freezing every so often on some songs

    Could any one help me out some times when i hit play on a song(all songs are cd rips that it does it on), the song willeither take a good 30 seconds to one minute to work or my i pod will freeze, have tried restoring but still happens after restorati

  • Oracle RAC on two different configuration systems

    Can we install Oracle RAC (Standard Edition) on severs having different configuration - 1. Server 1 - IBM x3850 - 2 processors occupied, 128 GB RAM, windows server 2008 R2 64 bit 2. Server 2 - IBM 3650 - 2 processors, 64 GB RAM, windows server 2008 R

  • Duplicate File name check

    Hi,         I need to check whether the incoming file is already processed or not. The files are been placed on XI server. If the file with same file name comes then i dont want to process it. I am polling for files on xi server using file adapter. r

  • How do I make Preview the default download and not adobe reader

    Somehow downloads come down as Adobe Reader, not a PDF in Preview.  How do I go back to Preview as the default download reader?