<?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: Dynamic value help in ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109856#M1509551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Viral,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order you could select the value and pass it back to ALV you need that fied editable. Otherwise it is read-only so you not able to place there new value. So in your fieldcatalog set option &lt;STRONG&gt;edit = 'X'&lt;/STRONG&gt; for that particular column you want F4 for. This should work.&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>Mon, 26 Jul 2010 07:11:20 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2010-07-26T07:11:20Z</dc:date>
    <item>
      <title>Dynamic value help in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109851#M1509546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to abap UI programming. I want to use dynamic f4 help in ALV report. Can anyone explain in simple way to perform it either through OOP or function module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly explain using simple example excluding samples like: BCALV_TEST_GRID_EDIT_0, BCALV_EDIT_04 etc... I am expecting simple to understand samples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Viral.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 11:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109851#M1509546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-20T11:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value help in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109852#M1509547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First you have to make the corresponding field editable.&lt;/P&gt;&lt;P&gt;For that EDIT field of field catalog to 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For drop down, you have to call a method SET_DROP_DOWN_TABLE of grid.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  wa_dropdown-handle = '1'.
  wa_dropdown-value = text-013."Accepted
  APPEND wa_dropdown TO t_dropdown.
  wa_dropdown-handle = '1'.
  wa_dropdown-value = text-014. "'Rejected'.
  APPEND wa_dropdown TO t_dropdown.
CALL METHOD gr_alvgrid-&amp;gt;set_drop_down_table
      EXPORTING
        it_drop_down = t_dropdown.
    LOOP AT t_fieldcat INTO wa_fieldcat.
      CASE wa_fieldcat-fieldname.
**    To assign dropdown in the fieldcataogue
        WHEN 'ZSTATUSDESC'.
          wa_fieldcat-drdn_hndl = '1'.
          wa_fieldcat-outputlen = 15.
          MODIFY t_fieldcat  FROM wa_fieldcat.
      ENDCASE.
    ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*   Call ALV
    CALL METHOD gr_alvgrid-&amp;gt;set_table_for_first_display
      EXPORTING
        is_layout                     = ls_layout
        it_toolbar_excluding          = t_toolbar_excl
      CHANGING
        it_outtab                     = t_output
        it_fieldcatalog               = t_fieldcat
      EXCEPTIONS
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        OTHERS                        = 4.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nikhil V Kumar on Jul 21, 2010 6:28 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 12:55:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109852#M1509547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-21T12:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value help in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109853#M1509548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using dropdown I would suggest to use simple F4 functionality. This must be overwritten by you with event i.e &lt;EM&gt;handle_on_f4&lt;/EM&gt; . What you need is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- handler method for this &lt;EM&gt;cl_gui_alv_grid&lt;/EM&gt; event &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"our handler class
CLASS lcl_gui_alv_event_receiver DEFINITION.
PUBLIC SECTION.
    METHODS:
"         To control F4
          handle_on_f4 FOR EVENT onf4 OF cl_gui_alv_grid
                           IMPORTING e_fieldname e_fieldvalue er_event_data,
ENDCLASS.

CLASS lcl_gui_alv_event_receiver IMPLEMENTATION.
METHOD handle_on_f4.
    DATA: repid LIKE sy-repid,
          dynnr LIKE sy-dynnr,
          field TYPE help_info-dynprofld.

    MESSAGE 'User defined value input' TYPE 'I'.
    repid = sy-repid.
    dynnr = sy-dynnr.

    field = e_fieldname.
    "this part work excatly as standard search help for this field
    "but is processed by a user althought looks like standard processing
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
      EXPORTING
        tabname     = 'SFLIGHT'
        fieldname   = 'SEATSMAX_F'
        dynpprog    = repid
        dynpnr      = dynnr
        dynprofield = field.  "return to same screen field which triggered the event

    "prevent furhter standard processing
    er_event_data-&amp;gt;m_event_handled = 'X'.
  ENDMETHOD.                    
ENDLCASS.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;- now in your main program you need to register this event telling the system who it is hanled by&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: "alv grid reference variable
      g_alv_grid_ref TYPE REF TO cl_gui_alv_grid.

DATA: "alv event receiver class
      g_alv_event_ref TYPE REF TO lcl_gui_alv_event_receiver.

CREATE OBJECT g_alv_event_ref.
SET HANDLER  g_alv_event_ref-&amp;gt;handle_on_f4 FOR g_alv_grid_ref.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;- before you display your ALV you need one last thing, namely activate the F4 events which are by default turned off&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: lt_fields_f4 TYPE lvc_t_f4,
             ls_fields_f4 TYPE lvc_s_f4.

"register the fields which you want custom input help for
ls_fields_f4-fieldname = 'SEATSMAX_F'.
ls_fields_f4-register = 'X'.
APPEND ls_fields_f4 TO lt_fields_f4.

CALL METHOD g_alv_grid_ref-&amp;gt;register_f4_for_fields
    EXPORTING
      it_f4 = lt_fields_f4.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;- finally display your ALV&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD g_alv_grid_ref-&amp;gt;set_table_for_first_display ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 13:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109853#M1509548</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-07-21T13:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value help in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109854#M1509549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for explaining so well. I could implement a dynamic value help with this. But now when I try to select a value from the list and show it on the field in the UI that part does not work. What should be done for that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 13:36:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109854#M1509549</guid>
      <dc:creator>former_member46308</dc:creator>
      <dc:date>2010-07-22T13:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value help in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109855#M1509550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marchin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the example and explanation.&lt;/P&gt;&lt;P&gt;Dynamic value help is available but i am not able to retreive f4 value to the UI. (Not able to select value from f4 help sub screen)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Viral Patel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viral Patel on Jul 26, 2010 6:16 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viral Patel on Jul 26, 2010 6:18 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jul 2010 04:16:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109855#M1509550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-26T04:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value help in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109856#M1509551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Viral,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order you could select the value and pass it back to ALV you need that fied editable. Otherwise it is read-only so you not able to place there new value. So in your fieldcatalog set option &lt;STRONG&gt;edit = 'X'&lt;/STRONG&gt; for that particular column you want F4 for. This should work.&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>Mon, 26 Jul 2010 07:11:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109856#M1509551</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-07-26T07:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value help in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109857#M1509552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcin for valuable help and support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Viral&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viral Patel on Jul 28, 2010 9:28 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jul 2010 07:27:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-value-help-in-alv/m-p/7109857#M1509552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-28T07:27:59Z</dc:date>
    </item>
  </channel>
</rss>

