<?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: 3 methodes in one class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778033#M2023477</link>
    <description>&lt;P&gt;Please, use the CODE button to format source code:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2211745-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Otherwise it is hardly readable.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 06:43:43 GMT</pubDate>
    <dc:creator>Dominik_Tylczynski</dc:creator>
    <dc:date>2023-09-14T06:43:43Z</dc:date>
    <item>
      <title>3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778032#M2023476</link>
      <description>&lt;P&gt;Hello Experts, Im trying to call 3 methodes in one class. so i habe a report wich is SALV and there is 3 cells each one should be clickable. one with link_click and the others with double_click.&lt;/P&gt;
  &lt;P&gt;TERMN : link_click&lt;/P&gt;
  &lt;P&gt;LIGHT : double_click&lt;/P&gt;
  &lt;P&gt;Bearbeiter: double_click_pool&lt;/P&gt;
  &lt;P&gt;this how should it be but in my case Light calls double_click and double_click_pool when i click on it.&lt;/P&gt;
  &lt;P&gt;Bearbeiter calls link_click.&lt;/P&gt;
  &lt;P&gt;could u guys help or tell me where my problem is?&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;class def. &lt;BR /&gt;CLASS lcl_handle_events DEFINITION.&lt;BR /&gt; PUBLIC SECTION.&lt;BR /&gt; METHODS:&lt;BR /&gt; on_double_click&lt;BR /&gt; FOR EVENT double_click OF cl_salv_events_table&lt;BR /&gt; IMPORTING&lt;BR /&gt; row&lt;BR /&gt; column .&lt;BR /&gt; METHODS: on_link_click FOR EVENT link_click OF&lt;BR /&gt; cl_salv_events_table&lt;BR /&gt; IMPORTING row column.&lt;BR /&gt; METHODS:&lt;BR /&gt; on_double_click_pool&lt;BR /&gt; FOR EVENT double_click OF cl_salv_events_table&lt;BR /&gt; IMPORTING&lt;BR /&gt; row&lt;BR /&gt; column .&lt;BR /&gt;ENDCLASS.&lt;BR /&gt;here where i create the objekt &lt;BR /&gt; SET HANDLER event_handler-&amp;gt;on_link_click FOR gr_events.&lt;BR /&gt; lr_column ?= lr_columns-&amp;gt;get_column( 'TERMN' ).&lt;BR /&gt; lr_column-&amp;gt;set_cell_type( if_salv_c_cell_type=&amp;gt;hotspot ).&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt; CREATE OBJECT event_handler.&lt;BR /&gt; SET HANDLER event_handler-&amp;gt;on_double_click FOR gr_events.

lr_column ?= lr_columns-&amp;gt;get_column( 'LIGHT' ).

lr_column-&amp;gt;set_cell_type( if_salv_c_cell_type=&amp;gt;hotspot ).

CREATE OBJECT event_handler.

SET HANDLER event_handler-&amp;gt;on_double_click_pool FOR gr_events.

lr_column ?= lr_columns-&amp;gt;get_column( 'BEARBEITER' ).

lr_column-&amp;gt;set_cell_type( if_salv_c_cell_type=&amp;gt;hotspot ).

lr_salv-&amp;gt;display( ).

Implement

cLASS lcl_handle_events IMPLEMENTATION.

METHOD on_double_click.

#logic

ENDMETHOD.

METHOD on_link_click.

#logic

METHOD on_double_click_pool.

#logic

ENDMETHOD.

ENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:33:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778032#M2023476</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2023-09-14T06:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778033#M2023477</link>
      <description>&lt;P&gt;Please, use the CODE button to format source code:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2211745-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Otherwise it is hardly readable.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:43:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778033#M2023477</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2023-09-14T06:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778034#M2023478</link>
      <description>&lt;P&gt;Your methods &lt;EM&gt;on_double_click&lt;/EM&gt; and &lt;EM&gt;on_double_click_pool&lt;/EM&gt; are both listening to event &lt;EM&gt;double_click&lt;/EM&gt;.&lt;BR /&gt;That's why they're both called at the same time.&lt;BR /&gt;&lt;BR /&gt;If you want a different behavior for double click for various fields, you need to handle it in one method:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHOD on_double_click.
    CASE column.
      WHEN 'COLUMN1'.
        " Do something
      WHEN 'COLUMN2'.
        " Do something else
    ENDCASE.
ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:48:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778034#M2023478</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-09-14T06:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778035#M2023479</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;3a9e4ce873a94034b33dc62b0ce600ee&lt;/SPAN&gt; its har to use always takes a few lines into the Code layout.&lt;/P&gt;&lt;P&gt;now should be better i guess&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:48:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778035#M2023479</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2023-09-14T06:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778036#M2023480</link>
      <description>&lt;P&gt;There should be a hotkey to add this comment, really: remember to format the code with the CODE button above, to make it readable. Take care to copy from the editor in display mode (not edit), otherwise you get html nodes mixed in.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:53:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778036#M2023480</guid>
      <dc:creator>abo</dc:creator>
      <dc:date>2023-09-14T06:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778037#M2023481</link>
      <description>&lt;P&gt;ok cool now Light column ist calling the wrong methode, but Bearbeiter still calling link_click&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:57:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778037#M2023481</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2023-09-14T06:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778038#M2023482</link>
      <description>&lt;P&gt;What works for me when pasting source code is Shift+Ctrl+V that pastes plain text only without any formating.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778038#M2023482</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2023-09-14T06:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778039#M2023483</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;c5e08e0478aa4727abc4482f5be390b2&lt;/SPAN&gt;  ahh ok thx for the tip sir!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:59:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778039#M2023483</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2023-09-14T06:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778040#M2023484</link>
      <description>&lt;P&gt;After posting, you should systematically refresh the page and review the formatting (it's how to deal with the forum quirks).&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 07:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778040#M2023484</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-09-14T07:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778041#M2023485</link>
      <description>&lt;P&gt;Maybe you can have a look at report &lt;STRONG&gt;SALV_DEMO_TABLE_EVENTS&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 07:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778041#M2023485</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-09-14T07:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: 3 methodes in one class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778042#M2023486</link>
      <description>&lt;P&gt;oh i sat the hotspot twice for the doubl_click cells it should be only one for light and bearbeiter. now it works thx alot&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 07:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/3-methodes-in-one-class/m-p/12778042#M2023486</guid>
      <dc:creator>aboooood86</dc:creator>
      <dc:date>2023-09-14T07:33:29Z</dc:date>
    </item>
  </channel>
</rss>

