<?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: User command not working in ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228582#M1524608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FM call:&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      I_BACKGROUND_ID    = 'ALV_BACKGROUND'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      i_buffer_active    = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         i_callback_program = g_repid&lt;/P&gt;&lt;P&gt;         i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;         i_callback_pf_status_set = 'SET_PF_STATUS'&lt;/P&gt;&lt;P&gt;         i_structure_name   = 'ZFDD_HD'&lt;/P&gt;&lt;P&gt;         is_layout          = gs_layout&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        i_save             = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      IS_VARIANT         = GS_VARIANT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      IT_EVENTS          = GT_EVENTS[]&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     I_SCREEN_START_COLUMN    = 0     "Use coordinates for&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     I_SCREEN_START_LINE      = 0     "display as dialog box&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     I_SCREEN_END_COLUMN      = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     I_SCREEN_END_LINE        = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;         e_exit_caused_by_caller = g_exit_caused_by_caller&lt;/P&gt;&lt;P&gt;         es_exit_caused_by_user  = gs_exit_caused_by_user&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;         t_outtab = is_po_hdr&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;         program_error = 1&lt;/P&gt;&lt;P&gt;         OTHERS        = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User command perform:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM user_command USING p_ucomm LIKE sy-ucomm&lt;/P&gt;&lt;P&gt;                        p_selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE p_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '&amp;amp;F03' OR  '&amp;amp;F15' OR '&amp;amp;F12'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '&amp;amp;IC1'. " SAP standard code for double-clicking&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call to another fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Aug 2010 05:59:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-18T05:59:16Z</dc:date>
    <item>
      <title>User command not working in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228576#M1524602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am generating the ALV grid using the FM REUSE_ALV_GRID_DISPLAY.&lt;/P&gt;&lt;P&gt;I want to capture the event of a button click on the toolbar.&lt;/P&gt;&lt;P&gt;When I click on the button or do anything on the screen like click on back button, it gives a runtime error saying "Assignment error: Overwriting a protected field."&lt;/P&gt;&lt;P&gt;There is a user_command perform in the report to handle the i_callback_user_command parameter of the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest what could be missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kshitija&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 05:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228576#M1524602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T05:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: User command not working in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228577#M1524603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;TO fetch the user command in your ALV, you need to create a FORM and do your coding to fetch the functionality for your FCODE of the button.&lt;/P&gt;&lt;P&gt;Then pass this FORM to i_callback_user_command.&lt;/P&gt;&lt;P&gt;I hope this will work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lalit Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 05:31:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228577#M1524603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T05:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: User command not working in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228578#M1524604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the form for user_command already.&lt;/P&gt;&lt;P&gt;While debugging I saw that this form is not being called at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in th call to the FM REUSE_ALV_GRID_DISPLAY i have passed the form name as well: &lt;/P&gt;&lt;P&gt;i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hints why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 05:41:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228578#M1524604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T05:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: User command not working in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228579#M1524605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you coded for the USER_COMMAND in the subroutine just refer below code:_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM
LS_SELFIELD TYPE SLIS_SELFIELD.
CASE L_UCOMM.
WHEN '&amp;amp;IC1'.
READ TABLE IT_SFLIGHT INDEX LS_SELFIELD-TABINDEX INTO WA_SFLIGHT.
SELECT * FROM SPFLI INTO TABLE IT_SPFLI
WHERE CARRID = WA_SFLIGHT-CARRID.
WRITE : / SY-VLINE,(10) 'CARRID' CENTERED COLOR 7,
SY-VLINE,(10) 'CONNID' CENTERED COLOR 7,
SY-VLINE,(10) 'CITYFROM' CENTERED COLOR 7,
SY-VLINE,(10) 'CITYTO' CENTERED COLOR 7,
SY-VLINE,/ SY-ULINE.
LOOP AT IT_SPFLI INTO WA_SPFLI.
WRITE :/ SY-VLINE,(10) WA_SPFLI-CARRID COLOR 1,
SY-VLINE,(10) WA_SPFLI-CONNID COLOR 1,
SY-VLINE,(10) WA_SPFLI-CITYFROM COLOR 1,
SY-VLINE,(10) WA_SPFLI-CITYTO COLOR 1,
SY-VLINE,/ SY-ULINE.
ENDLOOP.
ENDCASE.
ENDFORM. "USER_COMMAND&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abhii&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 05:46:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228579#M1524605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T05:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: User command not working in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228580#M1524606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 05:48:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228580#M1524606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T05:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: User command not working in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228581#M1524607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you post the relevant code??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abhii&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 05:53:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228581#M1524607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T05:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: User command not working in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228582#M1524608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FM call:&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      I_BACKGROUND_ID    = 'ALV_BACKGROUND'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      i_buffer_active    = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         i_callback_program = g_repid&lt;/P&gt;&lt;P&gt;         i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;         i_callback_pf_status_set = 'SET_PF_STATUS'&lt;/P&gt;&lt;P&gt;         i_structure_name   = 'ZFDD_HD'&lt;/P&gt;&lt;P&gt;         is_layout          = gs_layout&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        i_save             = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      IS_VARIANT         = GS_VARIANT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      IT_EVENTS          = GT_EVENTS[]&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     I_SCREEN_START_COLUMN    = 0     "Use coordinates for&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     I_SCREEN_START_LINE      = 0     "display as dialog box&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     I_SCREEN_END_COLUMN      = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     I_SCREEN_END_LINE        = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;         e_exit_caused_by_caller = g_exit_caused_by_caller&lt;/P&gt;&lt;P&gt;         es_exit_caused_by_user  = gs_exit_caused_by_user&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;         t_outtab = is_po_hdr&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;         program_error = 1&lt;/P&gt;&lt;P&gt;         OTHERS        = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User command perform:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM user_command USING p_ucomm LIKE sy-ucomm&lt;/P&gt;&lt;P&gt;                        p_selfield TYPE slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE p_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '&amp;amp;F03' OR  '&amp;amp;F15' OR '&amp;amp;F12'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN '&amp;amp;IC1'. " SAP standard code for double-clicking&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call to another fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 05:59:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228582#M1524608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T05:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: User command not working in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228583#M1524609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I beleive this is because you are not passing the program name in I_callback_program parameter in your FM.&lt;/P&gt;&lt;P&gt;declare a variable in which pass the Sy-Repid and then pass this variable to this parameter of FM Reuse_ALV_Grid.&lt;/P&gt;&lt;P&gt;See below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA V_REPID TYPE SY-REPID. " VARIABLE FOR SY-REPID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also Why you are calling another FM in side the form for user command, and which fm you are calling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I beleive there is a minor mistake.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 06:19:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command-not-working-in-alv/m-p/7228583#M1524609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-18T06:19:04Z</dc:date>
    </item>
  </channel>
</rss>

