<?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 Refreshing Application Log while maintaining navigation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/refreshing-application-log-while-maintaining-navigation/m-p/12705664#M2018691</link>
    <description>&lt;P&gt;Hi There,&lt;/P&gt;
  &lt;P&gt;I have a custom application log and display program which uses FM BAL_DSP_LOG_DISPLAY.&lt;/P&gt;
  &lt;P&gt;I have added a Refresh Button on the toolbar and working code to refresh the selected application logs from the database, however when the refresh happens the currently displayed Log *(After a log in the tree is double clicked on) is not displayed again and the tree and list revert to what was displayed in the initial call to BAL_DSP_LOG_DISPLAY.&lt;/P&gt;
  &lt;P&gt;My Question is:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Is there a way to maintain the current selection in the application Log when it is refreshed?&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I have already searched for previous solutions here and none match my issue.&lt;/P&gt;
  &lt;P&gt;Any assistance would be greatly appreciated&lt;/P&gt;
  &lt;P&gt;Cheers&lt;/P&gt;
  &lt;P&gt;Cangus.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;FYI: Here is the Callback routine I'm using to do the refresh *(It works).&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;FORM callback_ucomm CHANGING cs_user_command_data TYPE bal_s_cbuc.&lt;BR /&gt;  DATA: ls_disp_profile TYPE bal_s_prof,&lt;BR /&gt;        ls_log_filter TYPE bal_s_lfil,&lt;BR /&gt;        ls_obj TYPE bal_s_obj,&lt;BR /&gt;        ls_sub_obj TYPE bal_s_sub,&lt;BR /&gt;        lt_log_handle TYPE bal_t_logh,&lt;BR /&gt;        ld_log_handle TYPE balloghndl.&lt;BR /&gt;&lt;BR /&gt;*--- Check if Refresh Button was pressed.&lt;BR /&gt;  IF cs_user_command_data-ucomm = gc_ucomm_ext_push1.&lt;BR /&gt;    cs_user_command_data-refresh = abap_true.&lt;BR /&gt;    cs_user_command_data-ucomm_exec = abap_true.&lt;BR /&gt;&lt;BR /&gt;*--- Pass the App log Object name&lt;BR /&gt;    ls_obj-sign = 'I'.&lt;BR /&gt;    ls_obj-option = 'EQ'.&lt;BR /&gt;    ls_obj-low = gc_log_obj.&lt;BR /&gt;    APPEND ls_obj TO ls_log_filter-object.&lt;BR /&gt;&lt;BR /&gt;*--- Pass the App log Subobject Name&lt;BR /&gt;    ls_sub_obj-sign = 'I'.&lt;BR /&gt;    ls_sub_obj-option = 'EQ'.&lt;BR /&gt;    ls_sub_obj-low = gc_subobject.&lt;BR /&gt;    APPEND ls_sub_obj TO ls_log_filter-subobject.&lt;BR /&gt;&lt;BR /&gt;*--- Load Application Logs via wrapper Class which calls FM BAL_DB_SEARCH&lt;BR /&gt;    lt_log_handle = gr_log-&amp;gt;search_logs( ls_log_filter ).&lt;BR /&gt;&lt;BR /&gt;*--- Reload from database&lt;BR /&gt;    CALL FUNCTION 'BAL_DB_RELOAD'&lt;BR /&gt;      EXPORTING&lt;BR /&gt;        i_t_log_handle = lt_log_handle&lt;BR /&gt;      EXCEPTIONS&lt;BR /&gt;        OTHERS         = 0.&lt;BR /&gt;&lt;BR /&gt;*--- Set display output data&lt;BR /&gt;    CALL FUNCTION 'BAL_DSP_OUTPUT_SET_DATA'&lt;BR /&gt;      EXPORTING&lt;BR /&gt;        i_t_log_handle         = lt_log_handle&lt;BR /&gt;      EXCEPTIONS&lt;BR /&gt;        OTHERS                 = 0.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;&lt;BR /&gt;ENDFORM.                    "callback_ucomm&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 03 Mar 2023 15:38:50 GMT</pubDate>
    <dc:creator>Carl_Angus1</dc:creator>
    <dc:date>2023-03-03T15:38:50Z</dc:date>
    <item>
      <title>Refreshing Application Log while maintaining navigation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refreshing-application-log-while-maintaining-navigation/m-p/12705664#M2018691</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;
  &lt;P&gt;I have a custom application log and display program which uses FM BAL_DSP_LOG_DISPLAY.&lt;/P&gt;
  &lt;P&gt;I have added a Refresh Button on the toolbar and working code to refresh the selected application logs from the database, however when the refresh happens the currently displayed Log *(After a log in the tree is double clicked on) is not displayed again and the tree and list revert to what was displayed in the initial call to BAL_DSP_LOG_DISPLAY.&lt;/P&gt;
  &lt;P&gt;My Question is:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Is there a way to maintain the current selection in the application Log when it is refreshed?&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I have already searched for previous solutions here and none match my issue.&lt;/P&gt;
  &lt;P&gt;Any assistance would be greatly appreciated&lt;/P&gt;
  &lt;P&gt;Cheers&lt;/P&gt;
  &lt;P&gt;Cangus.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;FYI: Here is the Callback routine I'm using to do the refresh *(It works).&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;FORM callback_ucomm CHANGING cs_user_command_data TYPE bal_s_cbuc.&lt;BR /&gt;  DATA: ls_disp_profile TYPE bal_s_prof,&lt;BR /&gt;        ls_log_filter TYPE bal_s_lfil,&lt;BR /&gt;        ls_obj TYPE bal_s_obj,&lt;BR /&gt;        ls_sub_obj TYPE bal_s_sub,&lt;BR /&gt;        lt_log_handle TYPE bal_t_logh,&lt;BR /&gt;        ld_log_handle TYPE balloghndl.&lt;BR /&gt;&lt;BR /&gt;*--- Check if Refresh Button was pressed.&lt;BR /&gt;  IF cs_user_command_data-ucomm = gc_ucomm_ext_push1.&lt;BR /&gt;    cs_user_command_data-refresh = abap_true.&lt;BR /&gt;    cs_user_command_data-ucomm_exec = abap_true.&lt;BR /&gt;&lt;BR /&gt;*--- Pass the App log Object name&lt;BR /&gt;    ls_obj-sign = 'I'.&lt;BR /&gt;    ls_obj-option = 'EQ'.&lt;BR /&gt;    ls_obj-low = gc_log_obj.&lt;BR /&gt;    APPEND ls_obj TO ls_log_filter-object.&lt;BR /&gt;&lt;BR /&gt;*--- Pass the App log Subobject Name&lt;BR /&gt;    ls_sub_obj-sign = 'I'.&lt;BR /&gt;    ls_sub_obj-option = 'EQ'.&lt;BR /&gt;    ls_sub_obj-low = gc_subobject.&lt;BR /&gt;    APPEND ls_sub_obj TO ls_log_filter-subobject.&lt;BR /&gt;&lt;BR /&gt;*--- Load Application Logs via wrapper Class which calls FM BAL_DB_SEARCH&lt;BR /&gt;    lt_log_handle = gr_log-&amp;gt;search_logs( ls_log_filter ).&lt;BR /&gt;&lt;BR /&gt;*--- Reload from database&lt;BR /&gt;    CALL FUNCTION 'BAL_DB_RELOAD'&lt;BR /&gt;      EXPORTING&lt;BR /&gt;        i_t_log_handle = lt_log_handle&lt;BR /&gt;      EXCEPTIONS&lt;BR /&gt;        OTHERS         = 0.&lt;BR /&gt;&lt;BR /&gt;*--- Set display output data&lt;BR /&gt;    CALL FUNCTION 'BAL_DSP_OUTPUT_SET_DATA'&lt;BR /&gt;      EXPORTING&lt;BR /&gt;        i_t_log_handle         = lt_log_handle&lt;BR /&gt;      EXCEPTIONS&lt;BR /&gt;        OTHERS                 = 0.&lt;BR /&gt;  ENDIF.&lt;BR /&gt;&lt;BR /&gt;ENDFORM.                    "callback_ucomm&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Mar 2023 15:38:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refreshing-application-log-while-maintaining-navigation/m-p/12705664#M2018691</guid>
      <dc:creator>Carl_Angus1</dc:creator>
      <dc:date>2023-03-03T15:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing Application Log while maintaining navigation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refreshing-application-log-while-maintaining-navigation/m-p/12705665#M2018692</link>
      <description>&lt;P&gt;One approach to maintain the current selection in the application log when it is refreshed is to store the current selection in a variable and restore it after the refresh.&lt;/P&gt;&lt;P&gt;Here is an example modification to your code that should accomplish this:&lt;/P&gt;&lt;P&gt;FORM callback_ucomm CHANGING cs_user_command_data TYPE bal_s_cbuc.&lt;/P&gt;&lt;P&gt;DATA: ls_disp_profile TYPE bal_s_prof,&lt;/P&gt;&lt;P&gt;ls_log_filter TYPE bal_s_lfil,&lt;/P&gt;&lt;P&gt;ls_obj TYPE bal_s_obj,&lt;/P&gt;&lt;P&gt;ls_sub_obj TYPE bal_s_sub,&lt;/P&gt;&lt;P&gt;lt_log_handle TYPE bal_t_logh,&lt;/P&gt;&lt;P&gt;ld_log_handle TYPE balloghndl,&lt;/P&gt;&lt;P&gt;lv_selected_log_handle TYPE balloghndl.&lt;/P&gt;&lt;P&gt;*--- Check if Refresh Button was pressed.&lt;/P&gt;&lt;P&gt;IF cs_user_command_data-ucomm = gc_ucomm_ext_push1.&lt;/P&gt;&lt;P&gt;cs_user_command_data-refresh = abap_true.&lt;/P&gt;&lt;P&gt;cs_user_command_data-ucomm_exec = abap_true.&lt;/P&gt;&lt;P&gt;*--- Store the currently selected log handle&lt;/P&gt;&lt;P&gt;lv_selected_log_handle = cl_bsp_wd_runtime_services=&amp;gt;get_selected_element( 'YOUR_TREE_ID' ).&lt;/P&gt;&lt;P&gt;*--- Pass the App log Object name&lt;/P&gt;&lt;P&gt;ls_obj-sign = 'I'.&lt;/P&gt;&lt;P&gt;ls_obj-option = 'EQ'.&lt;/P&gt;&lt;P&gt;ls_obj-low = gc_log_obj.&lt;/P&gt;&lt;P&gt;APPEND ls_obj TO ls_log_filter-object.&lt;/P&gt;&lt;P&gt;*--- Pass the App log Subobject Name&lt;/P&gt;&lt;P&gt;ls_sub_obj-sign = 'I'.&lt;/P&gt;&lt;P&gt;ls_sub_obj-option = 'EQ'.&lt;/P&gt;&lt;P&gt;ls_sub_obj-low = gc_subobject.&lt;/P&gt;&lt;P&gt;APPEND ls_sub_obj TO ls_log_filter-subobject.&lt;/P&gt;&lt;P&gt;*--- Load Application Logs via wrapper Class which calls FM BAL_DB_SEARCH&lt;/P&gt;&lt;P&gt;lt_log_handle = gr_log-&amp;gt;search_logs( ls_log_filter ).&lt;/P&gt;&lt;P&gt;*--- Reload from database&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAL_DB_RELOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_t_log_handle = lt_log_handle&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 0.&lt;/P&gt;&lt;P&gt;*--- Set display output data&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAL_DSP_OUTPUT_SET_DATA'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_t_log_handle = lt_log_handle&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 0.&lt;/P&gt;&lt;P&gt;*--- Restore the currently selected log handle&lt;/P&gt;&lt;P&gt;IF lv_selected_log_handle IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;CALL METHOD cl_bsp_wd_runtime_services=&amp;gt;set_selected_element&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;iv_id = 'YOUR_TREE_ID'&lt;/P&gt;&lt;P&gt;iv_index = lv_selected_log_handle.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;Replace 'YOUR_TREE_ID' with the ID of your application log tree control.&lt;/P&gt;&lt;P&gt;This code stores the currently selected log handle in a variable before the refresh, refreshes the logs, sets the output data, and then restores the selection by setting the selected element in the tree control.&lt;/P&gt;&lt;P&gt;You may need to adjust this code to match your specific implementation, but this should give you a starting point to maintain the selection after a refresh.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 16:38:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refreshing-application-log-while-maintaining-navigation/m-p/12705665#M2018692</guid>
      <dc:creator>pedrohb</dc:creator>
      <dc:date>2023-03-03T16:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing Application Log while maintaining navigation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refreshing-application-log-while-maintaining-navigation/m-p/12705666#M2018693</link>
      <description>&lt;P&gt;For information, using the CODE button, your answer will look more attractive.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2023 18:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refreshing-application-log-while-maintaining-navigation/m-p/12705666#M2018693</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-03-04T18:04:25Z</dc:date>
    </item>
  </channel>
</rss>

