<?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 help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595416#M865813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just read the original table which is passed to the Function module with the value you get for the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check sample code what have done.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if i_zhrpat_contrtyp1[] is initial.
* Select all Contract type1 texts
    select  *
     from  zhrpat_contrtyp1
     into corresponding fields of table li_zhrpat_contrtyp1.
* Select only contract type1 values available based on the PERSK PERSG of the employee.
    select  zhrpae_contrtyp1
      from  zhrpat_it0016
      into  corresponding fields of table i_zhrpat_it0016_g
      where persk  =  p0001-persk
        and persg  =  p0001-persg
        and begda  le sy-datum
        and endda  ge sy-datum.
    if i_zhrpat_it0016_g[] is not initial.
      delete adjacent duplicates from i_zhrpat_it0016_g.
      loop at i_zhrpat_it0016_g into w_zhrpat_it0016_g.
        read table li_zhrpat_contrtyp1 into w_zhrpat_contrtyp1 with key zhrpae_contrtyp = w_zhrpat_it0016_g-zhrpae_contrtyp1.
        if sy-subrc = 0.
          append w_zhrpat_contrtyp1 to i_zhrpat_contrtyp1.
          clear  w_zhrpat_contrtyp1.
        endif.
      endloop.
    endif.
  endif.

  g_progname  = 'MP001600'.
  g_scr_num   = '2000'.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield        = 'ZHRPAE_CONTRTYP'
      dynpprog        = g_progname
      dynpnr          = g_scr_num
      dynprofield     = 'P0016-ZZ_CONTR_TYP'
      value_org       = 'S'
    tables
      value_tab       = i_zhrpat_contrtyp1
      return_tab      = i_ret_values
    exceptions
      parameter_error = 1
      no_values_found = 2
      others          = 3.
  if sy-subrc &amp;lt;&amp;gt; 0.
    message id sy-msgid type sy-msgty number sy-msgno
      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  else .

    read table i_ret_values into w_ret_values index 1.
    p0016-zz_contr_typ = w_ret_values-fieldval.

    read table i_zhrpat_contrtyp1  into w_zhrpat_contrtyp1 with key zhrpae_contrtyp = p0016-zz_contr_typ.
    if sy-subrc = 0.
      g_contrtype1_txt = w_zhrpat_contrtyp1-zhrpae_ctyp_desc.
    endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Venkat.O&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2008 06:28:44 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2008-03-20T06:28:44Z</dc:date>
    <item>
      <title>F4 help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595409#M865806</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;This is regarding F4 help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am passing internal table to FM F4IF_INT_TABLE_VALUE_REQUEST to display F4 help. Internal table has 4 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In parameter retfield  i am passing name of column to be selected from F4 popup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In returning table return_tab, i only get value for field i have mentioned in retfield. &lt;/P&gt;&lt;P&gt;My requiernment is , i want full row with all 4 colunms in return table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is very urgent. How to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full points will be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 04:07:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595409#M865806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T04:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595410#M865807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this below example it will help u.&lt;/P&gt;&lt;P&gt;PARAMETERS:&lt;/P&gt;&lt;P&gt;           p_senkey TYPE zsession_key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**F4 help for&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_senkey.&lt;/P&gt;&lt;P&gt;  PERFORM f0012_sh_on_s_session  CHANGING p_senkey.&lt;/P&gt;&lt;P&gt;FORM f0012_sh_on_s_session  CHANGING p_senkey TYPE any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH : i_seskey, i_ddshretval.&lt;/P&gt;&lt;P&gt;  CLEAR:wa_seskey.&lt;/P&gt;&lt;P&gt;  SELECT template_id        " #CCE No deletion Flag&lt;/P&gt;&lt;P&gt;         version&lt;/P&gt;&lt;P&gt;         session_key&lt;/P&gt;&lt;P&gt;         lock_date&lt;/P&gt;&lt;P&gt;         success&lt;/P&gt;&lt;P&gt;         unlock_date&lt;/P&gt;&lt;P&gt;  FROM zfact_maint_jlog INTO wa_seskey.&lt;/P&gt;&lt;P&gt;    APPEND wa_seskey TO i_seskey.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DDIC_STRUCTURE         = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      retfield               = 'SESSION_KEY'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PVALKEY                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     dynpprog               = sy-repid&lt;/P&gt;&lt;P&gt;     dynpnr                 = sy-dynnr&lt;/P&gt;&lt;P&gt;     dynprofield            = 'P_SENKEY'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    STEPL                  = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     window_title           = 'SESSION KEY'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    VALUE                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     value_org              = 'S'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    MULTIPLE_CHOICE        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DISPLAY                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CALLBACK_PROGRAM       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CALLBACK_FORM          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    MARK_TAB               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    USER_RESET             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      value_tab              = i_seskey&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FIELD_TAB              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     return_tab             = i_ddshretval.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DYNPFLD_MAPPING        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PARAMETER_ERROR        = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NO_VALUES_FOUND        = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OTHERS                 = 3.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.                                         "#EC *&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    CLEAR wa_ddshretval.&lt;/P&gt;&lt;P&gt;    READ TABLE  i_ddshretval INTO wa_ddshretval INDEX 1.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      p_senkey = wa_ddshretval-fieldval.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f0013_sh_on_s_session&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 04:15:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595410#M865807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T04:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595411#M865808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      retfield    = 'POSNR'&lt;/P&gt;&lt;P&gt;      dynpprog    = wf_dyn&lt;/P&gt;&lt;P&gt;      dynpnr      = wf_dynnum&lt;/P&gt;&lt;P&gt;      dynprofield = 'S_POSNR'&lt;/P&gt;&lt;P&gt;      value_org   = 'S'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      value_tab   = int_helptab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; int_helptab is the internal table containing all the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 04:16:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595411#M865808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T04:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595412#M865809</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;Better you created collective search help............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful...............&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 04:19:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595412#M865809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T04:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595413#M865810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;int_helptab  will have only POSNR value. I want values of full row selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 04:34:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595413#M865810</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T04:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595414#M865811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to keep pass the primary key field of internal table to that function module. After execute of that function module, the return_tab contains the value selected by the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then read that internal table by checking that field value is equal to return_tab value.So that you can get the entire row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 05:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595414#M865811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T05:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595415#M865812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get the value of the field in the field 'FIELDVAl' of return tab. then you can just read the original table with this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie, Read table &amp;lt;ITAB&amp;gt; into  &amp;lt;WA&amp;gt; with key POSNR = returntab-fieldval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then this &amp;lt;WA&amp;gt; conatins the corresponding row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 05:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595415#M865812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T05:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595416#M865813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just read the original table which is passed to the Function module with the value you get for the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check sample code what have done.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if i_zhrpat_contrtyp1[] is initial.
* Select all Contract type1 texts
    select  *
     from  zhrpat_contrtyp1
     into corresponding fields of table li_zhrpat_contrtyp1.
* Select only contract type1 values available based on the PERSK PERSG of the employee.
    select  zhrpae_contrtyp1
      from  zhrpat_it0016
      into  corresponding fields of table i_zhrpat_it0016_g
      where persk  =  p0001-persk
        and persg  =  p0001-persg
        and begda  le sy-datum
        and endda  ge sy-datum.
    if i_zhrpat_it0016_g[] is not initial.
      delete adjacent duplicates from i_zhrpat_it0016_g.
      loop at i_zhrpat_it0016_g into w_zhrpat_it0016_g.
        read table li_zhrpat_contrtyp1 into w_zhrpat_contrtyp1 with key zhrpae_contrtyp = w_zhrpat_it0016_g-zhrpae_contrtyp1.
        if sy-subrc = 0.
          append w_zhrpat_contrtyp1 to i_zhrpat_contrtyp1.
          clear  w_zhrpat_contrtyp1.
        endif.
      endloop.
    endif.
  endif.

  g_progname  = 'MP001600'.
  g_scr_num   = '2000'.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield        = 'ZHRPAE_CONTRTYP'
      dynpprog        = g_progname
      dynpnr          = g_scr_num
      dynprofield     = 'P0016-ZZ_CONTR_TYP'
      value_org       = 'S'
    tables
      value_tab       = i_zhrpat_contrtyp1
      return_tab      = i_ret_values
    exceptions
      parameter_error = 1
      no_values_found = 2
      others          = 3.
  if sy-subrc &amp;lt;&amp;gt; 0.
    message id sy-msgid type sy-msgty number sy-msgno
      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  else .

    read table i_ret_values into w_ret_values index 1.
    p0016-zz_contr_typ = w_ret_values-fieldval.

    read table i_zhrpat_contrtyp1  into w_zhrpat_contrtyp1 with key zhrpae_contrtyp = p0016-zz_contr_typ.
    if sy-subrc = 0.
      g_contrtype1_txt = w_zhrpat_contrtyp1-zhrpae_ctyp_desc.
    endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Venkat.O&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 06:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help/m-p/3595416#M865813</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-03-20T06:28:44Z</dc:date>
    </item>
  </channel>
</rss>

