cancel
Showing results for 
Search instead for 
Did you mean: 

html in web dynpro view

Former Member
0 Kudos

Hi experts,

I have upload a html page to my webdynpro as a MIME object.

How to display it in WebDynpro view? use which element?

btw: I try to use Interaction Form, but It doesn't work.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi qiuguo,

try the Iframe with the url of the html page.

Grtz,

Koen

Former Member
0 Kudos

Hi Koen,

I can't find IFrame from my webdynpro element list.

qiuguo

Former Member
0 Kudos

Hi Qiuguo,

in my 7.01 system it can be found under 'integration' next to the interactive form.

Grtz,

Koen

Answers (2)

Answers (2)

ChrisPaine
Active Contributor
0 Kudos

Do you explicitly want to show this HTML inside your WDA application or potentially replace your WDA with this HTML page?

I'm not 100% sure that the code below works perfectly (may have issues with iView resizing in portal and would not be ideal in the portal environment as it doesn't trigger any of the portal navigation APIs ) but it can replace your current WDA window.


 data: lo_mr      type ref to if_mr_api,
        l_html type xstring,
        l_mime_type type string.
  lo_mr = cl_mime_repository_api=>get_api( ).

  lo_mr->get( exporting i_url = '/SAP/BC/WebDynpro/SAP/ZMY_COMPONENT/MyHTML.html'
              importing e_content = l_html
                        e_mime_type = l_mime_type ).

  cl_wd_runtime_services=>attach_file_to_response(
        exporting
          i_filename      = 'MyHTML.html'
          i_content       = l_html
          i_mime_type     = l_mime_type
          i_in_new_window = abap_false
          i_inplace       = abap_true ).

Former Member
0 Kudos

Hi,

To show HTML content in webdynpro use IFrame which is in integration.

In it's property there is an attribute 'source' specify your html page name ( eg. abc.html) that you have uploaded to MIME.

If you want to load html dynamically bind a context variable and set it's value with the name of the html file which is in MIME.

I have tried this and it works. But it works only with HTML content javascript doesn't work.

Former Member
0 Kudos

Hi DashAbhilash,

I can find IMAGE, INPUT_FIELD,INTERACTIVE_FORM,INT_MSG_AREA_LNK,INVISIBLE_ELEMENT,ITEM_LIST_BOX In my system. But there is no IFrame element. My system version is 7.01.

Thanks.

Former Member
0 Kudos

you should use the graphical editor (on the left in the preview pane) since in 7.01 it's depricated (but this will change in 7.02)

there in the integration area, you'll find it.

Grtz,

Koen