<?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>Question Re: Pass a parameter in event in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999652#M875845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's the thing I was looking for Phil. &lt;/P&gt;&lt;P&gt;I can address this issue by declaring global attributes, but i wanted to know how to pass parameters in event per se!&lt;/P&gt;&lt;P&gt;One reason why I asked this question:&lt;/P&gt;&lt;P&gt;See example WDT_TABLE. In VIEW_2, in the MY_BOOKING_TABLE, there is an action ON_CHANGE_FLIGHT which is assigned to onLeadSelect event. &lt;/P&gt;&lt;P&gt;In the event handler method, they have one more parameter NEW_ROW_ELEMENT. &lt;/P&gt;&lt;P&gt;Now where does this NEW_ROW_ELEMENT come from? &lt;/P&gt;&lt;P&gt;Can you tell me this also please? &lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Mar 2007 14:20:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-20T14:20:15Z</dc:date>
    <item>
      <title>Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaq-p/1999646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I pass parameters in event? &lt;/P&gt;&lt;P&gt;Say, I have a SAVE button in 3 different views. All will do more or less the same task and so they all call a common module. &lt;/P&gt;&lt;P&gt;But I need to pass some flag or variables from each view to do view-specific task. &lt;/P&gt;&lt;P&gt;How to pass data with each event? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in adv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 14:12:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaq-p/1999646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T14:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999647#M875840</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 do this by having the same action name 'save',&lt;/P&gt;&lt;P&gt;but a different id, you can then filter the id in a case structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;grtz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Koen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 14:18:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999647#M875840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T14:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999648#M875841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what do you mean by different ID? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 23:36:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999648#M875841</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T23:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999649#M875842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The common logic should be a separate method callable from all views.  The save buttons should have specific actions assigned for each view and of course corresponding event handler methods, in this methods, you can call the common functionality in all of the event handler methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 01:13:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999649#M875842</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-20T01:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999650#M875843</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 a global attribute ( component controlller) like name of view and in wdoinit of all view set the value and then in your common module you check this and perform accordingly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anuj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 07:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999650#M875843</guid>
      <dc:creator>former_member196517</dc:creator>
      <dc:date>2007-03-20T07:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999651#M875844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All ideas from Koen, Rich and Anuj  will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To address the question literally as asked, pass a parameter in event,&lt;/P&gt;&lt;P&gt;this is also possible. This can make sense under some circumstances.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can set a button, so that the action called then receives this parameter.&lt;/P&gt;&lt;P&gt;for example Used when multiple buttons should call same action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how....&lt;/P&gt;&lt;P&gt;CL_WD_BUTTON-&amp;gt;map_on_action( parameters = plist )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to get the button element from view first..&lt;/P&gt;&lt;P&gt;then use the map on action method to add your parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These will be passed to the action when the button is pressed.&lt;/P&gt;&lt;P&gt;Of course Koen's recommendation is easier, and suits 90% + situations.&lt;/P&gt;&lt;P&gt;So try the easier way first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 12:32:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999651#M875844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T12:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999652#M875845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's the thing I was looking for Phil. &lt;/P&gt;&lt;P&gt;I can address this issue by declaring global attributes, but i wanted to know how to pass parameters in event per se!&lt;/P&gt;&lt;P&gt;One reason why I asked this question:&lt;/P&gt;&lt;P&gt;See example WDT_TABLE. In VIEW_2, in the MY_BOOKING_TABLE, there is an action ON_CHANGE_FLIGHT which is assigned to onLeadSelect event. &lt;/P&gt;&lt;P&gt;In the event handler method, they have one more parameter NEW_ROW_ELEMENT. &lt;/P&gt;&lt;P&gt;Now where does this NEW_ROW_ELEMENT come from? &lt;/P&gt;&lt;P&gt;Can you tell me this also please? &lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 14:20:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999652#M875845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T14:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999653#M875846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expets. Any reply to my query? &lt;/P&gt;&lt;P&gt;I post it again:&lt;/P&gt;&lt;P&gt;See example WDT_TABLE. In VIEW_2, in the MY_BOOKING_TABLE, there is an action ON_CHANGE_FLIGHT which is assigned to onLeadSelect event. &lt;/P&gt;&lt;P&gt;In the event handler method, they have one more parameter NEW_ROW_ELEMENT. &lt;/P&gt;&lt;P&gt;Now where does this NEW_ROW_ELEMENT come from? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, one thing I wanted to confirm. Is the context element from where the evvent was fired (for eg on_enter) always passed along with the event? i.e. can I just import contextt element too, and assume it shall be pointing to the element from where the event was fired? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 23:32:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999653#M875846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T23:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a parameter in event</title>
      <link>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999654#M875847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aishi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you try to assign an action to onSelect property of  a Table control,&lt;/P&gt;&lt;P&gt;try to use the create option available against onSelect Property where you&lt;/P&gt;&lt;P&gt;enter the Action name and there is a check box available, if you check it&lt;/P&gt;&lt;P&gt;all the parameters are automatically passed by the framework.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhimanyu L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 05:08:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/pass-a-parameter-in-event/qaa-p/1999654#M875847</guid>
      <dc:creator>abhimanyu_lagishetti7</dc:creator>
      <dc:date>2007-03-26T05:08:30Z</dc:date>
    </item>
  </channel>
</rss>

