<?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 multiple f4 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983539#M1341293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is possible to manage more than one f4 in   report?&lt;/P&gt;&lt;P&gt; i'm using...&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD grid1-&amp;gt;register_f4_for_fields
    EXPORTING
      it_f4 = lt_f4[].

* register events for abap objects (backend)
  CREATE OBJECT g_onf4.
  SET HANDLER g_onf4-&amp;gt;on_f4 FOR grid1.

  CREATE OBJECT g_dc.
  SET HANDLER g_dc-&amp;gt;handle_data_changed FOR grid1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHOD show_f4.
    DATA: ls_outtab LIKE gt_outtab.
    IF f4_cont IS INITIAL.
      CALL METHOD init_f4.
    ENDIF.
   READ TABLE gt_outtab INTO ls_outtab INDEX f4_params-cs_row_no-row_id                                                                      .
    CALL METHOD fill_f4_itab( ls_outtab-plnnr )...

  METHOD fill_f4_itab.
    DATA ls_f4_itab TYPE f4_itab_type.
    IF plnnr  IS INITIAL.
      ls_f4_itab-value = '767AFTFD'.
      ls_f4_itab-descr = text-t03.                          "PLNNR1
      APPEND ls_f4_itab TO f4_itab.
      ls_f4_itab-value = 'A380OP10'.
      ls_f4_itab-descr = text-t04.                          "PLNNR2
      APPEND ls_f4_itab TO f4_itab.
      ls_f4_itab-value = 'ATRS144R'.
      ls_f4_itab-descr = text-t05.                          "PLNNR3
      APPEND ls_f4_itab TO f4_itab.
    ENDIF.
  ENDMETHOD.                    "fill_f4_itab&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish i can make other f4 for other field.&lt;/P&gt;&lt;P&gt;Is it possible with a routine like perform using...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: EBONGUE ANDRE on Aug 6, 2009 10:39 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2009 20:38:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-06T20:38:52Z</dc:date>
    <item>
      <title>multiple f4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983539#M1341293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is possible to manage more than one f4 in   report?&lt;/P&gt;&lt;P&gt; i'm using...&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD grid1-&amp;gt;register_f4_for_fields
    EXPORTING
      it_f4 = lt_f4[].

* register events for abap objects (backend)
  CREATE OBJECT g_onf4.
  SET HANDLER g_onf4-&amp;gt;on_f4 FOR grid1.

  CREATE OBJECT g_dc.
  SET HANDLER g_dc-&amp;gt;handle_data_changed FOR grid1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHOD show_f4.
    DATA: ls_outtab LIKE gt_outtab.
    IF f4_cont IS INITIAL.
      CALL METHOD init_f4.
    ENDIF.
   READ TABLE gt_outtab INTO ls_outtab INDEX f4_params-cs_row_no-row_id                                                                      .
    CALL METHOD fill_f4_itab( ls_outtab-plnnr )...

  METHOD fill_f4_itab.
    DATA ls_f4_itab TYPE f4_itab_type.
    IF plnnr  IS INITIAL.
      ls_f4_itab-value = '767AFTFD'.
      ls_f4_itab-descr = text-t03.                          "PLNNR1
      APPEND ls_f4_itab TO f4_itab.
      ls_f4_itab-value = 'A380OP10'.
      ls_f4_itab-descr = text-t04.                          "PLNNR2
      APPEND ls_f4_itab TO f4_itab.
      ls_f4_itab-value = 'ATRS144R'.
      ls_f4_itab-descr = text-t05.                          "PLNNR3
      APPEND ls_f4_itab TO f4_itab.
    ENDIF.
  ENDMETHOD.                    "fill_f4_itab&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish i can make other f4 for other field.&lt;/P&gt;&lt;P&gt;Is it possible with a routine like perform using...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: EBONGUE ANDRE on Aug 6, 2009 10:39 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 20:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983539#M1341293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T20:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: multiple f4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983540#M1341294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andre,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't know if I get you correct, but you can use same event for different fields&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: lt_fields_f4 TYPE lvc_t_f4,
        ls_fields_f4 TYPE lvc_s_f4.

  ls_fields_f4-fieldname = 'SEATSMAX_F'.
  ls_fields_f4-register = 'X'.
  ls_fields_f4-getbefore = 'X'.
  ls_fields_f4-chngeafter = 'X'.
  APPEND ls_fields_f4 TO lt_fields_f4.
  ls_fields_f4-fieldname = 'SEATSOCC'.
  ls_fields_f4-register = 'X'.
  ls_fields_f4-getbefore = 'X'.
  ls_fields_f4-chngeafter = 'X'.
  APPEND ls_fields_f4 TO lt_fields_f4.

CALL METHOD grid1-&amp;gt;register_f4_for_fields
    EXPORTING
      it_f4 = lt_fileds_f4[].

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Inside method &lt;STRONG&gt;show_f4&lt;/STRONG&gt; populate appropriate data to your &lt;STRONG&gt;f4_itab&lt;/STRONG&gt; depending on fieldname it F4 was triggered for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 10:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983540#M1341294</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-08-07T10:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: multiple f4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983541#M1341295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, got me well, it's what i'm trying to do but i was wondering how to manage the read table for each field.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;READ TABLE gt_outtab INTO ls_outtab INDEX f4_params-cs_row_no-row_id                                                                      .
    CALL METHOD fill_f4_itab( ls_outtab-plnnr )...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 08:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983541#M1341295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-11T08:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: multiple f4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983542#M1341296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This event has exporting parameter &lt;STRONG&gt;E_FIELDNAME&lt;/STRONG&gt; which you can use to get exact cell value in &lt;EM&gt;gt_outtab&lt;/EM&gt; . I guess this is your query right?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
READ TABLE gt_outtab INTO ls_outtab INDEX f4_params-cs_row_no-row_id. "first read which row your action applies

"now read which cell
field-symbols &amp;lt;field_val&amp;gt; type any.

assing component E_FIELDNAME of structure LS_OUTTAB into &amp;lt;field_val&amp;gt;.  "&amp;lt;field_val&amp;gt; stores value for cell which triggered action F4
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this is what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 09:42:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983542#M1341296</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-08-11T09:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: multiple f4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983543#M1341297</link>
      <description>&lt;P&gt;Error while inserting or changing rows in a sorted table&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 08:22:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983543#M1341297</guid>
      <dc:creator>former_member707043</dc:creator>
      <dc:date>2021-11-05T08:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: multiple f4</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983544#M1341298</link>
      <description>&lt;P&gt;Best not use a SORTED table for this then.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 11:29:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-f4/m-p/5983544#M1341298</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-11-05T11:29:44Z</dc:date>
    </item>
  </channel>
</rss>

