cancel
Showing results for 
Search instead for 
Did you mean: 

HTML applications in Webdynpro ABAP (HTMLIsland/HTMLContainer)

wouter_peeters
Participant
0 Kudos

Hi experts,

I just tried out the HTMLIsland/HTMLContainer Developer Guideline and did the exercise.

But you cannot point to a html file (mime or url)? You can only define some little HTML parts with <div> tags and some values ( as in the exercise ).

I was expecting a possibility for loading up a html page and include some javascript scripts.

This means I cannot combine a Webdynpro application with a HTML application ( html, javascript and API usage ) and pass along some parameters.

I was thinking about Maps, Charts and other stuff that could've been integrated in webdynpro applications.

Does anyone know if it is possible, or an alternative without abandoning Webdynpro ABAP?

Regards,

Wouter

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Answers (4)

Answers (4)

manuish02
Explorer
0 Kudos

HI Peeters,

Have you tried adding a SCRIPT inside a HTML island UI element? You can provide a MIME object name there. and You can add events to an HTML island which you could use to trigger a method in Webdynpro.

Regards,

Manish

0 Kudos

I had the same problem - but fortunately it turns out that while the HTMLIsland properties won't let you directly enter in more than a few characters, it has no such limitation on the back end.

I ended up uploading the html I wanted into my WDA application as a MIME file.

On the code side, I read in the mime file and convert to a string.

Then:

  DATA z_island TYPE REF TO cl_wd_html_island.

  z_island ?= view->get_element( island_name ).
  z_island->set_static_html( value = z_html_string ).

Former Member
0 Kudos

Hi

I'm also having the same requirement. Do you have any news regarding this or we have to use CL_WD_HTML_WRITER as a last resort?

Thanks much.

wouter_peeters
Participant
0 Kudos

Hi Nguyen,

No more news at the moment ... if you find anything please share.

Thanks

former_member184578
Active Contributor
0 Kudos

Hi,

You could simple use an iFrame UI element and pass the URL to the iFrame or you can upload a html with JS in mime and use it as a source for iFrame UI element.

Regards,

Kiran

wouter_peeters
Participant
0 Kudos

This is somehting else van HTMLIsland/Container, Iframe just opens a URL ... .

I need html/javascript and transfer data to and from Webdynpro ABAP.

Greets,

Wouter

former_member184578
Active Contributor
0 Kudos

Hi,

Your original query made me confused! The communication between Web Dynpro and HTML Element happens via JS calls. Please check this blog and the standard component WDR_TEST_HTML_ELEMENT has Test cases how to use.

Hope this helps u.,

Regards,

Kiran

wouter_peeters
Participant
0 Kudos

I couldn't test the component, but I had to activate it in SICF first ... .

There I found an HTMLWriter example:

But I find it way too much trouble ... I would want to be able to point to a simple html file instead.

If I would have a more complex HTML file I would have to program every element ... seems like too much effort, no?

Example:

     l_html_fragment->set_html( cl_wd_html_writer=>new_writer(

                                 )->start_element( `p`

                                 )->add_text( `Hello `

                                 )->start_element( `b`

                                 )->add_text( `World!`

                                 )->end_element( `b`

                                 )->end_element( `p`

                                 )->get_html( ) ).