<?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 CL_DD_DOCUMENT Refresh Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647000#M27723</link>
    <description>&lt;P&gt;I am using CL_DD_DOCUMENT header to display text.&lt;/P&gt;
  &lt;P&gt;if user select operation 10, I want to display operation 10 in the display text. &lt;/P&gt;
  &lt;P&gt;if user select operation 20, I want to display operation 20 in the display text. &lt;/P&gt;
  &lt;P&gt;But its not getting refresh!! its only displaying first variable only. &lt;/P&gt;
  &lt;P&gt;I am passing parameters as desired,&lt;/P&gt;
  &lt;P&gt;ALL METHOD o_dyndoc_id-&amp;gt;display_document&lt;BR /&gt; EXPORTING&lt;BR /&gt; reuse_control = 'X'&lt;BR /&gt;container = 'o_cont_topt&lt;BR /&gt; EXCEPTIONS&lt;/P&gt;
  &lt;P&gt;html_display_error = 1. &lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Sas&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2018 05:56:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-02-01T05:56:37Z</dc:date>
    <item>
      <title>CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647000#M27723</link>
      <description>&lt;P&gt;I am using CL_DD_DOCUMENT header to display text.&lt;/P&gt;
  &lt;P&gt;if user select operation 10, I want to display operation 10 in the display text. &lt;/P&gt;
  &lt;P&gt;if user select operation 20, I want to display operation 20 in the display text. &lt;/P&gt;
  &lt;P&gt;But its not getting refresh!! its only displaying first variable only. &lt;/P&gt;
  &lt;P&gt;I am passing parameters as desired,&lt;/P&gt;
  &lt;P&gt;ALL METHOD o_dyndoc_id-&amp;gt;display_document&lt;BR /&gt; EXPORTING&lt;BR /&gt; reuse_control = 'X'&lt;BR /&gt;container = 'o_cont_topt&lt;BR /&gt; EXCEPTIONS&lt;/P&gt;
  &lt;P&gt;html_display_error = 1. &lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Sas&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 05:56:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647000#M27723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-01T05:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647001#M27724</link>
      <description>&lt;P&gt;There are 2 solutions:&lt;/P&gt;
  &lt;P&gt;1st proposition: REUSE_CONTROL = 'X' is the right way to do it, but also make sure you don't re-create O_DYNDOC_ID (if two active controls occupy the same container, only the first one is displayed). Do a debug on method DISPLAY_DOCUMENT to make sure the control is not created every time.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;2nd proposition: Or use the method FREE of the container every time you leave/reload the screen (it will free the HTML control), but it may be more complex to do.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 08:39:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647001#M27724</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2018-02-01T08:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647002#M27725</link>
      <description>&lt;P&gt;Thanks Alot Rossi, So here I am not using any HTML I am using the header text to display the data, I want to data text to be changed when ever I called this piece, but its not refreshing, here is the sample code, let me know how to refresh the container. and also I dont have anything in the containter text, ( there are 4 containers, 2 for header text and 2 for alvs), the second one header text I want to change based on the first alv input action. &lt;/P&gt;
  &lt;P&gt;DATA:go_dd_otxt2 TYPE REF TO cl_dd_document,&lt;/P&gt;
  &lt;P&gt;CREATE OBJECT go_dd_otxt2.&lt;/P&gt;
  &lt;P&gt;LV_TEXT = 'Components'.&lt;/P&gt;
  &lt;P&gt;go_dd_otxt2-&amp;gt;add_text_as_heading(&lt;BR /&gt; EXPORTING&lt;BR /&gt; heading_level = 2&lt;BR /&gt; text = lv_text ).&lt;BR /&gt; &lt;BR /&gt;CALL METHOD go_dd_otxt2-&amp;gt;display_document&lt;BR /&gt; EXPORTING&lt;BR /&gt; reuse_control = 'X'&lt;BR /&gt; reuse_registration = 'X'&lt;BR /&gt; container = 'C_OTXT2'&lt;BR /&gt; * parent =&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; html_display_error = 1&lt;BR /&gt; others = 2&lt;BR /&gt; .&lt;BR /&gt; IF sy-subrc &amp;lt;&amp;gt; 0.&lt;BR /&gt;ENDIF.&lt;BR /&gt;Let me know if anything else to be done, in code i am passing lv_text some runtime value, but its only displaying the existing one(i.e. first one). &lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 17:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647002#M27725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-01T17:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647003#M27726</link>
      <description>&lt;P&gt;Sorry, I wasn't clear. The Dynamic Documents are a wrapper of the HTML Viewer.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;See this standalone example which refreshes the HTML Viewer with the current time, at each "Enter" ... it creates DD only once (my 1st proposition) :&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;REPORT.
DATA: go_docking TYPE REF TO cl_gui_docking_container,
      dd TYPE REF TO cl_dd_document.
PARAMETERS dummy.
AT SELECTION-SCREEN OUTPUT.
  IF go_docking IS INITIAL.
    CREATE OBJECT go_docking
      EXPORTING
        repid     = sy-repid
        dynnr     = sy-dynnr
        side      = cl_gui_docking_container=&amp;gt;dock_at_left
        extension = 180.
    CREATE OBJECT dd.
  ENDIF.
  dd-&amp;gt;initialize_document( ).
  dd-&amp;gt;add_text( text = |{ sy-uzeit }| ).
  dd-&amp;gt;display_document( parent = go_docking reuse_control = abap_true ).&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 19:36:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647003#M27726</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2018-02-01T19:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647004#M27727</link>
      <description>&lt;P&gt;Thanks alot Sandra Rossy, I gone through your code, its a great example ....but I just like to add on my req pls, &lt;/P&gt;
  &lt;P&gt;I have a plain custom container in screen painter, I named it as C_OTXT2.&lt;/P&gt;
  &lt;P&gt;I am expecting this text to be dynamic. there is a alv with fields, I have hotspot assigned to one of the field, when I click the alv, this text need to be displayed accordingly below ALV. &lt;/P&gt;
  &lt;P&gt;But as I said the text is not changing dynamically. &lt;/P&gt;
  &lt;P&gt;DATA:go_dd_otxt2 TYPE REF TO cl_dd_document,&lt;/P&gt;
  &lt;P&gt;CREATE OBJECT go_dd_otxt2.&lt;/P&gt;
  &lt;P&gt;LV_TEXT = 'Components'.&lt;/P&gt;
  &lt;P&gt;go_dd_otxt2-&amp;gt;add_text_as_heading(&lt;BR /&gt;EXPORTING&lt;BR /&gt;heading_level = 2&lt;BR /&gt;text = lv_text ).&lt;BR /&gt;&lt;BR /&gt;CALL METHOD go_dd_otxt2-&amp;gt;display_document&lt;BR /&gt;EXPORTING&lt;BR /&gt;reuse_control = 'X'&lt;BR /&gt;reuse_registration = 'X'&lt;BR /&gt;container = 'C_OTXT2'&lt;BR /&gt;* parent =&lt;BR /&gt;EXCEPTIONS&lt;BR /&gt;html_display_error = 1&lt;BR /&gt;others = 2&lt;BR /&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 14:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647004#M27727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-02T14:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647005#M27728</link>
      <description>&lt;P&gt;Did I tell you that you should not create the DD control again if you did not free the previous one, because if two active controls occupy the same container, only the previous one is displayed.&lt;/P&gt;
  &lt;P&gt;Can't you spend a little time to see why my very small but complete code works, and not yours.&lt;/P&gt;
  &lt;P&gt;Maybe it will help you if I give you the code which DOES NOT work. My opinion is that yours has the same issue:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;REPORT.
DATA: go_docking TYPE REF TO cl_gui_docking_container,
      dd TYPE REF TO cl_dd_document.
PARAMETERS dummy.
AT SELECTION-SCREEN OUTPUT.
  IF go_docking IS INITIAL.
    CREATE OBJECT go_docking
      EXPORTING
        repid     = sy-repid
        dynnr     = sy-dynnr
        side      = cl_gui_docking_container=&amp;gt;dock_at_left
        extension = 180.
  ENDIF.
  CREATE OBJECT dd. " &amp;lt;=== See, I create the DD control every time,
                    "      but I didn't FREE the previous one, so it doesn't SEEM to refresh
  dd-&amp;gt;initialize_document( ).
  dd-&amp;gt;add_text( text = |{ sy-uzeit }| ).
  dd-&amp;gt;display_document( parent = go_docking reuse_control = abap_true ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Feb 2018 14:52:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647005#M27728</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2018-02-02T14:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647006#M27729</link>
      <description>&lt;P&gt;And this code works by freeing the previous DD control (my 2nd proposition):&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;REPORT.
DATA: go_docking TYPE REF TO cl_gui_docking_container,
      dd TYPE REF TO cl_dd_document.
PARAMETERS dummy.
AT SELECTION-SCREEN OUTPUT.
  IF dd IS BOUND.
    go_docking-&amp;gt;free( ). " Free the container and its inner controls (DD)
    CLEAR go_docking.    " clear it, so that it's created again in next step
  ENDIF.
  IF go_docking IS INITIAL.
    CREATE OBJECT go_docking
      EXPORTING
        repid     = sy-repid
        dynnr     = sy-dynnr
        side      = cl_gui_docking_container=&amp;gt;dock_at_left
        extension = 180.
  ENDIF.
  CREATE OBJECT dd.
  dd-&amp;gt;initialize_document( ).
  dd-&amp;gt;add_text( text = |{ sy-uzeit }| ).
  dd-&amp;gt;display_document( parent = go_docking reuse_control = abap_true ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Feb 2018 14:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647006#M27729</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2018-02-02T14:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647007#M27730</link>
      <description>&lt;P&gt;Thanks alot for spending your valuable time in explaining, but &lt;/P&gt;
  &lt;P&gt;I see your code if perfectly working,but I am wondering is that because you are using the docking container and referring the display_document to parent = docking not referring to container = 'Container name' ?&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;IF dd IS BOUND.
    go_docking-&amp;gt;free( ). " Free the container and its inner controls (DD)
    CLEAR go_docking.    " clear it, so that it's created again in next step
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I am not going to free docking as I dont have , but is there away to free the container DD? &lt;/P&gt;
  &lt;P&gt;you are using the program, I am using the dynpro is that making the difference? again thanks alot. &lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Sas&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 17:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647007#M27730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-02T17:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647008#M27731</link>
      <description>&lt;P&gt;So here is the sample code, where you can probably copy for one time and see why its not working, thanks.&lt;/P&gt;
  &lt;P&gt;1) In program.&lt;/P&gt;
  &lt;P&gt;REPORT YTEST_SANDBOX.&lt;BR /&gt;START-OF-SELECTION.&lt;BR /&gt;call screen 100.&lt;BR /&gt;INCLUDE ytest_sandbxo_user_command_i01.&lt;/P&gt;
  &lt;P&gt;2) In Screen painter ( I.E. in call 100):&lt;/P&gt;
  &lt;P&gt;Take a container and a button, Name the container as 'ABCD' and button as 'NRCT'.&lt;/P&gt;
  &lt;P&gt;3) in PAI, &lt;/P&gt;
  &lt;P&gt;please copy below code. &lt;/P&gt;
  &lt;P&gt;MODULE user_command_0100 INPUT.&lt;BR /&gt; case sy-ucomm.&lt;BR /&gt; when 'NRCT'.&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt; DATA:go_dd_otxt2 TYPE REF TO cl_dd_document.&lt;BR /&gt;FREE GO_DD_OTXT2.&lt;BR /&gt; CREATE OBJECT go_dd_otxt2.&lt;BR /&gt;go_dd_otxt2-&amp;gt;add_text( text = |{ sy-uzeit }| ).&lt;BR /&gt;CALL METHOD go_dd_otxt2-&amp;gt;display_document&lt;BR /&gt; EXPORTING&lt;BR /&gt; reuse_control = 'X'&lt;BR /&gt; reuse_registration = 'X'&lt;BR /&gt; container = 'ABCD'&lt;BR /&gt; * parent =&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; html_display_error = 1&lt;BR /&gt; others = 2 .&lt;BR /&gt; ENDCASE.&lt;/P&gt;
  &lt;P&gt;ENDMODULE.&lt;/P&gt;
  &lt;P&gt;Even though I am pressing button many times, still I see the text as is, its static only, let me know if there is any way to become dynamic, if we get changes done. &lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Sas&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 17:29:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647008#M27731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-02T17:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647009#M27732</link>
      <description>&lt;P&gt;Well, dont treat me nasty &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; !! I figured out!! Thanksssssss alottttttttttttttttt!! create object only one time is the trick.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;MODULE user_command_0100 INPUT.

  CASE sy-ucomm.

    WHEN 'NRCT'.
     DATA:go_dd_otxt2 TYPE REF TO cl_dd_document.

      IF go_dd_otxt2 IS BOUND.

        go_dd_otxt2-&amp;gt;initialize_document( ).

      ENDIF.

      IF go_dd_otxt2 IS NOT BOUND.

      CREATE OBJECT go_dd_otxt2.

      ENDIF.

      go_dd_otxt2-&amp;gt;add_text( text = |{ sy-uzeit }| ).

      CALL METHOD go_dd_otxt2-&amp;gt;display_document

        EXPORTING

          reuse_control      = 'X'

*          reuse_registration = 'X'

          container          = 'ABCD'

*         parent             =

        EXCEPTIONS

          html_display_error = 1

          OTHERS             = 2.

  ENDCASE.

ENDMODULE.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Feb 2018 17:41:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647009#M27732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-02T17:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647010#M27733</link>
      <description>&lt;P&gt;Well done! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 18:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647010#M27733</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2018-02-02T18:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647011#M27734</link>
      <description>&lt;P&gt;Thanks, and initializing document is also must &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; !! along with reuse_control = 'X'!!&lt;/P&gt;
  &lt;P&gt;~ to those who see this thread in future &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; !!&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Sas&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 18:24:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647011#M27734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-02T18:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647012#M27735</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
  &lt;P&gt;i have got same problem, for my problem i have solved differently&lt;/P&gt;
  &lt;P&gt;that is &lt;/P&gt;
  &lt;P&gt;1. clear object of container of document display.&lt;/P&gt;
  &lt;P&gt;2. create document for every time for refresh&lt;/P&gt;
  &lt;P&gt;3. again create container object.&lt;/P&gt;
  &lt;P&gt;4. use that created container object for document display&lt;/P&gt;
  &lt;P&gt;like that i have solved my problem&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2018 07:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/647012#M27735</guid>
      <dc:creator>former_member241258</dc:creator>
      <dc:date>2018-02-03T07:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: CL_DD_DOCUMENT Refresh Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/14105338#M2041856</link>
      <description>&lt;P&gt;This issue can be fixed in 2 steps:&lt;/P&gt;&lt;P&gt;1. You have to make sure that the object reference declared must be global. This is to ensure when you try to clear/refresh the object reference before next use, it is available to do so. If you keep the object reference as local,&amp;nbsp;&lt;SPAN&gt;the program had no way of accessing previous container and you won't be able to clear it before next use.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;data: go_document type ref to cl_dd_document. (global field, preferably in TOP include)&lt;/P&gt;&lt;P&gt;IF go_document IS BOUND.&lt;BR /&gt;&amp;nbsp; go_document-&amp;gt;initialize_document( ).&lt;BR /&gt;ELSE.&lt;BR /&gt;&amp;nbsp; CREATE OBJECT go_document.&lt;BR /&gt;ENDIF.&lt;/P&gt;&lt;P&gt;2. Once you have added the text, make sure to use reuse_control parameter as 'X' in the display document method (as shown below)&lt;/P&gt;&lt;P&gt;go_document-&amp;gt;display_document(&lt;BR /&gt;&amp;nbsp; EXPORTING&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;reuse_control = 'X'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;container = 'CONTAINER_NAME' " Name of Container (New Container Object Generated)&lt;BR /&gt;&amp;nbsp; EXCEPTIONS&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;html_display_error = 1&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;OTHERS = 2&lt;BR /&gt;).&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 11:08:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-dd-document-refresh-issue/m-p/14105338#M2041856</guid>
      <dc:creator>anurag_mundra</dc:creator>
      <dc:date>2025-05-19T11:08:07Z</dc:date>
    </item>
  </channel>
</rss>

