F4_INT_TABLE_VALUE_REQUEST

I am using function module F4_INT_TABLE_VALUE_REQUEST to get an input help. But I need to get the importing feature as in Search Helps. ie. i need my values displayed in the help to be based on a value in a previous field. But during the POV and POH of this field, the previous fields value is not accessible using the screen field name, because the value is not getting populated in the screen field unless I press the Enter Key.
for eg.
I have 2 fields designed in se51, 'employee id' and 'files accessible'. I need a search help for the field 'files accessible'. But while coding, i need to display the files corresponding to a particular employee only. So i need to import the employee id from my screen field and use it in my search help. But my screen field is having that value only after a PAI or PBO, ie aftre I press the enter key..
Can someone please give me solution fast
Thanks in advance.

Hi Suzie,
From you requirement it is pretty clear that without the Employee ID it makes no sense to get the Files Accessible. So can you make the Employee ID as a mandatory input parameter?
For the next part, you can use some global fields in your program to keep the values. The values will get populated and will come automatically from the F4 Search Help. But you need to declare a structure in the TOP include of the code.
Alternatively you can use the function module DYNP_READ_VALUE.
Below is the template to use the FM.
CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname     = progname
      dynumb     = dynnum
    TABLES
      dynpfields = dynpfields.
Thanks,
Samantak.
Rewards points for useful answers.

Similar Messages

  • Help using F4_INT_TABLE_VALUE_REQUEST

    I am using function module F4_INT_TABLE_VALUE_REQUEST to get an input help. But I need to get the importing feature as in Search Helps. ie. i need my values displayed in the help to be based on a value in a  previous field. But during the POV and POH of this field, the previous fields value is not accessible using the screen field name, because the value is not getting populated in the screen field unless I press the Enter Key. Can someone please give me solution fast
    Thanks in advance.

    hi,
    PROGRAM  z101954_assignment1.
    TABLES: zvbak_101954,zvbap_101954,zmara_101954,zorg_101954.
    DATA: BEGIN OF itab OCCURS 0,
    zkunag LIKE zvbak_101954-zkunag,
    END OF itab.
    In flow logic(PAI) of screen in which u want to display F4 help write this code.
    PROCESS ON VALUE-REQUEST.
      FIELD wa_salesorder-zkunag MODULE input_help_sold_to_party.
    MODULE input_help_sold_to_party INPUT.
    *Fetch the value of the field in an internal table*
      SELECT zkunag FROM zvbak_101954 INTO CORRESPONDING FIELDS OF TABLE
        itab.
    MODULE input_help_sold_to_party INPUT.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = 'ZKUNAG'
      PVALKEY                = ' '
         dynpprog               = sy-cprog
         dynpnr                 = '1000'  
         dynprofield            = 'ZKUNAG'
      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              =
      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.
    ENDMODULE.    
    dynpnr = screen no.
    thanks
    payal

  • Help required  when using Function module F4_INT_TABLE_VALUE_REQUEST

    Hi,
    I wrote the logic as follows.
    Select-options: s_lgart FOR pa0015-lgart.
      SELECT lgart FROM t512z INTO TABLE it_temp WHERE infty = '0015' AND lgart IN rlgart.
      IF NOT it_temp[] IS INITIAL.
        SORT it_temp BY lgart.
        DELETE ADJACENT DUPLICATES FROM it_temp COMPARING lgart.
        LOOP AT it_temp.
          SELECT SINGLE lgtxt FROM t512t INTO it_temp-description
            WHERE lgart = it_temp-lgart AND
                  sprsl = 'EN'.
          IF sy-subrc = 0.
            MODIFY it_temp INDEX sy-tabix.
          ENDIF.
        ENDLOOP.
    at present in internal table it_temp having following fields.
    5100 Relolump sum
    5111 SIP
    my requirement is : when i press F4 help on wage type in selection screen i am able to see two fie

    example:
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD        = 'VBELN'
          DYNPPROG        = W_PROGNAME
          DYNPNR          = W_SCR_NUM
          DYNPROFIELD     = 'KUNNR'
          VALUE_ORG       = 'S'
        TABLES
          VALUE_TAB       = INT_F4
          RETURN_TAB      = RETURN_VALUES
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2
          OTHERS          = 3.

  • F4 help based on the Value in other field

    Hello
    I have a requirement in which there are two fields say field1 and field 2 in an ALV grid (in which  new data can be entered). The F4 help of field 2 should be based on the value  the user enters on field1.I have checked out the BC_ALV* programs but there are no clear help .
    I have tried setting the parameter id of the first field value and then get that parameter id on_f4 event of the second field.But where can i set the parameter id of the first field . on_f4 of first field does not have its value and there is no event after_f4 . There is a parameter e_afterf4 in data change event but to tirgger that there shud be some event right.
    Moreover If at all i get the first field value , i can use FM F4_int_table_value_request to show the refined f4 in field 2 . But I am passing the a field symbol table in my grids set table for first display . what can i pass as parameters here to the FM  F4_int_table_value_request?

    hello Kallu ,
      gt_f4_wa-getbefore  = 'X'. --->refreshing layout before F4
      gt_f4_wa-chngeafter = 'X'--> refreshing layout after f4.
    see the sample code of F4...no need to pass dynpro details.....
    *---locals.
      data:  lt_return type table of ddshretval,
             ls_return type ddshretval,
             begin of lt_kostl occurs 0,
              kokrs type kokrs,
              datbi type datbi,
              bukrs type bukrs,
              prctr type prctr,
             end of lt_kostl,
             ls_f4           type  lvc_s_modi.
      field-symbols: <ls_wa>         type any,
                    <t_f4> type lvc_t_modi.
    *---get defalut values.
      refresh lt_kostl.
      select kokrs
             kostl as prctr
             datbi
             bukrs
        from csks
        into  corresponding fields of table lt_kostl
               where kokrs eq g_kokrs
                 and datbi ge sy-datum
                 and bukrs eq yfit_00049-bukrs.
    *---call fm to display int values.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield        = 'YFIT_00050-PRCTR'
          window_title    = 'Profit Center list'
          value_org       = 'S'
          display         = space
        tables
          value_tab       = lt_kostl
          return_tab      = lt_return
        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.
      else.
        read table lt_return into ls_return
                   with key fieldname = 'F0004'.
        if sy-subrc eq 0.
          assign er_event_data->m_data->* to <t_f4>.
          ls_f4-fieldname = e_fieldname.
          ls_f4-row_id    = es_row_no-row_id.
          ls_f4-value     = ls_return-fieldval.
          ls_f4-error     = space.
          ls_f4-tabix     = space.
          ls_f4-style     = space.
          ls_f4-style2    = space.
          ls_f4-style3    = space.
          ls_f4-style4    = space.
          append ls_f4 to <t_f4>.
        endif.
      endif.
      er_event_data->m_event_handled = 'X'.
    regards
    Prabhu

  • Modularize the code

    Hi  Experts,
    I am using Function module F4_INT_TABLE_VALUE_REQUEST for F4 help funtionality . i have 30 to 40 fields for which i need to use this function module .
    Every time i need to pass different fields and diferent tables.
    Anbody please tell how to modularize so that i can call this FM only once. please if i need to write perform give me sample line.
    thanks.

    HI
    THIS IS TESTED CODE ....in this you can change the value of W_CHAR  and W_TABLE and use it or take it as parameter
    do sum modification to get your functionality
    REPORT  YH1306_TESTPACK123.
    TABLES:
      sflight.
    PARAMETERS:
      p_conn TYPE sflight-connid,
      p_carr TYPE sflight-carrid.
    data:
      w_char TYPE dfies-fieldname VALUE 'CARRID',
      w_table type string value 'T_TABLE'.
    TYPES:
      BEGIN OF type_s_carr,
        carrid TYPE sflight-carrid,
      END OF type_s_carr.
    DATA:
      t_table TYPE
    STANDARD TABLE
           OF type_s_carr
         WITH HEADER LINE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_carr.
      SELECT carrid
        FROM sflight
        INTO TABLE t_table
       UP TO 1 ROWS.
    perform sub_2 TABLES  T_TABLE
                    using w_char
    *&      Form  SUB_2
          text
         -->P_W_CHAR  text
         -->P_T_TABLE  text
    FORM SUB_2   TABLES T_TABLE
    USING    P_W_CHAR.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = p_w_char
      PVALKEY                = ' '
      DYNPPROG               = ' '
      DYNPNR                 = ' '
      DYNPROFIELD            = ' '
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
      VALUE_ORG              = 'C'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      tables
        value_tab              = T_table
      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.
    ENDFORM.                    " SUB_2
    regards
    Edited by: Mohit Kumar on Feb 18, 2009 1:39 PM

  • Prob to fill 2 screen fields thru F4 help on one screen field

    Hi,
    I have 2 fields on selection screen - MATNR and MTART. I want to have F4 help on MATNR only and based on the value selected I need to fill the MTART field also. I am using FM : F4IF_INT_TABLE_VALUE_REQUEST.
    I found on net that it can be done using either DYNPFLD_MAPPING or CALLBACK_FORM. I used both one by one but did not get the required result. Only the P_MATNR is getting populated after F4 and not P_MTART.
    My code is as below:
    TYPES: BEGIN OF ty_mara,
            matnr TYPE matnr,
            mtart TYPE mtart,
           END OF ty_mara.
    DATA: i_tab TYPE STANDARD TABLE OF ty_mara,
          i_return TYPE STANDARD TABLE OF ddshretval,
          record_tab  TYPE STANDARD TABLE OF seahlpres,
          i_map TYPE STANDARD TABLE OF dselc,
          wa_map TYPE dselc.
    SELECTION-SCREEN BEGIN OF BLOCK a.
    PARAMETERS: p_matnr TYPE matnr,
                p_mtart TYPE mtart.
    SELECTION-SCREEN END OF BLOCK a.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.
      SELECT matnr
             mtart
        FROM mara
        INTO TABLE i_tab
        WHERE mtart = 'FERT'.
      wa_map-fldname = 'MTART'.
      wa_map-dyfldname = 'P_MTART'.
      APPEND wa_map TO i_map.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
        DDIC_STRUCTURE         = ' '
          retfield               = 'MATNR'
        PVALKEY                = ' '
         dynpprog               = sy-repid
         dynpnr                 = sy-dynnr
         dynprofield            = 'P_MATNR'
        STEPL                  = 0
        WINDOW_TITLE           =
        VALUE                  = ' '
         value_org              = 'S'
        MULTIPLE_CHOICE        = ' '
        DISPLAY                = ' '
         callback_program       = sy-repid
         CALLBACK_FORM          = 'F4CALLBACK'
        MARK_TAB               =
      IMPORTING
        USER_RESET             =
        TABLES
          value_tab              = i_tab
        FIELD_TAB              =
         return_tab             = i_return
         dynpfld_mapping        = i_map
       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.
      ELSE.
      ENDIF.
      FORM F4CALLBACK
         TABLES   RECORD_TAB  STRUCTURE SEAHLPRES
         CHANGING SHLP TYPE SHLP_DESCR
                  CALLCONTROL LIKE DDSHF4CTRL.
      DATA: INTERFACE LIKE LINE OF SHLP-INTERFACE.
    INTERFACE-VALTABNAME = 'DYNP'.
      INTERFACE-VALFIELD = 'P_MTART'.
      MODIFY SHLP-INTERFACE FROM INTERFACE
             TRANSPORTING
            VALTABNAME
             VALFIELD
             WHERE SHLPFIELD = 'MTART'.
    ENDFORM.
    I may be missing something... Please help me.

    Hi ,
    Please go though this thread.
    [Re: F4_int_table_value_request]
    This will solve your issue.
    Regards
    DKS

Maybe you are looking for