<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Two Custom Containers with HTML in the same dynpro in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411351#M10952</link>
    <description>@Oliver, unfortunately, you can only use cl_abap_browser once in the same session, as it's based on a singleton pattern (unique cl_gui_html_viewer control). So, do as Richard suggested.</description>
    <pubDate>Fri, 28 Apr 2017 20:15:10 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2017-04-28T20:15:10Z</dc:date>
    <item>
      <title>Two Custom Containers with HTML in the same dynpro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411348#M10949</link>
      <description>&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;I have two custom containers in my dynpro. One named CC_YES the other named CC_NO.&lt;/P&gt;&lt;P&gt;I want to display both at the same time with different HTML code.&lt;/P&gt;&lt;P&gt;But, I dont know why, I can show only one at the same time.&lt;/P&gt;&lt;P&gt;If I comment the code of one HTML container the other is displayed and viceversa, but with both at the same time doesnt work.&lt;/P&gt;&lt;P&gt;Do you know what can be the problem? is it necessary to add something in my HTML code? &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/32266-1.jpg" /&gt;&lt;/P&gt;&lt;P&gt;This is a simplified code to see the problem:&lt;/P&gt;&lt;P&gt;REPORT ztest_html.&lt;BR /&gt;&lt;BR /&gt;START-OF-SELECTION.&lt;BR /&gt;&lt;BR /&gt;  DATA:&lt;BR /&gt;  html  TYPE string.&lt;BR /&gt;  DATA:&lt;BR /&gt;  lo_container_yes TYPE REF TO cl_gui_custom_container,&lt;BR /&gt;  lo_container_no TYPE REF TO cl_gui_custom_container.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  CALL SCREEN 2000.&lt;BR /&gt;&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;*&amp;amp;  Module  STATUS_2000  OUTPUT&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;*  text&lt;BR /&gt;*----------------------------------------------------------------------*&lt;BR /&gt;MODULE status_2000 OUTPUT.&lt;BR /&gt;&lt;BR /&gt;  SET PF-STATUS 'STATUS'.&lt;BR /&gt;&lt;BR /&gt;  CHECK lo_container_yes IS INITIAL.&lt;BR /&gt;*&lt;BR /&gt;  html = '&amp;lt;HTML&amp;gt;&amp;lt;body style="background-color:#ff0000;margin-top:0px;overflow:hidden;"&amp;gt;&amp;lt;p&amp;gt;yes&amp;lt;/p&amp;gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;'.&lt;BR /&gt;  CREATE OBJECT lo_container_yes&lt;BR /&gt;  EXPORTING&lt;BR /&gt;  container_name  = 'CC_YES'&lt;BR /&gt;  EXCEPTIONS&lt;BR /&gt;  cntl_error  = 1&lt;BR /&gt;  cntl_system_error  = 2&lt;BR /&gt;  create_error  = 3&lt;BR /&gt;  lifetime_error  = 4&lt;BR /&gt;  lifetime_dynpro_dynpro_link = 5&lt;BR /&gt;  OTHERS  = 6.&lt;BR /&gt;  IF sy-subrc NE 0.&lt;BR /&gt;  RETURN.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;&lt;BR /&gt;  cl_abap_browser=&amp;gt;show_html(&lt;BR /&gt;  html_string  = html&lt;BR /&gt;  context_menu = abap_true&lt;BR /&gt;  modal  = abap_false&lt;BR /&gt;  container  = lo_container_yes&lt;BR /&gt;  check_html  = abap_false ).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; html = '&amp;lt;HTML&amp;gt;&amp;lt;body style="background-color:#ff0000;margin-top:0px;overflow:hidden;"&amp;gt;&amp;lt;p&amp;gt;No&amp;lt;/p&amp;gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;'.&lt;BR /&gt;  CREATE OBJECT lo_container_no&lt;BR /&gt;  EXPORTING&lt;BR /&gt;  container_name  = 'CC_NO'&lt;BR /&gt;  EXCEPTIONS&lt;BR /&gt;  cntl_error  = 1&lt;BR /&gt;  cntl_system_error  = 2&lt;BR /&gt;  create_error  = 3&lt;BR /&gt;  lifetime_error  = 4&lt;BR /&gt;  lifetime_dynpro_dynpro_link = 5&lt;BR /&gt;  OTHERS  = 6.&lt;BR /&gt;  IF sy-subrc NE 0.&lt;BR /&gt;  RETURN.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;&lt;BR /&gt;  cl_abap_browser=&amp;gt;show_html(&lt;BR /&gt;  html_string  = html&lt;BR /&gt;  context_menu = abap_true&lt;BR /&gt;  modal  = abap_false&lt;BR /&gt;  container  = lo_container_no&lt;BR /&gt;  check_html  = abap_false ).&lt;BR /&gt;&lt;BR /&gt;ENDMODULE.&lt;BR /&gt;&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;*&amp;amp;  Module  USER_COMMAND_2000  INPUT&lt;BR /&gt;*&amp;amp;---------------------------------------------------------------------*&lt;BR /&gt;*  text&lt;BR /&gt;*----------------------------------------------------------------------*&lt;BR /&gt;MODULE user_command_2000 INPUT.&lt;BR /&gt;  IF sy-ucomm EQ 'BACK'.&lt;BR /&gt;  LEAVE TO SCREEN 0 .&lt;BR /&gt;  ENDIF.&lt;BR /&gt;ENDMODULE.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 10:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411348#M10949</guid>
      <dc:creator>oliver_am</dc:creator>
      <dc:date>2017-04-28T10:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Two Custom Containers with HTML in the same dynpro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411349#M10950</link>
      <description>&lt;P&gt;How about instantiated 2 cl_gui_html_viewers in each container rather than using static methods.&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 10:29:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411349#M10950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-04-28T10:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Two Custom Containers with HTML in the same dynpro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411350#M10951</link>
      <description>&lt;P&gt;Ok, I've never used these classes... I've just copied some standard demo.&lt;BR /&gt;&lt;BR /&gt;You are right, with cl_gui_html_viewer works fine.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 11:02:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411350#M10951</guid>
      <dc:creator>oliver_am</dc:creator>
      <dc:date>2017-04-28T11:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Two Custom Containers with HTML in the same dynpro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411351#M10952</link>
      <description>@Oliver, unfortunately, you can only use cl_abap_browser once in the same session, as it's based on a singleton pattern (unique cl_gui_html_viewer control). So, do as Richard suggested.</description>
      <pubDate>Fri, 28 Apr 2017 20:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411351#M10952</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-04-28T20:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Two Custom Containers with HTML in the same dynpro</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411352#M10953</link>
      <description>&lt;P&gt;CL_ABAP_BROWSER is a wrapper for cl_gui_html_viewer for simple use cases only. It belongs to the infrastructure of  the ABAP keyword documentation and was originally planned for the needs of that package only. For advanced use cases, you have to use the CFW classes itself.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2017 08:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/two-custom-containers-with-html-in-the-same-dynpro/m-p/411352#M10953</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-04-29T08:45:33Z</dc:date>
    </item>
  </channel>
</rss>

