<?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: **********Trigger an Event*********** in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934179#M386525</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;report ztest.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS: p_emp   LIKE rlgrap-filename,
            p_empt  LIKE rlgrap-filename,
            p_cont LIKE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK block1.


*at selection-screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_emp.

  REFRESH: it_tabemp.
  CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog
    EXPORTING
      window_title      = 'Select File'
      default_filename  = '*.xls'
      initial_directory = 'C:'
      multiselection    = ' '  "No multiple selection
    CHANGING
      file_table        = it_tabemp
      rc                = gd_subrcemp.

  LOOP AT it_tabemp INTO p_emp.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above code when you click the button on p_emp parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_emp. gets triggered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Feb 2007 14:19:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-12T14:19:25Z</dc:date>
    <item>
      <title>**********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934176#M386522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Can anyuone please tell me how to trigger an event ? Kindly send me a small code .&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;********&lt;STRONG&gt;REPLIES TO BE DEFINETELY REWARDED&lt;/STRONG&gt;********&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:16:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934176#M386522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934177#M386523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you referring to events in ALV's or.. anything else? Can you please be specific?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934177#M386523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T14:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934178#M386524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these Demo Programs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;demo_program_initialization&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;demo_program_start_of_selectio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;demo_program_end_of_selection &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;demo_program_stop &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;demo_program_exit_1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:18:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934178#M386524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T14:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934179#M386525</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;report ztest.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS: p_emp   LIKE rlgrap-filename,
            p_empt  LIKE rlgrap-filename,
            p_cont LIKE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK block1.


*at selection-screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_emp.

  REFRESH: it_tabemp.
  CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog
    EXPORTING
      window_title      = 'Select File'
      default_filename  = '*.xls'
      initial_directory = 'C:'
      multiselection    = ' '  "No multiple selection
    CHANGING
      file_table        = it_tabemp
      rc                = gd_subrcemp.

  LOOP AT it_tabemp INTO p_emp.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above code when you click the button on p_emp parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_emp. gets triggered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:19:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934179#M386525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T14:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934180#M386526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check Transaction SM64, it calls the function module 'BP_EVENT_RAISE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
     call function 'BP_EVENT_RAISE'
        exporting
          eventid                = btch1250-eventid
          eventparm              = btch1250-parameter
        exceptions
          bad_eventid            = 1
          eventid_does_not_exist = 2
          eventid_missing        = 3
          raise_failed           = 4
          others                 = 99.

      case sy-subrc.
        when 0.
          message s250 with btch1250-eventid.
        when 1.
          message e042 with btch1250-eventid.
        when 2.
          message e042 with btch1250-eventid.
        when 3.
          message e038.
        when 4.
          message e249 with btch1250-eventid.
      endcase.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leonardo De Araujo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:19:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934180#M386526</guid>
      <dc:creator>LeonardoAraujo</dc:creator>
      <dc:date>2007-02-12T14:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934181#M386527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you are talking about job events... if it is class related it is another story.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:21:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934181#M386527</guid>
      <dc:creator>LeonardoAraujo</dc:creator>
      <dc:date>2007-02-12T14:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934182#M386528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Normally we trigger the Events using &amp;lt;b&amp;gt;RAISE EVENT&amp;lt;/b&amp;gt; ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Declaring Events&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;You declare events in the declaration part of a class or in an interface. To declare instance events, use the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EVENTS evt EXPORTING... VALUE(e1 e2 ...) TYPE type [OPTIONAL].. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To declare static events, use the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS-EVENTS evt...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both statements have the same syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you declare an event, you can use the EXPORTINGaddition to specify parameters that are passed to the event handler. The parameters are always passed by value. Instance events always contain the implicit parameter SENDER, which has the type of a reference to the type or the interface in which the event is declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Triggering Events&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;An instance event in a class can be triggered by any instance method in the class. Static events can be triggered by any method. However, static methods can only trigger static events. To trigger an event in a method, use the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RAISE EVENT evt EXPORTING e1 = f1  e2 = f2 ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each formal parameter e1 that is not defined as optional, you must pass a corresponding actual parameter f1 in the EXPORTING addition. The self-reference me is automatically passed to the implicit parameter sender.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="317160"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:22:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934182#M386528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T14:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934183#M386529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;        Thanks a lot for your reply. I have a small clarification.Please reply.&lt;/P&gt;&lt;P&gt;I am calling the event from a BADI. The object is ZBUS20001 and the event I want to trigger is ZTESTCREATE.&lt;/P&gt;&lt;P&gt;Please tell me how to write the code. Kindly help.&lt;/P&gt;&lt;P&gt;Thanks a lot once again for your reply.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;***&lt;STRONG&gt;I Shall definetely reward you&lt;/STRONG&gt;*****&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934183#M386529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T14:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934184#M386530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Call this way.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'SWE_EVENT_CREATE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        OBJTYPE           = 'ZBUS20001'&lt;/P&gt;&lt;P&gt;        OBJKEY            = &amp;lt;Object key &amp;gt;&lt;/P&gt;&lt;P&gt;        EVENT             = 'ZTESTCREATE'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        EVENT_CONTAINER   = IT_CONTAINER "Fill the it_container using macros&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        OBJTYPE_NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;        OTHERS            = 2.&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:36:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934184#M386530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T14:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: **********Trigger an Event***********</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934185#M386531</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;INIT_EVENT_RAISE     for          Triggering the INIT event&lt;/P&gt;&lt;P&gt;BP_EVENT_RAISE      for           Trigger Background Event&lt;/P&gt;&lt;P&gt;RFC_RAISE_ERROR   for           RFC Event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above function modules pass OBJTYPE = 'ZBUS20001' and EVENT = 'ZTESTCREATE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2007 14:58:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-an-event/m-p/1934185#M386531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-12T14:58:01Z</dc:date>
    </item>
  </channel>
</rss>

