HTML Encoding in BSP

Hello,
i have a <htmlb:inputField>. The field input is used for generating a url. Now i need a html-encoding for this input.
If input-fields contains for example value "Teststraße" it should be encoded into "Teststra%C3%9Fe".
Is there any function module for this encoding?
Regards
Marco

Hi Meerbaum
   If you want the url encoded, may be this will help you.
  CALL METHOD cl_bsp_runtime=>construct_bsp_url
    EXPORTING
      in_application      = 'GBSPUTILS'
      in_page             = 'inputhelp.do'
      in_parameters       = lt_params[]
    IMPORTING
      out_local_url       = lv_iframe_url
   The lt_params[] table contains the NAME and VALUE fields,
the value will be encoded directly.

Similar Messages

  • How to take data from HTML Template into BSP Variable?

    hi all,
                can we take the data from the input field of HTML Template and collect into BSP variable? i have the shown the HTML Template into BSP page by passing the url in <IFRAME> tag now i have to take the data form the into field of HTML Template and save it back to the BSP table onclicking the Save button of BSP Page. please help me out thanks in advance.
    Thanks & Regards,
    Amol

    Hi Amol,
    This is very simple....
    In the onInputProcessing event of the page use the following code to read data from the InputField into an ABAP variable...
    Then you can use it at will..!
    Code is :
    data : event       TYPE REF TO if_htmlb_data,
           but_event   TYPE REF TO cl_htmlb_event_button.
    event = cl_htmlb_manager=>get_event( request ).
    IF event->EVENT_NAME = 'button' and event->EVENT_TYPE = 'click'.
          but_event ?= event.
          CASE event->EVENT_ID.
            when 'your_button_id'.
              data : lw_inf type ref to cl_htmlb_inputfield.
                 lw_inf ?= cl_htmlb_manager=>get_data(
                                request = runtime->server->request
                                name    = 'inputField'
                                id      = 'your_inputField_id'  ).
              if lw_inf->value is not initial.
                lw_variable = lw_inf->value.
              endif.
         ENDCASE.
    ENDIF.

  • HTML Encoding of output with special language characters ie. Umlaut

    Greetings,
    Application: Crystal Reports XI RDC Runtime engine.
    Output format with error: HTML
    Sample Data row passed as a recordset to crystal by MS SQL Server.
    lahenduse tähtaja testimine;;High;Top;C;1;01/01/2010;05/04/2010;05/04/2010
    HTML encoding:
    lahenduse t?¤htaja testimine
    When the output of PDF or Excel are selected charaters with umlauts, tilds, etcu2026 over the letters are displaying correctly.
    When the output is HTML the encoding is messed up.
    Has there been a fix for this runtime engine regarding this issue?
    Regards,
    Douglas Davidson
    Edited by: DouglasD on May 4, 2010 5:38 PM

    Ludek,
    The following link http://resources.businessobjects.com/support/communityCS/FilesAndUpdates/crXI_rdc_merge_modules.zip would be the correct update pack link I am looking for.
    http://resources.businessobjects.com/support/additional_downloads/runtime.asp
    As it is the runtime engine, not the crystal developer that is having the problem.
    For completeness I have upgraded my developer CR XI Release 1 to SP4.
    http://resources.businessobjects.com/support/additional_downloads/service_packs/crystal_reports_en.asp#CRXIR1
    I will post again later today, once all the upgrading has been completed.
    Doug

  • XML parser fails to convert html encoded text nodes

    Under the strain of large documents this defect rears its ugly head more often. While parsing a text node containing html encoded chars i.e. < > &; etc...
    The parser will seemingly forget to change the chars at random, 99.9% of the time everything is ok and the proper conversions take place:
    < -> &#60;
    > -> >
    &; -> &#38;
    Once an error occurs it is reproducible until the text node is changed ( values and/or order ) then it is a crapshoot again.
    These tests were done using the default UTF-8 encoding, here is the exception thrown by the parser along with a portion of the text node before and after the first parsing.
    Let me be clear, the parser actually succeeds the first time but the transformation of the HTML encoded pieces possibly fails. It is on the parsing of the text node value as its own document that the parser fails.
    Error 0 : Error parsing XML string! Line :: 1, Column :: 65674
    Error 1 : End tag does not match start tag 'Project'.
    End tag does not match start tag 'Project'.
    at oracle/xml/parser/v2/XMLError.flushErrors (XMLError.java:233)
    at oracle/xml/parser/v2/NonValidatingParser.parseDocument (NonValidatingParser.java:248)
    at oracle/xml/parser/v2/XMLParser.parse (XMLParser.java:117)
    at pacificedge/xml/XMLUtilities.loadParserFromString (XMLUtilities.java:104)
    Preprocessing ::
    <Project stuff0="0" stuff1="0" stuff2="0" stuff3="1" stuff4="100167" stuff5="100213">
    <StuffA>100213</StuffA>
    <Name>I am a Name</Name>
    <StartDate>1998-08-10</StartDate>
    <FinishDate>2000-06-30</FinishDate>
    <Path>Folder1\Folder2</Path>
    </Project>
    Post processing:
    <Project stuff0="0" stuff1="0" stuff2="0" stuff3="1" stuff4="100167" stuff5="100213">
    <StuffA>100213</StuffA>
    <Name>I am a Name</Name>
    <StartDate>1998-08-10</StartDate> <-- Error is raised here when the value of the text node is used as an xml document
    <FinishDate>2000-06-30</FinishDate>
    <Path>Folder1\Folder2</Path>
    </Project>
    Please investigate this. It is a chronic problem for us and possibly many others.
    null

    Sorry for the encoding issues in the message before here are the pertinent pieces hope this shows up correctly.
    &;lt; -> &;#60;
    &;gt; -> >
    &;amp; -> &;#38;
    Preprocessing ::
    &;lt;Project stuff0="0" stuff1="0" stuff2="0" stuff3="1" stuff4="100167" stuff5="100213"&;gt;
    &;lt;StuffA&;gt;100213&;lt;/StuffA&;gt;
    &;lt;Name&;gt;I am a Name&;lt;/Name&;gt;
    &;lt;StartDate&;gt;1998-08-10&;lt;/StartDate&;gt;
    &;lt;FinishDate&;gt;2000-06-30&;lt;/FinishDate&;gt;
    &;lt;Path&;gt;Folder1\Folder2&;lt;/Path&;gt;
    &;lt;/Project&;gt;
    Post processing:
    <Project stuff0="0" stuff1="0" stuff2="0" stuff3="1" stuff4="100167" stuff5="100213">
    <StuffA>100213</StuffA>
    <Name>I am a Name</Name>
    &;lt;StartDate>1998-08-10</StartDate> <-- Error is raised here when the value of the text node is used as an xml document
    <FinishDate>2000-06-30</FinishDate>
    <Path>Folder1\Folder2</Path>
    </Project>
    null

  • HTML Encoding issue

    I'm calling a web sevice that needs to pass an HTML encoded string. So, I encoded the string using cl_http_utility=>escape_html and it looks OK in the debugger (i.e. "&lt;"). However, the web service throws an error and when I look at the ICM logs I see "&amp;lt;" instead of "&lt;".  The web service does not like the "&amp;". If I reformat the string and put it into SOAP UI, it works fine.  Is there a profile parameter I can set to prevent this from happening?
    Thank you,
    Edited by: Tony Raimo on Mar 1, 2011 10:49 PM

    the fix was to not call cl_http_utility=>escape_html  in the first place.  the ICM automatically escapes the string.

  • Extended lookup field results in HTML encoded string in list view

    Hello again,
    I have built an extended lookup field to provide picker support. For this I have custom field type and custom field control. Field type looks like this:
    <FieldType>
    <Field Name="TypeName">LookupWithPicker</Field>
    <Field Name="ParentType">Lookup</Field>
    <Field Name="TypeDisplayName">$Resources:FieldDescriptions, LookupWithPickerDisplayName</Field>
    <Field Name="TypeShortDescription">$Resources:FieldDescriptions, LookupWithPickerTypeShortDescription</Field>
    <Field Name="UserCreatable">TRUE</Field>
    <Field Name="FieldTypeClass">Sharepoint.Fields.Types.LookupWithPicker, $SharePoint.Project.AssemblyFullName$</Field>
    <PropertySchema>
    <Fields>
    <Field Name="LookupList" Type="Text" DisplayName="Lookup List Id" MaxLength="36" DisplaySize="36" Hidden="TRUE" />
    <Field Name="LookupField" Type="Text" DisplayName="Lookup Field Name" MaxLength="36" DisplaySize="36" Hidden="TRUE" />
    <Field Name="LookupContentType" Type="Text" DisplayName="Lookup Content Type Id" MaxLength="255" DisplaySize="255" Hidden="TRUE" />
    </Fields>
    </PropertySchema>
    </FieldType>
    public class LookupWithPicker : SPFieldLookup
    #region Constructors
    public LookupWithPicker(SPFieldCollection fields, string fieldName)
    : base(fields, fieldName)
    public LookupWithPicker(SPFieldCollection fields, string typeName, string displayName)
    : base(fields, typeName, displayName)
    #endregion
    #region Public properties
    public override BaseFieldControl FieldRenderingControl
    get
    LookupWithPickerFieldControl ctrl = new LookupWithPickerFieldControl(this);
    ctrl.FieldName = InternalName;
    return ctrl;
    #endregion
    At this point everything works as expected except for the list view part:
    I wonder why it's HTML encoded? Do I need to provide custom XSL too? I find it a bit confusing when display form renders this field properly without any customization required.

    Hi, 
    Can you try to put the following code under the </PropertySchema>:
    <RenderPattern Name="DisplayPattern">
    <Column HTMLEncode="FALSE" />
    </RenderPattern>
    Please remember to indicate if your question/comment has been answered or is helpful.

  • HTML encoding of XML tags

    Hi ,
    I am using openSAML and passing an XML document as a string to the SAMLAttribute.
    But when i see in the logs, the XML tags like "<" , ">" are being displayed as &lt and &gt. I don't want this HTML encoding to happen ... I don't know why this is happening ?
    Please advise. Yours help is greatly appreciated.
    Thanks in advance.

    I'm not sure but I think you need to have double quotes.
    ""<"" "">""
    sandyR

  • HTML Encode/Decode FLEX

    Is anyone familiar with classes that support html
    encoding/decoding in AS3 or Flex?
    Similar to:
    http://meyerweb.com/eric/tools/dencoder/
    what is being done here?

    Most folks float an Iframe over a spot in the SWF.

  • HTML encoding for security reasons

    For some reason classic html encoding method of java does not encode character '
    As far as I know this maybe a security problem, that makes application vulnerable to XSS. Is there a reason why character ' is not encoded?
    Thanks,
    Yevgeny

    Maybe it a automatic respond for new setup (ads, in case you're not informed about iCloud).
    Anyway, I don't really know.

  • How to embed html page in bsp view

    Dear all,
    I would like to embed a html page (eg: www.google.com)  inside bsp view. I have used iframe to do this; but the iframe is getting refreshed everytime a button is getting clicked. Delta handling flag is also not working for iframe. Is there any other method to embed html in bsp view.
    Thanks and Regards,
    Manasi

    Hi Shreya,
    See if this <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/_s-u/SDN%20Behind%20The%20Scenes%20-%20Embedding%20an%20EP%205.0%20iView%20in%20an%20HTML%20Web%20Page">link</a> helps.
                            OR
    You can create a JSP dynpage in portal application object.
    Along with this JSP and dynpage is created automatically. You can copy the html page and paste it in JSP page. To make it display, include a statement in JSP dynpage as
    this.setJspName("JSPname.jsp");
    For more info on this u can refer:
    http://help.sap.com/saphelp_nw04s/helpdata/en/95/cfa441cd47a209e10000000a155106/frameset.htm
    To get an idea of content development you can refer this <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2845">weblog</a>.
    Regards,
    Pooja.
    Message was edited by: Pooja S

  • Extracting HTML data in BSP from Browser

    Hello,
            I am displaying an Adobe Interactive form as HTML using an IFRAME in BSP, I know there is another way of using Adobe Interactive form in BSP, but it would occupy the entire BSP page and would overwrite any other BSP elements and they will not be displayed. Since the requirement is to enhance the existing BSP page and display buttons like SAVE, SUBMIT on the top of the BSP page and have the Interactive Adobe form occupy the rest of page as HTML display in IFRAME. I do understand that such functionality can easily achieved using web dynpro ABAP or JAVA, but I have very limited options, I used the below code to render the Interactive Adobe form :-
    DATA: cached_response TYPE REF TO if_http_response.
        CREATE OBJECT cached_response
          TYPE
            cl_http_response
          EXPORTING
            add_c_msg        = 1.
        cached_response->set_data( file_content ).
        cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                           value = file_mime_type ).
        cached_response->set_status( code = 200 reason = 'OK' ).
        cached_response->server_cache_expire_rel( expires_rel = 180 ).
        DATA: guid TYPE guid_32.
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid INTO display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
    Once displayed as HTML using the IFRAME in BSP, is there a way I can capture the data entered Interactive Adobe Form in BSP? I can still extract data even if it were in XML format or XSTRING. Please let me know if there is way to extract the data.
    Regards,
    Shishir.P

    Hi,
    Have you gone through this link
    [check this|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0e58022-2a39-2a10-69a8-c1a892e2b3f4?quicklink=index&overridelayout=true]
    Cheers,
    bhavana

  • HTML encoding with JTextPane

    hello,
    I'm using JTexPane to edit rich text in my application.
    I set the editorkit with
    pane.setEditorKit(new HTMLEditorKit());
    and I create a new document for editing with
    pane.setDocument(pane.getEditorKit().createDefaultDocument());
    but when I enter text in the pane with accent like "j'ai mang� une pomme" , the method pane.getText() return my html document encoded with ISO-10646 aka Unicode where the "�" is &#233;
    I try to create the editorKit for the ContentType "text/html; charset=UTF-8" but it doesn't work.
    How can I change the encoding to UTF-8 ?
    Please help me ...

    hello,
    I know your problem (i'm french), but i don't know how to resolve it easily.
    you can get the HTML code by using
    pane.getText();and change manually characters...

  • HTML encoder

    Re-HI !
    Is there a function which encode strings with special
    HTML characters ? ( �, � ... )
    Thanks a lot.

    Thanks ..
    But i don't want to encode an URL but
    an HTML string ...
    I have for example :
    <a i want & ... ;a
    Thanks.

  • Access HTML Output of BSP Pages

    Hi BSP Experts
    We want to pass the (already rendered) HTML ouput from a BSP Page to a file because we want to use an external programm to make pdf files. (html to pdf creator)
    What is the best way to achieve this? I was playing around with the classes CL_BSP_PAGE_CONTEXT and CL_BSP_WRITER_HTTP but I did not have success.
    Any Ideas?
    Thanks a lot
    Rgds
    Timo
    Edited by: Timo Höllwarth on Nov 9, 2009 6:45 PM

    are you trying to get the html of the same page?
    if yes
    in onmanipulation event you can capture the final HTML using
    DATA: httpbody TYPE string .
    CALL METHOD response->if_http_entity~get_cdata
      RECEIVING
        data = httpbody.
    or from some other page?
    if yes
    either using AJAX call or using cl_http_client class
    Regards
    Raja

  • How to handle the Non HTML Documents in BSP

    Hi All,
    I want to upload the file which contains the  non HTML data.
    I am using the browse button and from the destop i should downloap a file which is non HTML document.
    It would be appriciatable if you send me the code.
    Iam using the html:fileupload tag
    Thanks,
    Mahalakshmi.K

    Hi Rajdeep,
    You can use the below tag which is used to change both the font and color of the text.
    <font face="Book Antiqua,Garamond" size="3" color="red"> YOUR TEXT HERE </font>
    This will work for the normal text which is given between the <font> </font> tags. but not directly with the Text View tag.
    You can choose this as an alternative.
    Thanks,
    Ansar
    Edited by: Ansar Hussain on Dec 3, 2008 9:25 PM

Maybe you are looking for