<?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: Runtime Error when Usercommand event is fired in ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-usercommand-event-is-fired-in-alv/m-p/5584966#M1273522</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Error you are getting due to the Subroutine intterface parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the Dynamic Subroutine for User_Command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM user_command USING r_ucomm LIKE sy-ucomm
                                    rs_selfield TYPE slis_selfield.
CODE.       
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 May 2009 08:59:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-07T08:59:01Z</dc:date>
    <item>
      <title>Runtime Error when Usercommand event is fired in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-usercommand-event-is-fired-in-alv/m-p/5584965#M1273521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm writing ALv report and i successfully got Top of Page and End of List but when im try to fire Usercommand a run time error  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Too many parameters specified with PERFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error analysis&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A PERFORM was used to call the routine "GENERATE_USER_COMMAND&lt;/P&gt;&lt;P&gt; "ZSAP1_ALV ".&lt;/P&gt;&lt;P&gt;This routine contains exactly 0 formal parameters, but the cu&lt;/P&gt;&lt;P&gt;call contains 2 actual parameters.&lt;/P&gt;&lt;P&gt;parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_EVENTS_GET'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LIST_TYPE           = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   ET_EVENTS             = IT_EVENTS&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LIST_TYPE_WRONG       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_EVENTS-NAME = 'TOP_OF_PAGE'.&lt;/P&gt;&lt;P&gt;WA_EVENTS-FORM = 'TOP_FORM'.&lt;/P&gt;&lt;P&gt;APPEND WA_EVENTS TO IT_EVENTS.&lt;/P&gt;&lt;P&gt;CLEAR WA_EVENTS.&lt;/P&gt;&lt;P&gt;WA_EVENTS-NAME = 'END_OF_LIST'.&lt;/P&gt;&lt;P&gt;WA_EVENTS-FORM = 'END_OF_FORM'.&lt;/P&gt;&lt;P&gt;APPEND WA_EVENTS TO IT_EVENTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR WA_EVENTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_EVENTS-NAME = 'USER_COMMAND'.&lt;/P&gt;&lt;P&gt;WA_EVENTS-FORM = 'GENERATE_USER_COMMAND'.&lt;/P&gt;&lt;P&gt;APPEND WA_EVENTS TO IT_EVENTS.&lt;/P&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and after this i created a form for Generate_user_command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using perform keyword.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance &lt;/P&gt;&lt;P&gt;Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2009 07:57:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-usercommand-event-is-fired-in-alv/m-p/5584965#M1273521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-07T07:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Error when Usercommand event is fired in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-usercommand-event-is-fired-in-alv/m-p/5584966#M1273522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Error you are getting due to the Subroutine intterface parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the Dynamic Subroutine for User_Command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM user_command USING r_ucomm LIKE sy-ucomm
                                    rs_selfield TYPE slis_selfield.
CODE.       
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2009 08:59:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-usercommand-event-is-fired-in-alv/m-p/5584966#M1273522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-07T08:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Error when Usercommand event is fired in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-usercommand-event-is-fired-in-alv/m-p/5584967#M1273523</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;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
* EXPORTING
* I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IT_EVENTS
* EXCEPTIONS
* LIST_TYPE_WRONG = 1
* OTHERS = 2
.
IF SY-SUBRC 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

" You shold not append the events to IT_EVENTS table. as all the alv events will 
" get populated from the above FM.you need to modify the required events with the formnames.
READ TABLE IT_EVENTS INTO  WA_EVENTS WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = 'TOP_FORM'.
MODIFY TABLE IT_EVENTS FROM WA_EVENTS TRANSPORTING  FORM INDEX SY-TABIX.
ENDIF.

READ TABLE IT_EVENTS INTO  WA_EVENTS WITH KEY NAME = 'END_OF_LIST'.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = 'END_OF_FORM'.
MODIFY TABLE IT_EVENTS FROM WA_EVENTS TRANSPORTING  FORM INDEX SY-TABIX.
ENDIF.

READ TABLE IT_EVENTS INTO  WA_EVENTS WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = = 'GENERATE_USER_COMMAND'.
MODIFY TABLE IT_EVENTS FROM WA_EVENTS TRANSPORTING  FORM INDEX SY-TABIX.
ENDIF.

FORM GENERATE_USER_COMMAND USING r_ucomm LIKE sy-ucomm
                                    rs_selfield TYPE slis_selfield.
" Write the code here
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2009 09:07:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-usercommand-event-is-fired-in-alv/m-p/5584967#M1273523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-07T09:07:33Z</dc:date>
    </item>
  </channel>
</rss>

