F4IF_INT_TABLE_VALUE_REQUEST Functionality

Hello all,
How can I return more then one value using the FM F4IF_INT_TABLE_VALUE_REQUEST.
Example:
Parameters:
pernr TYPE pa0001-pernr,
sname TYPE pa0001-sname.
When I click "F4" inside the field (parameter) pernr, the following list is showed...
Number - Name
===========
1234 - Roberto
5678 - Falk
When I select the first line, I need to receive both values (Number and Name), no just the Name.

Hello Roberto
Yes, you can return multiple values using this function module. All you need to do is to define a <b>CALLBACK </b>routine for modifying the search help.
Have a look at the following sample report <b>ZUS_SDN_F4IF_INT_TAB_VAL_REQ</b>. If you define two columns on the search help that are return you retrieve two entries in the values itab for each selected F4 entry (in case of muliple select possible).
*& Report  ZUS_SDN_F4IF_INT_TAB_VAL_REQ
REPORT  zus_sdn_f4if_int_tab_val_req.
TYPE-POOLS: shlp.
DATA:
  gd_repid     TYPE syrepid,
  gt_knb1      TYPE STANDARD TABLE OF knb1,
  gt_values    TYPE STANDARD TABLE OF ddshretval.
START-OF-SELECTION.
  gd_repid = syst-repid.
  SELECT * FROM knb1 INTO TABLE gt_knb1 UP TO 100 ROWS.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      ddic_structure         = 'KNB1'
      retfield               = 'KUNNR'  " overwritten in callback !!!
*     PVALKEY                = ' '
*     DYNPPROG               = ' '
*     DYNPNR                 = ' '
*     DYNPROFIELD            = ' '
*     STEPL                  = 0
*     WINDOW_TITLE           =
*     VALUE                  = ' '
      value_org              = 'S'  " structure
*     MULTIPLE_CHOICE        = ' '
*     DISPLAY                = ' '
      callback_program       = gd_repid
      callback_form          = 'CALLBACK_F4'
*     MARK_TAB               =
*   IMPORTING
*     USER_RESET             =
    TABLES
      value_tab              = gt_knb1
*     FIELD_TAB              =
      return_tab             = gt_values
*     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.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
      i_structure_name = 'DDSHRETVAL'
    TABLES
      t_outtab         = gt_values
    EXCEPTIONS
      program_error    = 1
      OTHERS           = 2.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
END-OF-SELECTION.
*&      Form  CALLBACK_F4
*       text
*  -->  p1        text
*  <--  p2        text
FORM callback_f4
            TABLES record_tab STRUCTURE seahlpres
            CHANGING shlp TYPE shlp_descr
                     callcontrol LIKE ddshf4ctrl.
* define local data
  DATA:
    ls_intf     LIKE LINE OF shlp-interface,
    ls_prop     LIKE LINE OF shlp-fieldprop.
  " Hide unwanted fields
  CLEAR: ls_prop-shlpselpos,
         ls_prop-shlplispos.
  MODIFY shlp-fieldprop FROM ls_prop
    TRANSPORTING shlpselpos shlplispos
  WHERE ( fieldname NE 'BUKRS'  AND
          fieldname NE 'KUNNR'  AND
          fieldname NE 'PERNR' ).
  " Overwrite selectable fields on search help
  REFRESH: shlp-interface.
  ls_intf-shlpfield = 'BUKRS'.
  ls_intf-valfield  = 'X'.
  APPEND ls_intf TO shlp-interface.
  ls_intf-shlpfield = 'KUNNR'.
  APPEND ls_intf TO shlp-interface.
ENDFORM.                    " CALLBACK_F4
Regards
  Uwe

Similar Messages

  • F4IF_INT_TABLE_VALUE_REQUEST up to 500 hits

    hi,
    i am using the FM F4IF_INT_TABLE_VALUE_REQUEST  for displaying search help for a field.
    the possible values for this field are stored in an internal table which is filled by another FM which i
    cannot change. this FM returns itabs with 20,000 lines. when i try to use the search help from screen
    the program crash  (  MEMORY_NO_MORE_PAGING ).
    i want to limit the search help to up 500 hits , so the program won't crash, but i dont want to filter
    the itab by taking only 500 becasue the user can enter in field ' 2* ' and then press F4
    and if there are more then 500 values that start with 1 i won't get any values in search help
    (because i took only the first 500 - which all starts with 1).
    is there a way to achieve what i  want?
    Thanks
    Tomer

    Hi,
    You can make use of CALLBACK_FORM parameter which is available in the F4IF_INT_TABLE_VALUE_REQUEST function module to restrict the number of entries.
    FORM F4CALLBACK
         TABLES   RECORD_TAB STRUCTURE SEAHLPRES
         CHANGING SHLP TYPE SHLP_DESCR
                  CALLCONTROL LIKE DDSHF4CTRL.
    ENDFORM.
    Make use of DDSHF4CTRL structure which gives you more options.
    Regards
    Srini

  • F4 Help Needed F4IF_INT_TABLE_VALUE_REQUEST

    hi gurus,
    i am using the F4IF_INT_TABLE_VALUE_REQUEST function module to populate an F4 help. I am getting a weird situation.
    this is the code i am using:
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          RETFIELD               = f_name "field name to be populated
      PVALKEY                = ' '
        DYNPPROG               = SY-CPROG
        DYNPNR                 = SY-DYNNR
        DYNPROFIELD            = lv_dynprofield
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
        VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        TABLES
          VALUE_TAB            = it_t77tp[]
      FIELD_TAB              =
       RETURN_TAB            = 
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    the table it_t77tp has 2 colums [4 digit number and associated text]. the f4 help does show the 2colums, but on clicking on the right value, it always picks the last 4characters of the second column.
    so if i make it text followed by number, it gives me number,
    but i make it number followed by text (which is what the user wants), it selects the first 4 characters of the text.
    could you please tell me where am i going wrong? is there some table that i am passing / providing?
    thanks,
    vivek
    ps:rewards for useful answers

    Hi,
    Use the below logic.
    parameters: p_abkrs(4) type c.
    data: begin of it_abkrs occurs 0,
           abkrs type abkrs,
           atext type abktx,
          end of it_abkrs.
    at selection-screen on value-request for p_abkrs.
    select abkrs atext from t549t into table it_abkrs
    where sprsl = sy-langu.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        RETFIELD               = 'ABKRS'
        DYNPPROG               = sy-repid
        DYNPNR                 = sy-dynnr
        DYNPROFIELD            = 'P_ABKRS'
        VALUE_ORG              = 'S'
      TABLES
        VALUE_TAB              = it_abkrs
      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.

  • Help required in F4IF_INT_TABLE_VALUE_REQUEST

    hi all,
    I am using F4IF_INT_TABLE_VALUE_REQUEST function for F4 list , below is the code im using,
      DATA : zmatnr TYPE zauvvselscr-matnr.
      DATA: w_choice TYPE sy-tabix.
      DATA: BEGIN OF i_values OCCURS 0,
                werks           TYPE zauvvselscr-werks,
                matnr           TYPE zauvvselscr-matnr,
                maktx           TYPE zauvvselscr-maktx,
                j_3asean        TYPE zauvvselscr-j_3asean,
                /afs/collection TYPE zauvvselscr-/afs/collection,
                mvgr5           TYPE zauvvselscr-mvgr5,
                stock           TYPE zauvvselscr-clabs,
            END OF i_values.
      DATA: screen_values TYPE TABLE OF dynpread ,
            screen_value   LIKE  LINE OF screen_values.
      DATA: lv_srch_str TYPE c LENGTH 20.
      DATA: it_ret  LIKE ddshretval OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF fieldtab_rt OCCURS 20.
              INCLUDE STRUCTURE dfies. "field for ddif_fieldinfo_get
      DATA: END OF fieldtab_rt.
      DATA: dyn_tab TYPE TABLE OF dselc,
      S_DYN TYPE DSELC.
      s_dyn-fldname = 'MATNR'.
      s_dyn-dyfldname = 'P_MATNR'.
      APPEND s_dyn TO dyn_tab.
      s_dyn-fldname = 'WERKS'.
      s_dyn-dyfldname = 'P_WERKS'.
      APPEND s_dyn TO dyn_tab.
      fieldtab_rt-tabname = zauvvselscr.
      fieldtab_rt-fieldname = 'MATNR'.
      fieldtab_rt-position = '0001'.
      APPEND fieldtab_rt.
      fieldtab_rt-tabname = zauvvselscr.
      fieldtab_rt-fieldname = 'WERKS'.
      fieldtab_rt-position = '0002'.
      APPEND fieldtab_rt.
      screen_value-fieldname = 'ZMATNR' .             " Field to be read
      APPEND screen_value TO screen_values. "* Fill the table
      REFRESH it_ret.
      REFRESH fieldtab_rt.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname             = sy-cprog
          dynumb             = sy-dynnr
          translate_to_upper = 'X'
        TABLES
          dynpfields         = screen_values.
      READ TABLE screen_values INDEX 1 INTO screen_value.
      REPLACE ALL OCCURRENCES OF '*' IN screen_value-fieldvalue WITH space.
      CONCATENATE  screen_value-fieldvalue '%'  INTO lv_srch_str.
      REFRESH i_values.
      CLEAR i_values.
      SELECT DISTINCT matnr werks maktx j_3asean /afs/collection mvgr5  SUM( clabs ) AS stock
      INTO CORRESPONDING FIELDS OF i_values FROM zauvvselscr WHERE matnr LIKE lv_srch_str
      GROUP BY matnr werks maktx j_3asean /afs/collection mvgr5.
        APPEND i_values.
      ENDSELECT.
      DELETE ADJACENT DUPLICATES FROM i_values.
      SORT i_values BY matnr werks.
    *&&--passing the above selected records to the selection
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'MATNR'
          value_org       = 'S'
        TABLES
          value_tab       = i_values[]
          field_tab       = fieldtab_rt
          return_tab      = it_ret
          dynpfld_mapping = dyn_tab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        LOOP AT it_ret.
            screen_value-fieldvalue = it_ret-fieldval.
            MOVE it_ret-fieldval TO zmatnr.
       ENDLOOP.
    ENDIF.
    My requirement is , In my selection screen i have field ZMATNR , with the above coding i can get the selected MATNR into that, but in addition to the selected matnr i need to get the corresponding WERKS also, which needs to be passed to another variable for further usage, I tried various methods of using "dynpfld_mapping " field tab etc, but nowhere im getting the WERKS value, i dont know whether im doing it correctly. so kindly suggest me to achieve the requirement.
    thanks and regs,
    Raja

    Hi,
    its possible check the below code.
    parameters: p_matnr type mara-matnr,
                p_werks type marc-werks.
    data: i_mara type table of mara with header line,
          i_marc type table of marc with header line,
          i_dselc type table of dselc with header line,
          i_dfies type table of dfies with header line,
          v_werks type marc-werks.
    at selection-screen on value-request for  p_matnr.
      select * from marc into table i_marc up to 10 rows where matnr is not null.
      i_dfies-tabname = 'MARA'.
      i_dfies-fieldname = 'MATNR'.
      append i_dfies.
      clear i_dfies.
      i_dfies-tabname = 'MARC'.
      i_dfies-fieldname = 'WERKS'.
      append i_dfies.
      clear i_dfies.
      i_dselc-fldname = 'WERKS'.
      i_dselc-fldinh = v_werks.
      i_dselc-dyfldname = 'P_WERKS'.
      append i_dselc.
      clear i_dselc.
      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       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        tables
          value_tab              = i_marc[]
          field_tab              = i_dfies[]
      RETURN_TAB             =
          dynpfld_mapping        = i_dselc[]
    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.
    Regards,
    Sathish Reddy.

  • Select-option value is not getting captured in at selection-screen on value

    In Selection screen , we have Select-option and  a parameter.
    Based on the values given in Select-option, the values of Parameter should get populate.
    To achieve this functionality,
    I  used  At selection u2013screen  on value request  for <parameter>  EVENT and 'F4IF_INT_TABLE_VALUE_REQUEST' Function Module.
    But the Select-option values are not getting captured in this event,unless u press Enter key.
    Is there any other way to achieve this functionality.
    Please Guide me.

    When you call function 'F4IF_INT_TABLE_VALUE_REQUEST'. make sure you send it the name of the screen variable - the F4IF_INT_TABLE_VALUE_REQUEST function calls DYNP_VALUES_READ itself if you tell it the name of your report, screen number, and the variable name... snippet below.
    Jonathan
      data:
        l_repid             type syrepid.
      l_repid = sy-repid.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          dynpprog         = l_repid
          dynpnr           = '1000'
          dynprofield      = 'S_FIELD-LOW'  "Select options - low value
    * etc

  • Search Help For a Field in Module Pool Programming

    Hi,
    I have a field called status in Module Pool for which i need to write a search help.
    This is the piece of code i have written.
    TYPES: BEGIN OF ty_status,
             stat type i,
             status type string,
        END OF ty_status.
      DATA: lt_emp_status TYPE STANDARD TABLE OF ty_status,
            lw_emp_status TYPE ty_status.
      REFRESH lt_emp_status.
      lw_emp_status-stat = '1'.
      lw_emp_status-status = 'Draft'.
      APPEND lw_emp_status TO lt_emp_status.
      CLEAR lw_emp_status.
      lw_emp_status-stat = '2'.
      lw_emp_status-status = 'Employee Review'.
      APPEND lw_emp_status TO lt_emp_status.
      CLEAR lw_emp_status.
      REFRESH lt_emp_status.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'STATUS'
          value_org       = 'S'
        TABLES
          value_tab       = lt_emp_status
          return_tab      = t_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc = 0.
        READ TABLE t_return INDEX 1.
        MOVE t_return-fieldval TO LV_EMP_status.
      ENDIF.
    But i am getting the following error.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_ASSIGN_CAST_ILLEGAL_CAST', was
      not caught in
    procedure "F4IF_INT_TABLE_VALUE_REQUEST" "(FUNCTION)", nor was it propagated by
      a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The error occurred at a statement of the form
       ASSIGN f TO <fs> CASTING.
       ASSIGN f TO <fs> CASTING TYPE t.
    or
       ASSIGN f TO <fs> CASTING LIKE f1.
    or
       at table statements with the addition
       ASSIGNING <fs> CASTING.
    The following error causes are possible:
    1. The type of field f or the target type determined by <fs>, t or f1
    contains data references, object references, strings or internal tables
    as components.
    Could some one help me how to resolve this issue.
    Thanks in advance.

    Hi,
    Please see this sample code below:
    *To fetch the classification data on the sel screen
    DATA: BEGIN OF IT_KLAH OCCURS 0,
          CLINT TYPE CLINT,
          CLASS TYPE KLASSE_D,
          END OF IT_KLAH.
      SELECT CLINT CLASS FROM KLAH UP TO 500 ROWS
      INTO TABLE IT_KLAH.
      IF SY-SUBRC <> 0 .
        MESSAGE TEXT-006 TYPE 'E'.
      ELSE.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    DDIC_STRUCTURE = ' '
        RETFIELD = 'CLASS'
    PVALKEY = ' '
        DYNPPROG = SY-REPID
        DYNPNR = SY-DYNNR
        DYNPROFIELD = 'p_s_clascn_low'      "i had to put the f4 help on the selection screen's select option low value,
                                                                     "here basically you have to give the internal table name inside quotes in which
                                                                     "you want to retrieve your data
        VALUE_ORG = 'S'
        DISPLAY = ' '
        TABLES
        VALUE_TAB = IT_KLAH.
      ENDIF.
    Hope it helps,
    Regards,
    Mansi

  • Drop Down in ALV  ABAP and NOT in OO - ABAP

    Hello Everyone....
    I m workin on an ALV which is in simple ABAP and not in OO-ABAP. There is some selection criteria on the first screen , as soon as the user fulfills the requirement an ALV GRID is displayed in which the last column is editable.
      But the Problem is that i wanna make that editable field in ALV as drop down which would contain values from the database table.
      Suggest me some method , so that i dont have to do much changes in my code .
      A Sample code will be very benificial .
    Thanx n Regards,
    Harpreet.

    Hi Harpreet,
    [compiled from sap online help - always a good chice]
    To make an input/output field into a list box, you must set the value L or LISTBOX in the Dropdown attribute in the Screen Painter. The visLg attribute determines the output width of the list box and the field. You can assign a function code to a list box field. In this case, the PAI event is triggered as soon as the user chooses a value from the list, and the function code is placed in the SY-UCOMM and OK_CODE fields. If you do not assign a function code, the PAI event must be triggered in the usual way – that is, when the user chooses a pushbutton or an element from the GUI status.
    If you have assigned a list box to an input/output field, you can use the Value list attribute of the screen element to determine how the value list should be compiled. There are two options:
    Value list from input help (recommended)
    If you do not enter anything in the value list attribute, the text field uses the first column displayed in the input help assigned to the screen field. The input help can be defined in the ABAP Dictionary, the screen, or a POV dialog module. It should be laid out in two columns. The key is automatically filled.
    Value list from PBO modules (not recommended).
    If you enter A in the value list attribute, you must fill the value list yourself before the screen is sent (for example, in the PBO event) using the function module VRM_SET_VALUES. When you do this, you must pass an internal table with the type VRM_VALUES to the import parameter VALUES of the function module. VRM_VALUES belongs to the type group VRM. The line type is a structure consisting of the two text fields KEY (length 40) and TEXT (length 80). In the table, you can combine possible user entries from the KEY field with any texts from the TEXT component. You specify the corresponding input/output field in the import parameter ID.
    Examples
    Example
    Dropdown box with a value list from input help (recommended)
    *& Report DEMO_DROPDOWN_LIST_BOX                                 *
    REPORT demo_dropdown_list_box.
    *& Global Declarations                                           *
    * Screen Interfaces
    TABLES sdyn_conn.
    DATA   ok_code TYPE sy-ucomm.
    * Global data
    TYPES: BEGIN OF type_carrid,
             carrid type spfli-carrid,
             carrname type scarr-carrname,
           END OF type_carrid.
    DATA itab_carrid TYPE STANDARD TABLE
         OF type_carrid WITH HEADER LINE.
    *& Processing Blocks called by the Runtime Environment           *
    * Event Block START-OF-SELECTION
    START-OF-SELECTION.
    CALL SCREEN 100.
    * Dialog Module PBO
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    * Dialog Modules PAI
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
    ENDCASE.
    ENDMODULE.
    * Dialog Module POV
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
    ENDIF.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is 100. The only input field on the screen is the component SDYN_CONN-CARRID. Its Dropdown attribute is set to L, and it has the output length 20. The Value list attribute is empty, and it has the function code SELECTED. The function codes of the buttons EXECUTE and CANCEL. CANCEL are defined in the GUI status as having the function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      MODULE user_command_0100.
    PROCESS ON VALUE-REQUEST.
      FIELD sdyn_conn-carrid MODULE create_dropdown_box.
    Users cannot enter any values into the screen fields. When they choose the input field on screen 100, the system displays a list box. The Value list attribute is empty, so the system launches the input mechanism. In this case, the event block PROCESS ON VALUE-REQUEST is created in the screen flow logic. This event block controls all other mechanisms. A two-column internal table is filled in the appropriate dialog module and passed to the input help using the F4IF_INT_TABLE_VALUE_REQUEST function module. The system inserts the two columns of the table into the list box.
    When the user chooses a line in the list box, the PAI event is triggered using the function code SELECTED and the value in the first column of the internal table is copied to the input field.
    Regards,
    Clemens

  • Reporting Issue

    Dear All,
    How we can Restrict the values in Parameters/ Select-Options.
    Rewards
    Regards
    Vikas

    hi,
    you can use F4IF_INT_TABLE_VALUE_REQUEST function module for that.
    check this.
    tables:pa0000.
    DATA: BEGIN OF IT_SEL OCCURS 0,
           massn LIKE pa0000-massn,
           mntxt like t529t-mntxt,    
    END OF IT_SEL."
    select-options :  s_pernr  for pa0000-pernr no intervals no-extension ,
                      s_massn  for  pa0000-massn  obligatory  no intervals.
    at selection-screen on value-request for s_massn-low .
      REFRESH: IT_SEL.
      clear: it_sel.
      it_sel-massn = '10'.
      it_sel-mntxt = 'Retirement process'.
      append it_sel.
      clear: it_sel.
      it_sel-massn = '18'.
      it_sel-mntxt = 'Deputation Inward'.
      append it_sel.
      clear: it_sel.
      it_sel-massn = '19'.
      it_sel-mntxt = 'Deputation Outward'.
      append it_sel.
      clear: it_sel.
      it_sel-massn = '20'.
      it_sel-mntxt = 'Termination/Seperation'.
      append it_sel.
      clear: it_sel.
      it_sel-massn = '28'.
      it_sel-mntxt = 'Pre-Seperation'.
      append it_sel.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    *   DDIC_STRUCTURE         = ' '
          RETFIELD               = 'MASSN'
    *   PVALKEY                = ' '
         DYNPPROG               = SY-REPID
         DYNPNR                 = SY-DYNNR
         DYNPROFIELD            = 'S_MASSN-LOW'
    *   STEPL                  = 0
    *   WINDOW_TITLE           =
    *   VALUE                  = ' '
         VALUE_ORG              = 'S'
    *   MULTIPLE_CHOICE        = ' '
    *   DISPLAY                = ' '
    *   CALLBACK_PROGRAM       = 'SY-REPID'
    *   CALLBACK_FORM          = ' '
    *   MARK_TAB               =
    * IMPORTING
    *   USER_RESET             =
        TABLES
          VALUE_TAB              =  IT_SEL
    *   FIELD_TAB              =
    *   RETURN_TAB             =
    *   DYNPFLD_MAPPING        =
    * EXCEPTIONS
    *   PARAMETER_ERROR        = 1
    *   NO_VALUES_FOUND        = 2
    *   OTHERS                 = 3

  • F4 for field in clasical report

    Hi abapers i have one clasical report in that selection screen field crhd-arbpl(work center) d't have serch help.
    i wrote a program for it in that i used 'F4IF_INT_TABLE_VALUE_REQUEST' function module.
    but it is displaying output directly.
    when i press f4 it should be display first selection screen in popup window
    Note:s run transaction CR06 and press f4 in WORK CENTER
    I want same result in my program.
    and i wnat to display display four fields in box not in selection screen.

    Hi Keshava,
    You can create search help for this in the event AT SELECTION SCREEN ON VALUE REQUEST FOR S_NAME1-low.
    Use the function module F4IF_INT_TABLE_VALUE_REQUEST for this.
    Check this sample code...
    data: begin of itab occurs 0,
             name like kunnr-name1,
             end of itab.
      refresh: itab.
    AT SELECTION SCREEN ON VALUE REQUEST FOR S_NAME1. 
    <write select query to fill this internal tabel with required data or append this internal table with req: entries>
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
        DDIC_STRUCTURE         = 'ZSPECIALTY_DESC'
          retfield               = 'S_NAME1'                    
        PVALKEY                = ' '
          dynpprog               = sy-repid
          dynpnr                 = sy-dynnr
          dynprofield            = 'CCODE'
        STEPL                  = 0
        window_title           = 'Specialties'
        VALUE                  = ' '
          value_org              = 'S'
        MULTIPLE_CHOICE        = ' '
        display                = 'F'
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               =
        IMPORTING
        USER_RESET             =
        tables
          value_tab              = itab_ccode[]
        FIELD_TAB              = fieldtab[]
        return_tab             = ret_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.
    call this FM in subroutine and call that subroutine for S_NAME1-HIGH in the same event, to get search help for both lower and upper limits
    Thanks
    Sudharshan

  • Search help for input field

    Hi abapers i have one field crhd-arbpl(work center). its d't have serch help.
    i wrote a program for it in that i used  'F4IF_INT_TABLE_VALUE_REQUEST'  function module.
    but it is displaying output directly.
    when i press f4 it should be display first selection screen in popup window
    Note:s run transaction CR06 and press f4 in WORK CENTER
    I want same result in my program.

    Hello Keshava,
    The possible error cause ie, report being displayed directly is because you wouldn't have written the start-of-selection event. write the F4... function module on at selection-screen on value request event for the field and write a start-of-selection event for the remaining processing logic.
    Regards
    Farzan

  • Trace step,search help

    hi good even,
    i dont know how to create the search help for a field for a particular table.
    plz tell clearly with each steps.
    and i don't know how to trace the abap statements for a particular program. just like as F7 key using in c and c++.

    I am not clear with ur previous post.
    But I will try to explain how to pass internal table to a function module.
    The internal table will have contents from a database table:
    TABLES : zdssp,                      "DEPARTMENT TABLE
                   zessp.                      "EMPLOYEE DETAILS TABLE
    DATA : BEGIN OF wi_zsspit OCCURS 0 ,
           emp_id LIKE zessp-emp_id,
           emp_name LIKE zessp-emp_name,
           dept_id LIKE zessp-dept_id,
           dept_descr LIKE zdssp-dept_descr,
           END OF wi_zsspit.
    DATA wt_zsspdept LIKE zdssp OCCURS 0 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLe text-001.
    PARAMETERS : p_deptid LIKE zdssp-dept_id.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_deptid.
      SELECT * FROM zdssp INTO TABLE wt_zsspdept.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'                    " FUNCTION CALL
           EXPORTING
             retfield               = 'DEPT_ID'
             dynpprog               = sy-repid
             dynpnr                 = sy-dynnr
             dynprofield            = 'p_deptid'
            value_org              = 'S'
           TABLES
             value_tab              = wt_zsspdept.
      ENDIF.
    Now, replace the code with ur field/table names and use write statement as required.
    The function module is for getting F4 help.
    Hope it helps,
    Reward if helpful.
    Saipriya

  • EKKO-ZTERM field search help in report

    Hello,
    In a report selection screen,i have Payment terms as one of the selection criteria's.But the search help(f4) values not getting for this EKKO-ZTERM field.
    How can i get the list for this field.
    thanks in aadvance

    Hi,
    You can use 'F4IF_INT_TABLE_VALUE_REQUEST' Function module to define your own search helps.Here is the sample code for the same.
    data:
        begin of t_values occurs 2,
          value like kna1-begru,
        end of t_values,
        t_return like ddshretval occurs 0 with header line.
      t_values = 'PAR*'.
      append t_values.
      t_values = 'UGG'.
      append t_values.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield        = 'BEGRU'
                value_org       = 'S'
           tables
                value_tab       = t_values
                return_tab      = t_return
           exceptions
                parameter_error = 1
                no_values_found = 2
                others          = 3.
      if sy-subrc = 0.
        read table t_return index 1.
        o_begru-low = t_return-fieldval.
        if o_begru-low = 'PAR*'.
          o_begru-option = 'CP'.
        else.
          o_begru-option = 'EQ'.
        endif.
        o_begru-sign = 'I'.
        append o_begru to s_begru.
      else.
        o_begru = i_begru.
      endif.

  • F4 Help for Classical ALV Grid ( REUSE_ALV_GRID_DISPLAY_LVC)

    Hi All,
    We have an ABAP program that displays data using REUSE_ALV_GRID_DISPLAY_LVC. There is an editable column in the report for which we need to display F4 help. The functionality of the F4 help will completely user-defined.
    Please let me know how to provide custom F4 help for editable column in ALV.
    Thanks,
    sathish.

    Hi satish,
    Use ' F4IF_INT_TABLE_VALUE_REQUEST' function module after PROCESS ON VALUE-REQUEST event.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
              retfield         = 'LAND1'
    *       PVALKEY          = ' '
             dynpprog         = sy-repid
             dynpnr           = sy-dynnr
             dynprofield      = 'T_LCDETAILS-DEST_COUNTRY'
             callback_program = sy-repid
             value_org        = 'S'
           TABLES
             value_tab        = t_country
           EXCEPTIONS
             parameter_error  = 1
             no_values_found  = 2
             OTHERS           = 3.
         IF sy-subrc <> 0.
    * Implement suitable error handling here
         ENDIF.
    Regards,
    Venkat.

  • Module Pool Programming : Screen Fields.

    Hello
    i have 2 fields in a screen. Field1 and Field2
    i enter the field1 and want to set the f4 help for second field field2 on the basis of the input in field1.
    but when i enter field1 and press f4 help for field2, it doesnot work because the field1 values are not passed when i use process on value request for field2 .
    please help .... what am i missing.
    Thanks

    Hi ,
    you have to use "DYNP_VALUES_READ" function mdule to read the field1 value to process in "F4IF_INT_TABLE_VALUE_REQUEST" function module.
    check the code below
    declare one internal table like this.
    data dynpro_values type table of dynpread.
    add the fields which you want to read.
    field_value-fieldname = Z_POLCY-BUKRS'.
      append field_value to dynpro_values.
      field_value-fieldname = 'Z_POLCY-WERKS'.
      append field_value to dynpro_values.
    call function 'DYNP_VALUES_READ'
                exporting
                  dyname                         = progname
                  dynumb                         = dynnum
                  translate_to_upper             = 'X'
              REQUEST                        = ' '
              PERFORM_CONVERSION_EXITS       = ' '
              PERFORM_INPUT_CONVERSION       = ' '
              DETERMINE_LOOP_INDEX           = ' '
                        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.
      else.
        call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
            DDIC_STRUCTURE         = ' '
                 retfield               = 'POLTYPE'
            PVALKEY                = ' '
                 dynpprog               = progname
                 dynpnr                 = dynnum
                 dynprofield            = 'z_POLCY-POLTYPE'
            STEPL                  = 0
            WINDOW_TITLE           =
            VALUE                  = ' '
                 value_org              = 'S'
            MULTIPLE_CHOICE        = ' '
            DISPLAY                = ' '
            CALLBACK_PROGRAM       = ' '
            CALLBACK_FORM          = ' '
           tables
                 value_tab              = it_poltype
            FIELD_TAB              =
            RETURN_TAB             =
            DYNPFLD_MAPPING        = it_ret
          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.
      endif.
    regards
    shibu
    *check the code for syntax i  just given one prototype

  • Search help and Match code oject

    How to create the search help in version 5.0 and 6.0 ? what is elementary search help,collective search help? what is the use of these search helps? where we use elementary and collective searsc helps? what is the difference between searc help and match code object? how to use in reports?where we use search help and F4IF_INT_TABLE_VALUE_REQUEST function module? what is the diffference between them?

    Hi Rk,
    1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    3)An elementary search help defines the standard flow of an input help.
    4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
    5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
    6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
    CREATION:
    Go to SE11 Tcode
    select search help
    give the 'z' search help name and create
    select the selection method ur table name eg : 'mara'
    dialog module 'display value immediately'.
    add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
    where left position when displaying and spos = search position
    and then save and activate ..
    See the links:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    Thanks,
    Reward If Helpful.

Maybe you are looking for

  • How can I hide the password and user name in url???

    Hi experts, I'm creating a login page and know I have a problem. The Username and password are verified in a Java class, after checking the user and password, the user should be linked to the portal. So far everything has worked well. But when I call

  • %CRYPTO-4-RECVD_PKT_MAC_ERR: decrypt mac verify failed

    Hello, I know this question has been asked many times on the forum, I am constantly getting the below error message on my 2811 Router: *Aug  9 07:07:01.507: %CRYPTO-4-RECVD_PKT_MAC_ERR: decrypt: mac verify failed for connection id=3004 local=3.3.3.1

  • How To Restore Hidden Files

    I have a strange problem. I'm trying to restore a file from yesterday that Adobe Photoshop puts in a temporary folder under /private - which is hidden in Time Machine. I've figured out how to display hidden folders in Time Machine. However, /private

  • Amount right aligned

    Hi, Could you please advise what is the user setting to make the amount column showing in standard report right aligned? Regards, Junior

  • What does it mean when an error on downloading says cannot contact reliable source?

    what does it mean when an error on downloading says cannot contact reliable source?