<?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: Clear Custom Control Area in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635703#M283463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen this Transaction before. Here in the examples the program is opening an excel document separately. But in my program I have embedded the excel file and want to close or clear the embedded excel file once I am done with my processing or when I am trying to open another excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Sep 2006 10:19:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-25T10:19:51Z</dc:date>
    <item>
      <title>Clear Custom Control Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635699#M283459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using custom-control to embed an excel file in SAP. The problem is that when I m trying to open another excel file the one opened before still exists. I have debugged the program and found that the code is opening the new excel file but it is hidden behind the one opened before that file. I am using interface I_OI_DOCUMENT_PROXY and method 'OPEN_DOCUMENT' to embed the the excel file. I tried 'CLOSE_DOCUMENT', 'CLEAR_DOCUMENT' &amp;amp; 'CLEAR_SELECTION' methods but of no use.&lt;/P&gt;&lt;P&gt;Below is the code I am using to embed an excel file into SAP. Hope this will help to understand the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******&lt;STRONG&gt;Begin of Code&lt;/STRONG&gt;**********************************&lt;/P&gt;&lt;P&gt;  IF NOT firsttime IS INITIAL.&lt;/P&gt;&lt;P&gt;    CLEAR firsttime.&lt;/P&gt;&lt;P&gt;    CLEAR: is_gui_container,&lt;/P&gt;&lt;P&gt;           l_document_url.&lt;/P&gt;&lt;P&gt;    lv_cnt = lv_cnt + 1.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;    CALL METHOD c_oi_ole_control_creator=&amp;gt;get_ole_container_control&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        control = g_control&lt;/P&gt;&lt;P&gt;        retcode = g_retcode.&lt;/P&gt;&lt;P&gt;    CALL METHOD c_oi_errors=&amp;gt;show_message&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CREATE OBJECT g_container&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;         container_name = 'CONT1'&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;         cntl_error                  = 1&lt;/P&gt;&lt;P&gt;         cntl_system_error           = 2&lt;/P&gt;&lt;P&gt;         create_error                = 3&lt;/P&gt;&lt;P&gt;         lifetime_error              = 4&lt;/P&gt;&lt;P&gt;         lifetime_dynpro_dynpro_link = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    is_gui_container-application_name = 'Our test'.&lt;/P&gt;&lt;P&gt;    is_gui_container-container_name   = 'CONT1'.&lt;/P&gt;&lt;P&gt;    is_gui_container-rep_id           = sy-repid .&lt;/P&gt;&lt;P&gt;    is_gui_container-dynpro_nr        = '0100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM pc_has_excel_or_excel2003.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD g_control-&amp;gt;destroy_control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD g_control-&amp;gt;init_control&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        r3_application_name      = is_gui_container-application_name&lt;/P&gt;&lt;P&gt;        inplace_enabled          = 'X'&lt;/P&gt;&lt;P&gt;        inplace_scroll_documents = 'X'&lt;/P&gt;&lt;P&gt;        parent                   = g_container&lt;/P&gt;&lt;P&gt;        register_on_close_event  = ' '&lt;/P&gt;&lt;P&gt;        register_on_custom_event = ' '&lt;/P&gt;&lt;P&gt;        rep_id                   = is_gui_container-rep_id&lt;/P&gt;&lt;P&gt;        dynpro_nr                = is_gui_container-dynpro_nr&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        retcode                  = g_retcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD c_oi_errors=&amp;gt;show_message&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD g_control-&amp;gt;get_table_collection&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        table_collection = g_table_coll&lt;/P&gt;&lt;P&gt;        retcode          = g_retcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD g_control-&amp;gt;get_document_proxy&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        document_type  = soi_doctype_excel97_sheet&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        document_proxy = g_document&lt;/P&gt;&lt;P&gt;        retcode        = g_retcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD c_oi_errors=&amp;gt;show_message&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CONCATENATE 'file://' p_file INTO l_document_url.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD g_document-&amp;gt;clear_selection&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        no_flush = ' '&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        retcode  = g_retcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD g_document-&amp;gt;open_document&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        document_url = l_document_url&lt;/P&gt;&lt;P&gt;        open_inplace = 'X'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        retcode      = g_retcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;******&lt;STRONG&gt;End of Code&lt;/STRONG&gt;*************************************&lt;/P&gt;&lt;P&gt;Let me know if you want more details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 08:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635699#M283459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T08:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Custom Control Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635700#M283460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try to Rrefresh that custom control, I had a similar problem with table control then i used the below method to solve that problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set row &amp;amp; column to be stable after refresh&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR l_s_stable.&lt;/P&gt;&lt;P&gt;    l_s_stable-row = 'X'.&lt;/P&gt;&lt;P&gt;    l_s_stable-col = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD alvgrid-&amp;gt;refresh_table_display&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        is_stable      = l_s_stable&lt;/P&gt;&lt;P&gt;        i_soft_refresh = 'X'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you search you may find out any other similar methods for your requirements..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward with points if usefull..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srinivas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 09:02:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635700#M283460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T09:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Custom Control Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635701#M283461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Goto se38-&amp;gt;Environment-&amp;gt;control Examples there you will get some examples for opening excel file etc.. &lt;/P&gt;&lt;P&gt;there if you find any example which is similar to your requirement debugg that and find out how he has done that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if usefull..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 09:06:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635701#M283461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T09:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Custom Control Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635702#M283462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no '&lt;STRONG&gt;refresh&lt;/STRONG&gt;' method for the instance I am using. I have tried close, clear, release methods but none of them actually fulfilling my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 09:44:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635702#M283462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T09:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Custom Control Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635703#M283463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen this Transaction before. Here in the examples the program is opening an excel document separately. But in my program I have embedded the excel file and want to close or clear the embedded excel file once I am done with my processing or when I am trying to open another excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 10:19:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635703#M283463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T10:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Custom Control Area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635704#M283464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used method 'free' and it worked fine for me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2006 08:23:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear-custom-control-area/m-p/1635704#M283464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-27T08:23:16Z</dc:date>
    </item>
  </channel>
</rss>

