<?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: Refresh listbox by using search help values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-listbox-by-using-search-help-values/m-p/12685318#M2017241</link>
    <description>&lt;P&gt;The elementary search help assigned to comp2 has 1 import parameter (assigned to comp1) and 2 export parameters (key and text).  The dialog type is "Display values immeditately".&lt;BR /&gt;&lt;BR /&gt;By debugging I found out that the listbox is just filled once at the initialization of the report and the value of comp1 is not copied to the SHLP_DESCR-INTERFACE-VALUE (as done before clicking the search help button).&lt;/P&gt;&lt;P&gt;I added this code to make it work. Isn't there an easier solution?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ZMY_STRUCTURE&lt;BR /&gt;Comp   Type     Search help&lt;BR /&gt;WERKS  WERKS_D  MM_PUR_PR_SH_PLANT&lt;BR /&gt;LGORT  LGORT_D  MMPUR_UI_ELM_LGORT&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;report z_my_report.&lt;BR /&gt;&lt;BR /&gt;tables: zmy_structure.&lt;BR /&gt;&lt;BR /&gt;parameters: p_werks like zmy_structure-werks as listbox visible length 30 user-command c1,&lt;BR /&gt;             p_lgort like zmy_structure-lgort as listbox visible length 30 user-command c2.&lt;BR /&gt;&lt;BR /&gt;at selection-screen.&lt;BR /&gt;&lt;BR /&gt;  if sy-ucomm = 'C1'.&lt;BR /&gt;&lt;BR /&gt;    clear: p_lgort, zmy_structure-lgort.&lt;BR /&gt;&lt;BR /&gt;    " Problem: SHLP_DESCR-INTERFACE-VALUE of VALFIELD = 'WERKS' is not set&lt;BR /&gt;    " Solution:&lt;BR /&gt;    "    set the parameter in ZMY_STRUCTURE-WERKS&lt;BR /&gt;    "    DD_SHLP_COMBOBOX_FILL will do a dirty assign to get the value&lt;BR /&gt;    "    (fallback method)&lt;BR /&gt;    zmy_structure-werks = p_werks.&lt;BR /&gt;&lt;BR /&gt;    " delete last result&lt;BR /&gt;    call function 'VRM_DELETE_VALUES'&lt;BR /&gt;      exporting&lt;BR /&gt;        id = 'P_LGORT'.&lt;BR /&gt;&lt;BR /&gt;    " fill again&lt;BR /&gt;    call function 'DD_SHLP_COMBOBOX_FILL'&lt;BR /&gt;      exporting&lt;BR /&gt;        tabname     = 'ZMY_STRUCTURE'&lt;BR /&gt;        fieldname   = 'LGORT'&lt;BR /&gt;        valueset_id = 'P_LGORT'.&lt;BR /&gt;&lt;BR /&gt;  endif.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Feb 2023 13:32:59 GMT</pubDate>
    <dc:creator>Martin-Schmid</dc:creator>
    <dc:date>2023-02-17T13:32:59Z</dc:date>
    <item>
      <title>Refresh listbox by using search help values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-listbox-by-using-search-help-values/m-p/12685317#M2017240</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;
  &lt;P&gt;after a long time of research I don't find a suitable solution.&lt;BR /&gt;&lt;BR /&gt;I created a structure with two components. Each component has an explicit search help with its parameters assigned to the components. Component 2 has a search result only when a value in components 1 has been set.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;This works fine. Enter comp1, use search help of comp2, get values based on comp1, and select a value.&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;report z_my_report.
data: ls_data type z_my_structure.
parameters: comp1 like ls_data-comp1,
            comp2 like ls_data-comp2.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt;This does not: comp2 is empty and never updated automatically.&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;report z_my_report.
data: ls_data type z_my_structure.
parameters: comp1 like ls_data-comp1 as listbox visible length 30 user-command c1,
            comp2 like ls_data-comp2 as listbox visible length 30 user-command c2.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;What is the command to refresh the listbox comp2 with values from it's search help based on the parameters (e.g. in at selection screen after comp1 was selected)?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Martin&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 18:47:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-listbox-by-using-search-help-values/m-p/12685317#M2017240</guid>
      <dc:creator>Martin-Schmid</dc:creator>
      <dc:date>2023-02-15T18:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh listbox by using search help values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-listbox-by-using-search-help-values/m-p/12685318#M2017241</link>
      <description>&lt;P&gt;The elementary search help assigned to comp2 has 1 import parameter (assigned to comp1) and 2 export parameters (key and text).  The dialog type is "Display values immeditately".&lt;BR /&gt;&lt;BR /&gt;By debugging I found out that the listbox is just filled once at the initialization of the report and the value of comp1 is not copied to the SHLP_DESCR-INTERFACE-VALUE (as done before clicking the search help button).&lt;/P&gt;&lt;P&gt;I added this code to make it work. Isn't there an easier solution?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ZMY_STRUCTURE&lt;BR /&gt;Comp   Type     Search help&lt;BR /&gt;WERKS  WERKS_D  MM_PUR_PR_SH_PLANT&lt;BR /&gt;LGORT  LGORT_D  MMPUR_UI_ELM_LGORT&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;report z_my_report.&lt;BR /&gt;&lt;BR /&gt;tables: zmy_structure.&lt;BR /&gt;&lt;BR /&gt;parameters: p_werks like zmy_structure-werks as listbox visible length 30 user-command c1,&lt;BR /&gt;             p_lgort like zmy_structure-lgort as listbox visible length 30 user-command c2.&lt;BR /&gt;&lt;BR /&gt;at selection-screen.&lt;BR /&gt;&lt;BR /&gt;  if sy-ucomm = 'C1'.&lt;BR /&gt;&lt;BR /&gt;    clear: p_lgort, zmy_structure-lgort.&lt;BR /&gt;&lt;BR /&gt;    " Problem: SHLP_DESCR-INTERFACE-VALUE of VALFIELD = 'WERKS' is not set&lt;BR /&gt;    " Solution:&lt;BR /&gt;    "    set the parameter in ZMY_STRUCTURE-WERKS&lt;BR /&gt;    "    DD_SHLP_COMBOBOX_FILL will do a dirty assign to get the value&lt;BR /&gt;    "    (fallback method)&lt;BR /&gt;    zmy_structure-werks = p_werks.&lt;BR /&gt;&lt;BR /&gt;    " delete last result&lt;BR /&gt;    call function 'VRM_DELETE_VALUES'&lt;BR /&gt;      exporting&lt;BR /&gt;        id = 'P_LGORT'.&lt;BR /&gt;&lt;BR /&gt;    " fill again&lt;BR /&gt;    call function 'DD_SHLP_COMBOBOX_FILL'&lt;BR /&gt;      exporting&lt;BR /&gt;        tabname     = 'ZMY_STRUCTURE'&lt;BR /&gt;        fieldname   = 'LGORT'&lt;BR /&gt;        valueset_id = 'P_LGORT'.&lt;BR /&gt;&lt;BR /&gt;  endif.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Feb 2023 13:32:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-listbox-by-using-search-help-values/m-p/12685318#M2017241</guid>
      <dc:creator>Martin-Schmid</dc:creator>
      <dc:date>2023-02-17T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh listbox by using search help values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-listbox-by-using-search-help-values/m-p/12685319#M2017242</link>
      <description>&lt;P&gt;Can't do better. Just simplifying to:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES demof4help.
PARAMETERS: carrier2 TYPE demof4help-carrier2 AS LISTBOX VISIBLE LENGTH 30 USER-COMMAND c1 DEFAULT 'LH',
            connid   TYPE demof4help-connid AS LISTBOX VISIBLE LENGTH 30 USER-COMMAND c2.
AT SELECTION-SCREEN OUTPUT.
  demof4help-carrier2 = carrier2.
  CALL FUNCTION 'VRM_DELETE_VALUES'
    EXPORTING
      id           = 'CONNID'
    EXCEPTIONS
      id_not_found = 1.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Feb 2023 12:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/refresh-listbox-by-using-search-help-values/m-p/12685319#M2017242</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-02-18T12:22:58Z</dc:date>
    </item>
  </channel>
</rss>

