Skip to Content
author's profile photo Former Member
Former Member

Pls explain the FM

I' ve to add F4 functionality to an already existing field.

I want to know what all parameters do i need to fill in the Function Module 'F4IF_INT_TABLE_VALUE_REQUEST'. Pls explain me as how this works with an e.g.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 07:08 AM

    Chk the function module documentation in SE37 for this function.

    You can also see the optional/mandatory parameters in the parameter interface.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 07:15 AM

    Hi Sethi,

    Check this code,

    SELECT-OPTIONS: s_date FOR mceks-buper NO-EXTENSION.

    PERFORM f1100_get_low_date CHANGING s_date-low.

    *Local variable declaration

    DATA: li_ret_tab TYPE STANDARD TABLE OF ddshretval,

    lwa_ret_tab LIKE LINE OF li_ret_tab.

    *Functional Module to provide F4 help

    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

    EXPORTING

    tabname = ' '

    fieldname = ' '

    searchhelp = 'BU_DATE_CHAR'

    TABLES

    return_tab = li_ret_tab

    EXCEPTIONS

    field_not_found = 1

    no_help_for_field = 2

    inconsistent_help = 3

    no_values_found = 4

    OTHERS = 5.

    IF sy-subrc IS INITIAL.

    READ TABLE li_ret_tab INTO lwa_ret_tab INDEX 1.

    IF sy-subrc IS INITIAL.

    CONCATENATE lwa_ret_tab-fieldval6(4) lwa_ret_tab-fieldval3(2)

    INTO s_date-low.

    ENDIF.

    ENDIF.

    Regards,

    Sheron

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2007 at 07:16 AM

    Hi,

    F4IF_INT_TABLE_VALUE_REQUEST

    This function module displays a value list that you created in an ABAP program. The value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.

    check the code

    REPORT DEMO_DYNPRO_F4_HELP_MODULE.

    TYPES: BEGIN OF VALUES,

    CARRID TYPE SPFLI-CARRID,

    CONNID TYPE SPFLI-CONNID,

    END OF VALUES.

    DATA: CARRIER(3) TYPE C,

    CONNECTION(4) TYPE C.

    DATA: PROGNAME LIKE SY-REPID,

    DYNNUM LIKE SY-DYNNR,

    DYNPRO_VALUES TYPE TABLE OF DYNPREAD,

    FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,

    VALUES_TAB TYPE TABLE OF VALUES.

    CALL SCREEN 100.

    MODULE INIT OUTPUT.

    PROGNAME = SY-REPID.

    DYNNUM = SY-DYNNR.

    CLEAR: FIELD_VALUE, DYNPRO_VALUES.

    FIELD_VALUE-FIELDNAME = 'CARRIER'.

    APPEND FIELD_VALUE TO DYNPRO_VALUES.

    ENDMODULE.

    MODULE CANCEL INPUT.

    LEAVE PROGRAM.

    ENDMODULE.

    MODULE VALUE_CARRIER INPUT.

    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

    EXPORTING

    TABNAME = 'DEMOF4HELP'

    FIELDNAME = 'CARRIER1'

    DYNPPROG = PROGNAME

    DYNPNR = DYNNUM

    DYNPROFIELD = 'CARRIER'.

    ENDMODULE.

    MODULE VALUE_CONNECTION INPUT.

    CALL FUNCTION 'DYNP_VALUES_READ'

    EXPORTING

    DYNAME = PROGNAME

    DYNUMB = DYNNUM

    TRANSLATE_TO_UPPER = 'X'

    TABLES

    DYNPFIELDS = DYNPRO_VALUES.

    READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.

    SELECT CARRID CONNID

    FROM SPFLI

    INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB

    WHERE CARRID = FIELD_VALUE-FIELDVALUE.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'CONNID'

    DYNPPROG = PROGNAME

    DYNPNR = DYNNUM

    DYNPROFIELD = 'CONNECTION'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = VALUES_TAB.

    ENDMODULE.

    Regards,

    Nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2007 at 07:17 AM

    hi,

    This function modules get you the values when you press F4 on the scrren for a particular fileds.

    SELECT-OPTIONS : s_ort01 FOR kna1-ort01. "City

    TYPES :BEGIN OF ty_city,

    ort01 TYPE char40,

    END OF ty_city.

    DATA : it_city TYPE STANDARD TABLE OF ty_city.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_ort01-low.

    PERFORM f_get_city_value.

    &----


    *& Form f_get_city_value

    &----


    *--- F4 Help for City

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM f_get_city_value .

    CONSTANTS : l_c_fieldname TYPE dfies-fieldname VALUE 'ORT01',

    l_c_dynprofld TYPE help_info-dynprofld VALUE 'S_ORT01-LOW'.

    CLEAR : it_city.

    REFRESH : it_city.

    SELECT city1 "#EC CI_NOWHERE

    APPENDING TABLE it_city

    FROM adrc.

    SORT it_city BY ort01.

    DELETE ADJACENT DUPLICATES FROM it_city COMPARING ort01.

    SORT it_city BY ort01 ASCENDING.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = l_c_fieldname "FIELD NAME

    dynpprog = sy-cprog

    dynpnr = sy-dynnr

    dynprofield = l_c_dynprofld "screen field name

    window_title = 'CITY'

    value_org = 'S'

    callback_program = sy-cprog

    TABLES

    value_tab = it_city "this is the table containing all the values

    "which you neeed to pass to this function modulke

    "and you get F4 help for that

    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.

    rewards if useful,

    regards,

    nazeer

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 07:18 AM

    This is the syntax -

      SELECT  carrid connid
        FROM  spfli
        INTO  CORRESPONDING FIELDS OF TABLE values_tab
        WHERE carrid = field_value-fieldvalue.
    
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'CONNID'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'CONNECTION'
                value_org   = 'S'
           TABLES
                value_tab   = values_tab.

    hope it helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 07:23 AM

    Hi,

    parameters p_matnr type matnr.

    data: begin of itab_matnr occurs 0,

    matnr type matnr,

    end of itab_matnr.

    DATA: ITAB_SELECTED_MATNR TYPE DDSHRETVAL OCCURS 0 WITH HEADER LINE.

    initialization.

    do 20 times.

    move sy-index to itab_matnr.

    append itab_matnr.

    enddo.

    at selection-screen on value-request for p_matnr.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'P_MATNR'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = itab_matnr

    return_tab = ITAB_SELECTED_MATNR

    EXCEPTIONS

    PARAMETER_ERROR = 1

    NO_VALUES_FOUND = 2

    OTHERS = 3

    .

    IF SY-SUBRC eq 0.

    READ TABLE ITAB_SELECTED_MATNR INDEX 1.

    MOVE ITAB_SELECTED_MATNR-FIELDVAL TO P_MATNR.

    ELSE.

    • MESSAGE ....

    ENDIF.

    start-of-selection.

    write p_matnr.

    <b>Check the demo program DEMO_DYNPRO_F4_HELP_MODULE</b>

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.