<?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: Form user_command not triggering in debugger in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459627#M2000148</link>
    <description>&lt;P&gt;did you try to fill ans pass table IT_EVENTS with &amp;amp;XXL ? &lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2021 07:05:38 GMT</pubDate>
    <dc:creator>former_member226519</dc:creator>
    <dc:date>2021-04-16T07:05:38Z</dc:date>
    <item>
      <title>Form user_command not triggering in debugger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459624#M2000145</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;After I display my ALV.&lt;/P&gt;
  &lt;P&gt;I went to menu bar click on LIst-&amp;gt;Export-&amp;gt;Spreadsheet.&lt;/P&gt;
  &lt;P&gt;I check the command. It is &amp;amp;XXL&lt;/P&gt;
  &lt;P&gt;How come my user_command subroutine cannot trigger?&lt;/P&gt;
  &lt;P&gt;Then I tried added a custom function button on application toolbar named &amp;amp;EXL&lt;/P&gt;
  &lt;P&gt;Apparently, standard function code cannot trigger, but custom function can?&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;gw_wrk_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program          = gw_wrk_repid
        i_callback_pf_status_set    = 'SUB_PF_STATUS' "znsc
        i_callback_user_command     = 'USER_COMMAND'
        i_callback_html_top_of_page = 'TOP_OF_PAGE'
        it_fieldcat                 = gw_wrk_fieldcat
        is_layout                   = gw_wrk_layout
        it_sort                     = gt_sort
      TABLES
        t_outtab                    = gt_output
      EXCEPTIONS
        program_error               = 1
        OTHERS                      = 2.



FORM user_command USING r_ucomm     LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.

  FIELD-SYMBOLS: &amp;lt;fs_output&amp;gt; LIKE gs_output.

  CASE r_ucomm.
    WHEN '&amp;amp;IC1'.
      IF rs_selfield-fieldname = 'EBELN'.
        READ TABLE gt_output INTO gw_output INDEX rs_selfield-tabindex.
        SET PARAMETER ID 'BES' FIELD gw_output-ebeln.
        CALL TRANSACTION 'ME23N'.
      ENDIF.

*   begin znsc
    WHEN '&amp;amp;XXL'.
      IF gt_output IS NOT INITIAL.
        UNASSIGN &amp;lt;fs_output&amp;gt;.
        LOOP AT gt_output ASSIGNING &amp;lt;fs_output&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Apr 2021 03:02:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459624#M2000145</guid>
      <dc:creator>siongchao_ng</dc:creator>
      <dc:date>2021-04-16T03:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Form user_command not triggering in debugger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459625#M2000146</link>
      <description>&lt;P&gt;Sorry, could you explain why you are trying to catch the ucomm &amp;amp;XLL ?  it is standard, you do not have to catch it. &lt;/P&gt;&lt;P&gt;(forget this FM, use SALV class, it is more than old-school this FM)&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 06:17:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459625#M2000146</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-04-16T06:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Form user_command not triggering in debugger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459626#M2000147</link>
      <description>&lt;P&gt;Hi Frederic,&lt;/P&gt;&lt;P&gt;I am trying to remove special characters in a alv column only when user tried to trigger &amp;amp;XXL&lt;/P&gt;&lt;P&gt;by click on LIst-&amp;gt;Export-&amp;gt;Spreadsheet.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WHEN '&amp;amp;XXL'.
      IF gt_output IS NOT INITIAL.
        UNASSIGN &amp;lt;fs_output&amp;gt;.
        LOOP AT gt_output ASSIGNING &amp;lt;fs_output&amp;gt;.
          IF &amp;lt;fs_output&amp;gt;-longtext IS NOT INITIAL.
            PERFORM remove_spl_char USING &amp;lt;fs_output&amp;gt;-longtext.
*                                     CHANGING &amp;lt;fs_output&amp;gt;-longtext.

          ENDIF.
        ENDLOOP.
*         refresh the alv table after removing special chars in item long text
        rs_selfield-refresh = 'X'. "Set this one. It refreshes internal table data with new values
      ENDIF.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Apr 2021 06:21:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459626#M2000147</guid>
      <dc:creator>siongchao_ng</dc:creator>
      <dc:date>2021-04-16T06:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Form user_command not triggering in debugger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459627#M2000148</link>
      <description>&lt;P&gt;did you try to fill ans pass table IT_EVENTS with &amp;amp;XXL ? &lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 07:05:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459627#M2000148</guid>
      <dc:creator>former_member226519</dc:creator>
      <dc:date>2021-04-16T07:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Form user_command not triggering in debugger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459628#M2000149</link>
      <description>&lt;P&gt;it is not better to hide xxl button, create your own ?   create an excel file is not really difficult with ABAP2XLS&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 08:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459628#M2000149</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-04-16T08:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Form user_command not triggering in debugger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459629#M2000150</link>
      <description>&lt;P&gt;Did you you register the instance events handler? Looks like there there is a missing &lt;BR /&gt;SET HANDLER statement. The user command will trigger once its done&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 23:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-user-command-not-triggering-in-debugger/m-p/12459629#M2000150</guid>
      <dc:creator>RemiKaimal</dc:creator>
      <dc:date>2021-04-16T23:54:59Z</dc:date>
    </item>
  </channel>
</rss>

