<?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 for function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-for-function-module/m-p/5579710#M1272565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes you can do that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in side the source code ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write the select statement according to requirement and pass the internal table to below function moduel and return field to yor help field..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call the below  fm inside the function module..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'POPUP_WITH_TABLE_DISPLAY'   or   'REUSE_ALV_POPUP_TO_SELECT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the sample code...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION Z_MFG_PLANTS_F4 .
"----------------------------------------------------------------------
"*"Local Interface:
"  IMPORTING
"     REFERENCE(W_WERKS) TYPE WERKS OPTIONAL
"  IMPORTING
"      REFERENCE(W_MATNR)    TYPE MANTR OPTIONAL
"----------------------------------------------------------------------


* Alv popup display
DATA : gc_selfield     TYPE slis_selfield,
       gt_fieldcat_drd TYPE slis_t_fieldcat_alv WITH HEADER LINE.

p_werks = W_WERKS.

data : begin of t_marc occurs 0,
            werks type werks,
            matnr type matnr,
        end of t_marc

select matnr werks from marc into table t_marc where werks = p_werks.

  IF t_disp[] IS NOT INITIAL.

  gt_fieldcat_drd-seltext_m = 'Material'.
  gt_fieldcat_drd-fieldname = 'MATNR'.
  APPEND gt_fieldcat_drd.
  CLEAR : gt_fieldcat_drd.

  gt_fieldcat_drd-seltext_m = 'WERKS'.
  gt_fieldcat_drd-fieldname = ''WERKS'.
  APPEND gt_fieldcat_drd.
  CLEAR : gt_fieldcat_drd.


* Allow the user to select the required plant
  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title               = 'Material Selection for Plant'
      i_selection           = 'X'
      i_screen_start_column = 5
      i_screen_start_line   = 5
      i_screen_end_column   = 70
      i_screen_end_line     = 20
      i_tabname             = 'T_MARC'
      it_fieldcat           = gt_fieldcat_drd[]
    IMPORTING
      es_selfield           = gc_selfield
    TABLES
      t_outtab              = t_MARC
    EXCEPTIONS
      program_error         = 1
      OTHERS                = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
  ENDIF.

  READ TABLE t_MARC INDEX gc_selfield-tabindex.
  IF sy-subrc = 0.
        w_matnr = t_matnr-matnr.
  ENDIF.

ENDIF.



ENDFUNCTION.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Prabhu Das on May 21, 2009 7:35 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2009 13:53:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-21T13:53:28Z</dc:date>
    <item>
      <title>F4 help for function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-for-function-module/m-p/5579709#M1272564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to place F4 help for the function module import parameter like If we excute the FM from se37 the input box should need the F4 help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if possible , let me know the sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-for-function-module/m-p/5579709#M1272564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help for function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-for-function-module/m-p/5579710#M1272565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes you can do that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in side the source code ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write the select statement according to requirement and pass the internal table to below function moduel and return field to yor help field..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call the below  fm inside the function module..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'POPUP_WITH_TABLE_DISPLAY'   or   'REUSE_ALV_POPUP_TO_SELECT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the sample code...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION Z_MFG_PLANTS_F4 .
"----------------------------------------------------------------------
"*"Local Interface:
"  IMPORTING
"     REFERENCE(W_WERKS) TYPE WERKS OPTIONAL
"  IMPORTING
"      REFERENCE(W_MATNR)    TYPE MANTR OPTIONAL
"----------------------------------------------------------------------


* Alv popup display
DATA : gc_selfield     TYPE slis_selfield,
       gt_fieldcat_drd TYPE slis_t_fieldcat_alv WITH HEADER LINE.

p_werks = W_WERKS.

data : begin of t_marc occurs 0,
            werks type werks,
            matnr type matnr,
        end of t_marc

select matnr werks from marc into table t_marc where werks = p_werks.

  IF t_disp[] IS NOT INITIAL.

  gt_fieldcat_drd-seltext_m = 'Material'.
  gt_fieldcat_drd-fieldname = 'MATNR'.
  APPEND gt_fieldcat_drd.
  CLEAR : gt_fieldcat_drd.

  gt_fieldcat_drd-seltext_m = 'WERKS'.
  gt_fieldcat_drd-fieldname = ''WERKS'.
  APPEND gt_fieldcat_drd.
  CLEAR : gt_fieldcat_drd.


* Allow the user to select the required plant
  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title               = 'Material Selection for Plant'
      i_selection           = 'X'
      i_screen_start_column = 5
      i_screen_start_line   = 5
      i_screen_end_column   = 70
      i_screen_end_line     = 20
      i_tabname             = 'T_MARC'
      it_fieldcat           = gt_fieldcat_drd[]
    IMPORTING
      es_selfield           = gc_selfield
    TABLES
      t_outtab              = t_MARC
    EXCEPTIONS
      program_error         = 1
      OTHERS                = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
  ENDIF.

  READ TABLE t_MARC INDEX gc_selfield-tabindex.
  IF sy-subrc = 0.
        w_matnr = t_matnr-matnr.
  ENDIF.

ENDIF.



ENDFUNCTION.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Prabhu Das on May 21, 2009 7:35 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:53:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-for-function-module/m-p/5579710#M1272565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:53:28Z</dc:date>
    </item>
  </channel>
</rss>

