<?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: Function module:F4IF_INT_TABLE_VALUE_REQUEST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690601#M1102598</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;PRE&gt;&lt;CODE&gt;
*-----------------------------------------------------------------------
* Initialization
*-----------------------------------------------------------------------
INITIALIZATION.
  v_repid = sy-repid.
  PERFORM get_period.
*-----------------------------------------------------------------------
* At Selection Screen output
*-----------------------------------------------------------------------
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_dcode-low.
  PERFORM get_f4help_for_depcode USING 'S_DCODE-LOW'.      "&amp;lt;------
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_dcode-high.
  PERFORM get_f4help_for_depcode USING 'S_DCODE-HIGH'.      "&amp;lt;------
 
*-----------------------------------------------------------------------
* At Selection Screen
*-----------------------------------------------------------------------
AT SELECTION-SCREEN.
  PERFORM validate_selscr_values.
 
FORM get_f4help_for_depcode using FIELD .      "&amp;lt;------
 
  TYPES:BEGIN OF t_decode,
        depcode TYPE /irm/ip_depcode,
        descr   TYPE /irm/gdescr,
        END OF t_decode.

  DATA:it_decode TYPE STANDARD TABLE OF t_decode.
* DATA:wa_detcode TYPE t_decode.

  REFRESH:it_decode.

  SELECT depcode descr FROM /irm/tipdcdt INTO TABLE it_decode
                                         WHERE spras = 'E'
                                         AND depcode LIKE 'C%'.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'DEPCODE'
      dynpprog        = sy-cprog     "&amp;lt;------
      dynpnr          = '1000'      "&amp;lt;------
      dynprofield     = FIELD     "&amp;lt;------
      value_org       = 'S'
    TABLES
      value_tab       = it_decode
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

  IF sy-subrc  0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
 
ENDFORM.                    " GET_F4HELP_FOR_DEPCODE
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2008 06:49:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-11T06:49:21Z</dc:date>
    <item>
      <title>Function module:F4IF_INT_TABLE_VALUE_REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690595#M1102592</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 used the function module F4IF_INT_TABLE_VALUE_REQUEST and get the F4 help for S_DECODE-LOW and S_DECODE-HIGH. And when i am selecting the value on the selection screen of F4 help it is not populating the value to the S_DECODE-LOW and S_DECODE-HIGH (Selection screen fields).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*-----------------------------------------------------------------------
* Initialization
*-----------------------------------------------------------------------
INITIALIZATION.
  v_repid = sy-repid.
  PERFORM get_period.
*-----------------------------------------------------------------------
* At Selection Screen output
*-----------------------------------------------------------------------
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_dcode-low.
  PERFORM get_f4help_for_depcode.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_dcode-high.
  PERFORM get_f4help_for_depcode.

*-----------------------------------------------------------------------
* At Selection Screen
*-----------------------------------------------------------------------
AT SELECTION-SCREEN.
  PERFORM validate_selscr_values.

FORM get_f4help_for_depcode .

  TYPES:BEGIN OF t_decode,
        depcode TYPE /irm/ip_depcode,
        descr   TYPE /irm/gdescr,
        END OF t_decode.
  DATA:it_decode TYPE STANDARD TABLE OF t_decode.
* DATA:wa_detcode TYPE t_decode.
  REFRESH:it_decode.
  SELECT depcode descr FROM /irm/tipdcdt INTO TABLE it_decode
                                         WHERE spras = 'E'
                                         AND depcode LIKE 'C%'.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'DEPCODE'
      value_org       = 'S'
    TABLES
      value_tab       = it_decode
    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.
  ENDIF.

ENDFORM.                    " GET_F4HELP_FOR_DEPCODE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my code. Where did i make a mistake? Could you please help me in this regard?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 17:17:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690595#M1102592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T17:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Function module:F4IF_INT_TABLE_VALUE_REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690596#M1102593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after selecting the value from popup, the selected value will be stored in return table, read that table and populate the select options manually.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 17:26:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690596#M1102593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T17:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Function module:F4IF_INT_TABLE_VALUE_REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690597#M1102594</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;Please add following &lt;STRONG&gt;exporting attributes&lt;/STRONG&gt; in your function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dynpprog        = sy-repid&lt;/P&gt;&lt;P&gt;      dynpnr          = sy-dynnr&lt;/P&gt;&lt;P&gt;      dynprofield     = 'S_DCODE'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 05:52:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690597#M1102594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T05:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Function module:F4IF_INT_TABLE_VALUE_REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690598#M1102595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after selection the selected values comes in return table and from there u read value from value_tab and populate the appropriate selection screen field.&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;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 05:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690598#M1102595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T05:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Function module:F4IF_INT_TABLE_VALUE_REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690599#M1102596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have to pass and internal table to the return_tab in the importing parameters, which stores the value what we have selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please look into the below code it will give you an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : BEGIN OF IT_KNA1 OCCURS 0,
          KUNNR LIKE KNA1-KUNNR,
          NAME1 LIKE KNA1-NAME1,
          NAME2 LIKE KNA1-NAME2,
          NAME3 TYPE CHAR80,
       END OF IT_KNA1.

DATA : IT_RETURN LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.

PARAMETERS : P_OWNER TYPE CHAR80.



AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_OWNER.


  SELECT KUNNR
         NAME1
         NAME2
         FROM KNA1 INTO TABLE IT_KNA1
         UP TO 20 ROWS.

  LOOP AT IT_KNA1.
    CONCATENATE IT_KNA1-NAME2 ',' IT_KNA1-NAME1 INTO IT_KNA1-NAME3.
    MODIFY IT_KNA1.
    CLEAR IT_KNA1.
  ENDLOOP.
  

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD               = 'KUNNR'
      DYNPPROG               = SY-REPID
      DYNPROFIELD            = 'P_OWNER'
*    VALUE                  = ' '
      VALUE_ORG              = 'S'
*    MULTIPLE_CHOICE        = ' '
*    DISPLAY                = ' '
     CALLBACK_PROGRAM       = SY-REPID
*    CALLBACK_FORM          = ' '
*    MARK_TAB               =
*  IMPORTING
*    USER_RESET             =
    TABLES
      VALUE_TAB              = IT_KNA1[]
*    FIELD_TAB              =
     RETURN_TAB             = IT_RETURN[]
*    DYNPFLD_MAPPING        =
   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.
  ENDIF.

  READ TABLE IT_RETURN INDEX 1.
  WRITE : IT_RETURN-FIELDVAL TO P_OWNER.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Kumar M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 06:03:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690599#M1102596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T06:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Function module:F4IF_INT_TABLE_VALUE_REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690600#M1102597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow Chetan's reply with a small correction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please add following exporting attributes in your function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dynpprog = sy-repid&lt;/P&gt;&lt;P&gt;dynpnr = sy-dynnr&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;dynprofield = 'S_DCODE'&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;dynprofield = 'S_DCODE-LOW'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you will think that you will have to create two subroutines for same search help. Answer is NO.&lt;/P&gt;&lt;P&gt;pass the &lt;STRONG&gt;field name&lt;/STRONG&gt; to the search help subroutine and use them in the FM sothing like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM srch_hlp using fld_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION F4_IF...........&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt;     dynprofield = FLD_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prakash Pandey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 06:42:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690600#M1102597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T06:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Function module:F4IF_INT_TABLE_VALUE_REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690601#M1102598</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;PRE&gt;&lt;CODE&gt;
*-----------------------------------------------------------------------
* Initialization
*-----------------------------------------------------------------------
INITIALIZATION.
  v_repid = sy-repid.
  PERFORM get_period.
*-----------------------------------------------------------------------
* At Selection Screen output
*-----------------------------------------------------------------------
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_dcode-low.
  PERFORM get_f4help_for_depcode USING 'S_DCODE-LOW'.      "&amp;lt;------
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_dcode-high.
  PERFORM get_f4help_for_depcode USING 'S_DCODE-HIGH'.      "&amp;lt;------
 
*-----------------------------------------------------------------------
* At Selection Screen
*-----------------------------------------------------------------------
AT SELECTION-SCREEN.
  PERFORM validate_selscr_values.
 
FORM get_f4help_for_depcode using FIELD .      "&amp;lt;------
 
  TYPES:BEGIN OF t_decode,
        depcode TYPE /irm/ip_depcode,
        descr   TYPE /irm/gdescr,
        END OF t_decode.

  DATA:it_decode TYPE STANDARD TABLE OF t_decode.
* DATA:wa_detcode TYPE t_decode.

  REFRESH:it_decode.

  SELECT depcode descr FROM /irm/tipdcdt INTO TABLE it_decode
                                         WHERE spras = 'E'
                                         AND depcode LIKE 'C%'.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'DEPCODE'
      dynpprog        = sy-cprog     "&amp;lt;------
      dynpnr          = '1000'      "&amp;lt;------
      dynprofield     = FIELD     "&amp;lt;------
      value_org       = 'S'
    TABLES
      value_tab       = it_decode
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

  IF sy-subrc  0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
 
ENDFORM.                    " GET_F4HELP_FOR_DEPCODE
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 06:49:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-f4if-int-table-value-request/m-p/4690601#M1102598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T06:49:21Z</dc:date>
    </item>
  </channel>
</rss>

