Skip to Content
avatar image
Former Member

use of F4IF_FIELD_VALUE_REQUEST

Hello all

Can any one tell to use this FM 'F4IF_FIELD_VALUE_REQUEST' to get serch help i am giving valus.

DDIC Table - yvmi_cust_stock

field name - yvmi_cust_stock-matnr

screen field name - yvmi_cust_stock-matnr

in this FM

F4IF_FIELD_VALUE_REQUEST

what parameter will take, i have taken

DATA: BEGIN OF itab2 OCCURS 0,

matnr LIKE yvmi_cust_stock-matnr,

END OF itab2.

select matnr from yvmi_cust_stock into table itab2.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'.

EXPORTING

tabname = 'YVMI_CUST_STOCK'

fieldname = 'MATNR'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'YVMI_CUST_STOCK-MATNR'

but how i will get the value of itab2 in screen field as search help.

if i am using like above example. i am getting all values of other tables also.

Plese help to solv this Problem.

with Regards.

Rajesh.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Sep 04, 2006 at 06:26 AM

    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'.

    EXPORTING

    tabname = <b>itab2</b>

    fieldname = 'MATNR'

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'YVMI_CUST_STOCK-MATNR'

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear Kishna,

      i have don this but it giving Dump.

      001170

      > CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

      001190 EXPORTING

      001200 tabname = itab2 "'YVMI_CUST_STOCK'

      001210 fieldname = 'MATNR' "'YVMI_CUST_STOCK-M

      001220 * SEARCHHELP = 'YVMI_material'

      001230 * SHLPPARAM = ' '

      001240 DYNPPROG = SY-REPID

      001250 DYNPNR = SY-DYNNR

      001260 DYNPROFIELD = 'YVMI_CUST_STOCK-MATNR'

      001270 * STEPL = 0

      001280 * VALUE = ' '

      Plese solv this Prob.

      its urgent

      Rajesh

  • avatar image
    Former Member
    Sep 04, 2006 at 06:40 AM

    hi

    good

    here i am giving the details about this functiion module you can go through this and implement accodingly in your object

    go through this link,

    http://help.sap.com/saphelp_45b/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm

    parameters :p_pernr like pa0001-pernr MATCHCODE OBJECT new_search.

    If you define like this previous search help is gone.

    You have to create new search help into the dictionary .

    or else .

    parameters :p_pernr like pa0001-pernr

    define like this

    use this event

    AT Selection-screen on p_pernr.

    under this event call this function module and pass required data .

    F4IF_FIELD_VALUE_REQUEST

    • F4 help also returning the value to be displayed in internal table

    F4IF_INT_TABLE_VALUE_REQUEST

    thanks

    mrutyun^

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2006 at 07:03 AM

    Try that way .. may be helpful for u....

    call function 'F4IF_INT_TABLE_VALUE_REQUEST'

    exporting

    retfield = 'MATNR'

    dynprofield = 'YVMI_CUST_STOCK-MATNR'

    dynpprog = sy-cprog

    dynpnr = sy-dynnr

    value_org = 'S'

    tables

    value_tab = ITAB2.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2006 at 08:30 AM

    Hi rajesh,

    <b>F4IF_INT_TABLE_VALUE_REQUEST

    To provide search help, we can use this FM also.</b>

    1. sample code (just copy paste)

    2.

    REPORT ABC.

    *----


    DATA : BEGIN OF ITAB OCCURS 0,

    UNAME LIKE USR01-BNAME,

    END OF ITAB.

    data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .

    data : RETURN_wa LIKE DDSHRETVAL .

    *----


    PARAMETERS : A(12) TYPE C.

    *----


    AT SELECTION-SCREEN ON VALUE-REQUEST FOR A.

    ITAB-UNAME = 'U01'. APPEND ITAB.

    ITAB-UNAME = 'U02'. APPEND ITAB.

    ITAB-UNAME = 'U03'. APPEND ITAB.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    retfield = 'ITAB-UNAME'

    • PVALKEY = ' '

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'A'

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    tables

    value_tab = ITAB

    • FIELD_TAB = FTAB

    RETURN_TAB = return_tab

    • DYNPFLD_MAPPING =

    • EXCEPTIONS

    • PARAMETER_ERROR = 1

    • NO_VALUES_FOUND = 2

    • OTHERS = 3

    .

    break-point.

    regards,

    amit m.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2006 at 11:47 AM

    Hi

    Try out the following code...

    REPORT ZTESTYUP .

    *SELECT-OPTIONS: p_vedin FOR vedin NO INTERVALS.

    PARAMETERS : p_regtyp TYPE char1 .

    *----


    Selection Screen

    Help----


    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_regtyp.

    *-Registration Type

    PERFORM f1000_show_f4help_regtyp .

    &----


    *& Form

    f1000_show_f4help_regtyp&----


    ----


    * Prepair table for List Box ( Field

    *Registration type

    **)----


    FORM f1000_show_f4help_regtyp .

    TYPES: BEGIN OF ty_summary_stat,

    reg_type TYPE char1,

    reg_text TYPE char20,

    END OF ty_summary_stat.

    CONSTANTS : lc_reg_type LIKE dfies-fieldname VALUE 'REG_TYPE',

    lc_pregtyp LIKE help_info-dynprofld VALUE 'P_REGTYP'.

    DATA : lit_summary_in TYPE TABLE OF ty_summary_stat,

    ls_help_input TYPE ty_summary_stat.

    ls_help_input-reg_type = 'l'.

    • Loss & Reg

    ls_help_input-reg_text = 'text-018'.

    APPEND ls_help_input TO lit_summary_in.

    • Standard Process

    ls_help_input-reg_type = 'l'.

    ls_help_input-reg_text = 'text-019'.

    APPEND ls_help_input TO lit_summary_in.

    • Function Module to Call F4 Help

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = lc_reg_type

    dynpprog = sy-repid

    dynpnr = sy-dynnr

    dynprofield = lc_pregtyp

    value_org = 'S'

    TABLES

    value_tab = lit_summary_in

    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. " f1000_show_f4help_regtyp

    Regds

    Karthick

    Message was edited by: karthick gopi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2006 at 11:55 AM

    Hello,

    *&---------------------------------------------------------------------*
    *& Report  ZTEST22                                                     *
    *&                                                                     *
    *&---------------------------------------------------------------------*
    *&                                                                     *
    *&                                                                     *
    *&---------------------------------------------------------------------*
    
    REPORT  ztest22                                 .
    
    DATA: BEGIN OF values1,
     matnr LIKE mara-matnr,
     maktx LIKE makt-maktx,
    END OF values1.
    
    DATA: progname TYPE sy-repid,
    dynnum TYPE sy-dynnr.
    
    DATA: dynpro_values TYPE dynpread OCCURS 1 WITH HEADER LINE,
          field_value LIKE LINE OF dynpro_values.
    
    DATA: values LIKE TABLE OF values1 WITH HEADER LINE.
    
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    
    select-options: s_date for sy-datum.
    
    PARAMETERS: p_matnr LIKE mara-matnr,
                p_makt  LIKE makt-maktx.
    
    SELECTION-SCREEN END OF BLOCK b1.
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_makt.
    
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = progname
          dynumb               = dynnum
        TABLES
          dynpfields           = dynpro_values
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    
      SELECT p~matnr q~maktx INTO
    *CORRESPONDING FIELDS OF
      TABLE values
      FROM ( mara AS p INNER JOIN makt AS q ON p~matnr = q~matnr )
      WHERE p~matnr = dynpro_values-fieldvalue.
    *
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
    * DDIC_STRUCTURE = ''
      retfield = 'MAKTX'
    * PVALKEY = ' '
      dynpprog = progname
      dynpnr = dynnum
      dynprofield = 'P_MAKT'
    * STEPL = 0
    * WINDOW_TITLE =
    * VALUE = ' '
      value_org = 'S'
    * MULTIPLE_CHOICE = ' '
    * DISPLAY = ' '
    * CALLBACK_PROGRAM = ' '
    * CALLBACK_FORM = ' '
      TABLES
      value_tab = values
    * FIELD_TAB =
    * RETURN_TAB =
    * DYNPFLD_MAPPING =
      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.
    

    Regs,

    Venkat Ramanan N

    Add comment
    10|10000 characters needed characters exceeded