<?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: F4 for select options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817503#M349878</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;chk this sample report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest_f4.
 

data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
 
selection-screen begin of block b1 with frame title text-001 .
selection-screen begin of line.
PARAMETERS: P_BUKRS type T001-BUKRS.
selection-screen comment 30(20) BUTXT for field p_bukrs.
selection-screen end of line.
selection-screen end of block b1.
 
at selection-screen output.
 
if butxt is initial.
   select single butxt into butxt
         from t001
        where bukrs = p_bukrs.
endif.
 
 
at selection-screen on value-request for p_bukrs.
 
  call function 'F4IF_FIELD_VALUE_REQUEST'
       exporting
            tabname           = 'T001'
            fieldname         = 'BUKRS'
            dynpprog          = sy-cprog
            dynpnr            = sy-dynnr
            dynprofield       = 'P_BUKRS'
       tables
            return_tab        = return
       exceptions
            field_not_found   = 1
            no_help_for_field = 2
            inconsistent_help = 3
            no_values_found   = 4
            others            = 5.
 
  read table return with key fieldname = 'P_BUKRS'.
 
* Add it back to the dynpro.
  dynfields-fieldname = return-retfield.
  dynfields-fieldvalue =  return-fieldval.
  append dynfields.
 
* Get the company code from db and add to dynpro
  data: xt001 type t001.
 
  clear xt001.
  select single * into xt001
         from t001
        where bukrs = return-fieldval.
 
  dynfields-fieldname = 'BUTXT'.
  dynfields-fieldvalue = xt001-butxt.
  append dynfields.
 
 
* Update the dynpro values.
  call function 'DYNP_VALUES_UPDATE'
       exporting
            dyname     = sy-cprog
            dynumb     = sy-dynnr
       tables
            dynpfields = dynfields
       exceptions
            others     = 8.
 
start-of-selection.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Jan 2007 05:47:57 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2007-01-31T05:47:57Z</dc:date>
    <item>
      <title>F4 for select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817498#M349873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SDN's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a filed on the selection screen of a report,which is customised data element.&lt;/P&gt;&lt;P&gt;How do i activate the F4 for that field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pratyusha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:37:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817498#M349873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: F4 for select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817499#M349874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which data you want to display in F4... is it from a standard table field? or you want your own FIXED data to be displayed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:40:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817499#M349874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: F4 for select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817500#M349875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Return dynpro values 


The following code shows the syntax of the FM 'DYNP_VALUES_UPDATE'. 

 
*Internal table to store dy dynpro fields and values

DATA: dynpfields  LIKE dynpread OCCURS 5 WITH HEADER LINE.
DATA: l_stepl     LIKE  sy-stepl.


REFRESH dynpfields.
CLEAR   dynpfields.
dynpfields-fieldname  = 'SCREENFIELD1-COL1'. "Screen field name
dynpfields-fieldvalue = 10.                  "New value
dynpfields-stepl      = l_stepl.             "Step loop for table controls
APPEND dynpfields.

CALL FUNCTION 'DYNP_VALUES_UPDATE'
  EXPORTING
    dyname     = 'SAPLBDT_GMGR'   "Program name 
    dynumb     = '0270'           "Screen number
  TABLES
    dynpfields = dynpfields
  EXCEPTIONS
    OTHERS     = 0.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to create ur own values from a table&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;F4IF_INT_TABLE_VALUE_REQUEST&amp;lt;/b&amp;gt; Display internal table as search help (documented in SAP) &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817500#M349875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: F4 for select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817501#M349876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Hi make sure that the object that you use after SELECT-OPTIONS: obj for var1 is typed properly. Either type it to a table filed for which there is a search help assignment or type it to a dataelement whose domain has a value table. Else you can directly use MATCH CODE OBJECT with a search help if you what search help can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:42:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817501#M349876</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-01-31T05:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: F4 for select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817502#M349877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT-OPTIONS : S_PTYPE FOR ztab-ptype.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;at selection-screen on value-request for S_PTYPE-low.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*code for dynamic f4 help.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;at selection-screen on value-request for S_PTYPE-high.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*code for dynamic f4 help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:47:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817502#M349877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-31T05:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: F4 for select options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817503#M349878</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;chk this sample report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest_f4.
 

data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
 
selection-screen begin of block b1 with frame title text-001 .
selection-screen begin of line.
PARAMETERS: P_BUKRS type T001-BUKRS.
selection-screen comment 30(20) BUTXT for field p_bukrs.
selection-screen end of line.
selection-screen end of block b1.
 
at selection-screen output.
 
if butxt is initial.
   select single butxt into butxt
         from t001
        where bukrs = p_bukrs.
endif.
 
 
at selection-screen on value-request for p_bukrs.
 
  call function 'F4IF_FIELD_VALUE_REQUEST'
       exporting
            tabname           = 'T001'
            fieldname         = 'BUKRS'
            dynpprog          = sy-cprog
            dynpnr            = sy-dynnr
            dynprofield       = 'P_BUKRS'
       tables
            return_tab        = return
       exceptions
            field_not_found   = 1
            no_help_for_field = 2
            inconsistent_help = 3
            no_values_found   = 4
            others            = 5.
 
  read table return with key fieldname = 'P_BUKRS'.
 
* Add it back to the dynpro.
  dynfields-fieldname = return-retfield.
  dynfields-fieldvalue =  return-fieldval.
  append dynfields.
 
* Get the company code from db and add to dynpro
  data: xt001 type t001.
 
  clear xt001.
  select single * into xt001
         from t001
        where bukrs = return-fieldval.
 
  dynfields-fieldname = 'BUTXT'.
  dynfields-fieldvalue = xt001-butxt.
  append dynfields.
 
 
* Update the dynpro values.
  call function 'DYNP_VALUES_UPDATE'
       exporting
            dyname     = sy-cprog
            dynumb     = sy-dynnr
       tables
            dynpfields = dynfields
       exceptions
            others     = 8.
 
start-of-selection.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2007 05:47:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-for-select-options/m-p/1817503#M349878</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-01-31T05:47:57Z</dc:date>
    </item>
  </channel>
</rss>

