<?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: activate window controls for 'BAL_CNTL_CREATE' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/activate-window-controls-for-bal-cntl-create/m-p/7323298#M1537144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;added this code to my method above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SET HANDLER on_dialogbox_close FOR g_container.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and created a new method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
METHOD on_dialogbox_close.

  CALL METHOD sender-&amp;gt;free
    EXCEPTIONS
      cntl_error        = 1
      cntl_system_error = 2
      OTHERS            = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.

  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all working for me! &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Oct 2010 14:31:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-08T14:31:03Z</dc:date>
    <item>
      <title>activate window controls for 'BAL_CNTL_CREATE'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/activate-window-controls-for-bal-cntl-create/m-p/7323297#M1537143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have coded a solution to do my own logging/display logs from a custom report within transaction MPD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the logging part works and my 'on button click' calls the logs and displays the messages using BAL_CNTL_CREATE.&lt;/P&gt;&lt;P&gt;however the pop up window i get, i do not get the to use the "window" control to close the popup...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am sure i have missed off a parameter, but not having done this before, i am unsure which parameter controls the pop up window.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i exit out of the transaction the window closes, however i want to be able to close the window and click another button to display my log....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*       create dialogbox container
  CREATE OBJECT g_container
    EXPORTING
      width  = 650
      height = 100
      top    = 150
      left   = 500
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

*       create a new log header
  CLEAR g_s_log.
  g_s_log-extnumber = 'CONSISTENCY LOG'.
  CALL FUNCTION 'BAL_LOG_CREATE'
    EXPORTING
      i_s_log      = g_s_log
    IMPORTING
      e_log_handle = g_log_handle
    EXCEPTIONS
      OTHERS       = 1.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

*       add some messages
  LOOP AT output_message INTO ls_message.
    CLEAR g_s_msg.
    g_s_msg-msgty = ls_message-msgty.
    g_s_msg-msgid = ls_message-msgid.
    g_s_msg-msgno = ls_message-msgno.
    CALL FUNCTION 'BAL_LOG_MSG_ADD'
      EXPORTING
        i_log_handle = g_log_handle
        i_s_msg      = g_s_msg
      EXCEPTIONS
        OTHERS       = 1.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
  ENDLOOP.

*       get a display profile which describes how to display messages
  CALL FUNCTION 'BAL_DSP_PROFILE_NO_TREE_GET'
    IMPORTING
      e_s_display_profile = g_s_display_profile.

  g_s_display_profile-title     = 'Display Logs'.
  g_s_display_profile-pop_adjst = 'X'.

*       define amount of data to be displayed
  INSERT g_log_handle INTO TABLE g_t_log_handle.

*       create control to display data
  CALL FUNCTION 'BAL_CNTL_CREATE'
    EXPORTING
      i_container         = g_container
      i_s_display_profile = g_s_display_profile
      i_t_log_handle      = g_t_log_handle
    IMPORTING
      e_control_handle    = g_control_handle
    EXCEPTIONS
      OTHERS              = 1.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Oct 2010 13:07:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/activate-window-controls-for-bal-cntl-create/m-p/7323297#M1537143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-07T13:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: activate window controls for 'BAL_CNTL_CREATE'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/activate-window-controls-for-bal-cntl-create/m-p/7323298#M1537144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;added this code to my method above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SET HANDLER on_dialogbox_close FOR g_container.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and created a new method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
METHOD on_dialogbox_close.

  CALL METHOD sender-&amp;gt;free
    EXCEPTIONS
      cntl_error        = 1
      cntl_system_error = 2
      OTHERS            = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.

  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all working for me! &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Oct 2010 14:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/activate-window-controls-for-bal-cntl-create/m-p/7323298#M1537144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-08T14:31:03Z</dc:date>
    </item>
  </channel>
</rss>

