<?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 hard coding f4 help values in select options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910048#M1146311</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 have requirement to hardcode certain values in the select-options in the selection-screen as F4 help . how to do it please help me out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Dec 2008 12:49:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-18T12:49:46Z</dc:date>
    <item>
      <title>hard coding f4 help values in select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910048#M1146311</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 have requirement to hardcode certain values in the select-options in the selection-screen as F4 help . how to do it please help me out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 12:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910048#M1146311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-18T12:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding f4 help values in select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910049#M1146312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     U can make z table and put all those entries in that table which u want as hard coded...  then fetch value from that table and provide that to f4 help FM thru internal table..&lt;/P&gt;&lt;P&gt;try this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 12:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910049#M1146312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-18T12:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding f4 help values in select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910050#M1146313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Dear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better create a LIst Box on selection screen.&lt;/P&gt;&lt;P&gt; Below is the piece of code to create List box.&lt;/P&gt;&lt;P&gt;TYPE-POOLS: vrm.&lt;/P&gt;&lt;P&gt;DATA: name TYPE vrm_id,&lt;/P&gt;&lt;P&gt;list TYPE vrm_values,&lt;/P&gt;&lt;P&gt;value LIKE LINE OF list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;name = 'PS_PARM'.&lt;/P&gt;&lt;P&gt;value-key = '1'.&lt;/P&gt;&lt;P&gt;value-text = 'Text 1'.&lt;/P&gt;&lt;P&gt;APPEND value TO list.&lt;/P&gt;&lt;P&gt;value-key = '2'.&lt;/P&gt;&lt;P&gt;value-text = 'Text 2'.&lt;/P&gt;&lt;P&gt;APPEND value TO list.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'VRM_SET_VALUES'&lt;/P&gt;&lt;P&gt;EXPORTING id = name&lt;/P&gt;&lt;P&gt;values = list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Piyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 13:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910050#M1146313</guid>
      <dc:creator>piyush_mathur</dc:creator>
      <dc:date>2008-12-18T13:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding f4 help values in select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910051#M1146314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any example would do it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 13:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910051#M1146314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-18T13:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: hard coding f4 help values in select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910052#M1146315</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;Plz try this code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA:
      v_fname        TYPE fieldname,
      v_dynfield     TYPE dynfnam,
      v_fname01      TYPE fieldname,
      v_dynfield01   TYPE dynfnam.

CONSTANTS:
 c_fname01    TYPE fieldname VALUE 'S_LOKKT-LOW',
 c_fname02    TYPE fieldname VALUE 'S_LOKKT-HIGH',
 c_dynfield01 TYPE dynfnam   VALUE  'S_LOKKT-LOW',
 c_dynfield02 TYPE dynfnam   VALUE  'S_LOKKT-HIGH'.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lokkt-low.
  v_fname    = c_fname01.
  v_dynfield = c_dynfield01.

  PERFORM f_get_help 
  USING v_fname
             v_dynfield.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lokkt-high.

  v_fname01    = c_fname02.
  v_dynfield01 = c_dynfield02.

  PERFORM f_get_help 
  USING v_fname01
             v_dynfield01.

FORM f_get_help USING fp_v_fname    TYPE fieldname
                      fp_v_dynfield TYPE dynfnam.

TYPES: 
BEGIN OF ty_f4_tab,
  data type char2,                
END OF ty_f4_tab.  

DATA:
l_it_return TYPE STANDARD TABLE OF ddshretval,
l_wa_return TYPE ddshretval,
l_it_f4_tab TYPE STANDARD TABLE OF ty_f4_tab,
l_wa_f4_tab TYPE ty_f4_tab,
l_v_program TYPE sy-repid,
l_v_dynnr   TYPE sy-dynnr.

CONSTANTS: c_s    TYPE char1 VALUE 'S'.

* Populate the hardcoded values here
l_wa_f4_tab-data = 'AA'.
APPEND l_wa_f4_tab TO l_it_f4_tab.

l_wa_f4_tab-data = 'AB'.
APPEND l_wa_f4_tab TO l_it_f4_tab.

l_wa_f4_tab-data = 'AC'.
APPEND l_wa_f4_tab TO l_it_f4_tab.

l_wa_f4_tab-data = 'AD'.
APPEND l_wa_f4_tab TO l_it_f4_tab.

  l_v_program = sy-repid.
  l_v_dynnr   = sy-dynnr.

*Function module used to display F4 help in the selection-screen
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = fp_v_fname
      dynpprog        = l_v_program
      dynpnr          = l_v_dynnr
      dynprofield     = fp_v_dynfield
      value_org       = c_s
    TABLES
      value_tab       = l_it_f4_tab
      return_tab      = l_it_return
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

  IF sy-subrc NE 0.

    CLEAR l_it_f4_tab.

  ELSE.

    READ TABLE l_it_return INTO l_wa_return INDEX 1.
    IF sy-subrc = 0.
      fp_v_fname =  l_wa_return-fieldval.
    ENDIF.

  ENDIF.

ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Dec 18, 2008 2:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 13:13:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hard-coding-f4-help-values-in-select-options/m-p/4910052#M1146315</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-12-18T13:13:02Z</dc:date>
    </item>
  </channel>
</rss>

