Reg. F4IF_INT_TABLE_VALUE_REQUEST

Hi all,
I'm using the function module 'F4IF_INT_TABLE_VALUE_REQUEST' for F4 help on a field. My problem is this FM is restricting only 5000 entries. Is there any way to display all the records say in my case I've 49,000 entries.
The code is:
*&      Form  f4_objects
Get F4 help on objects
FORM f4_objects USING p_otype TYPE any
                      p_field
                      p_title.
  TYPES: BEGIN OF t_objects,
           objid TYPE hrobjid,
           stext TYPE stext,
        END OF t_objects.
  DATA: lt_objects TYPE TABLE OF t_objects,
        l_otype    TYPE otype,     " Object Type
        l_count    TYPE i.
  l_otype = p_otype.
Get all the Z61 org units or positions
the display should not be restricted based on structural
authorizations
  SELECT objid stext
     INTO TABLE lt_objects
     FROM hrp1000
     WHERE plvar = c_01      AND
           otype = l_otype   AND
           istat = c_n1      AND
           begda <= sy-datum AND
           endda >= sy-datum AND
           langu = sy-langu.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'OBJID'
      dynpprog        = sy-cprog
      dynpnr          = sy-dynnr
      dynprofield     = p_field
      window_title    = p_title
      value_org       = c_s
    TABLES
      value_tab       = lt_objects
    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.                    " f4_objects
Your suggestions are appreciated.
Thanks,
Bhaskar.

Hi Bhaskar,
try this sample
*& Report  ZF41                                                        *
REPORT  zf41                                    .
TABLES: ekko.
DATA : BEGIN OF itab OCCURS 0,
        uname(10),
       desc(12),
       END OF itab.
DATA: BEGIN OF field_tab OCCURS 0.
        INCLUDE STRUCTURE dfies.
DATA END OF field_tab.
DATA : return_tab LIKE ddshretval OCCURS 0 .
DATA : return_wa LIKE ddshretval .
DATA:  xprog LIKE sy-repid,
       xdynpnr LIKE sy-dynnr.
PARAMETERS : a(27) TYPE c.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR a.
  REFRESH: field_tab.
  CLEAR field_tab.
  field_tab-fieldname = 'UNAME'.
  field_tab-intlen = 10.
  field_tab-outputlen = 10.
  field_tab-inttype = 'C'.
  field_tab-scrtext_m = 'Name'.
  APPEND field_tab.
  CLEAR field_tab.
  field_tab-fieldname = 'DESC'.
  field_tab-intlen = 12.
  field_tab-outputlen = 12.
  field_tab-inttype = 'C'.
  field_tab-scrtext_m = 'Description'.
  APPEND field_tab.
  REFRESH: itab.
  CLEAR: itab.
  itab-uname = 'U1'.
  APPEND itab.
  CLEAR: itab.
  itab-uname = 'Aaadsdsa'.
  APPEND itab.
  CLEAR: itab.
  itab-uname = 'V2'.
  APPEND itab.
  CLEAR: itab.
  itab-uname = 'bssdsdsd'.
  APPEND itab.
  CLEAR: xprog, xdynpnr.
  xprog = sy-repid.
  xdynpnr = sy-dynnr.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'UNAME'
      dynprofield     = 'A'
      dynpprog        = sy-cprog "return the uname to A
      dynpnr          = sy-dynnr "return the uname to A
    TABLES
      value_tab       = itab
      field_tab       = field_tab
      return_tab      = return_tab
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.
I just use 1 field for itab but it can display 2 fields as itab is just a dummy internal tab wherelse the real fields are described in field tab.
Rgds,
Ester

Similar Messages

  • How I input selection criteria to the FM F4IF_INT_TABLE_VALUE_REQUEST

    Hi,
    i implemented one FM 'F4IF_INT_TABLE_VALUE_REQUEST' in my program to show F4 help.
    in that i given  MULTIPLE_CHOICE        = 'X' for multiple line selection, i got the desired output there is no problem with that.
    but i want to show the F4 help screen with some of the record already selected.
    For example.
    we have NAME as search help(values HARI,MADHU,RANI,SINDHU) ,
    at first i selected HARI and MADHU, and then when i press F4 again i need HARI and MADHU as already selected.
    Reg,
    HARIHARAN

    Hi Hariharan,
    Please use the Mark_tab parameter of the FM F4IF_INT_TABLE_VALUE_REQUEST as below.
    data: MARK_TAB TYPE DDSHMARKS.
    data: mark like line of mark_tab.
    mark = '2'.
    append mark to MARK_TAB.
    *-- Call fucntion for search help
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = l_retfld
    dynpprog = sy-repid
    dynpnr = sy-dynnr
    dynprofield = l_dynfld
    MULTIPLE_CHOICE = 'X'
    callback_program = sy-repid
    MARK_TAB = mark_tab
    TABLES
    value_tab = l_i_value
    field_tab = l_i_fields
    return_tab = l_i_return
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE i000
    WITH 'No search help found'(090) .
    ENDIF.
    Regards,
    Amit.

  • 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.

  • F4IF_INT_TABLE_VALUE_REQUEST - how can I return all values from the line?

    Hi,
    I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values.  The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB.  ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
    How can I see all the values in the line I select in the return table?
    My code is as follows:
      DATA: tbl_cawnt LIKE cawnt OCCURS 0,
            wa_cawnt LIKE cawnt,
            BEGIN OF tbl_list OCCURS 0,
              atinn LIKE cawnt-atinn,
              atzhl LIKE cawnt-atzhl,
              atwtb LIKE cawnt-atwtb,
            END OF tbl_list,
            wa_list LIKE tbl_list,
            tbl_return LIKE ddshretval OCCURS 0,
            wa_return LIKE ddshretval,
            tbl_fields LIKE dfies OCCURS 0,
            tbl_dynp LIKE dselc OCCURS 0.
      REFRESH: tbl_list, tbl_cawnt.
      SELECT atinn atzhl atwtb
        FROM cawnt
        INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
        WHERE spras EQ sy-langu.
      LOOP AT tbl_cawnt INTO wa_cawnt.
        CLEAR wa_list.
        MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
              wa_cawnt-atinn TO wa_list-atinn,
              wa_cawnt-atzhl TO wa_list-atzhl.
        APPEND wa_list TO tbl_list.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ATWTB'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = tbl_list
          return_tab      = tbl_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.
      ENDIF.
    Thanks!

    Hi,
      Use the structure DYNPFLD_MAPPING
    With this internal table you can easily define that you want to return
    other columns of the hit list in addition to field RETFIELD to the
    screen.
    In this IT you can MAP the screen fields to the serch help screen fields this has three fields
    FLDNAME this is the field anme from the search help
    FLDINH This has to be blank which would be field with the field value that you want to map
    DYFLDNAME THis is the screen field name.
    So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
    Regards,
    Himanshu

  • Mail can't send email from 123-reg accounts

    Hi all,
    I've got an issue with Mac Mail can’t send email from 123-reg accounts.
    I know there is a lot of articles on simular matters and some I have tried out with no luck, others are just speaking a whole other language.
    Any help would be greatly recived, here's my situation below:
    Running a iMac 2.8GHz Intel Core i5 on OS X 10.8.3
    I’m using 3 accounts on Macs Mail client, one is my iCloud account that is working fine and the other two are my 123-reg accounts that I use for business purposes. I’ve been working like this for a couple of years now and about 6 months ago I upgrade my operating system from Snow Leopard to Mountain Lion.
    2 or 3 months ago I randomly got a problem where I was unable to send any emails from my 123-reg account, I could only receive emails. I checked my settings and they were all correct and unchanged so I attempted to delete them and recreate the account but with no such luck.
    I then decided to check if it was a problem at 123-regs end and attempted to log into web mail. This worked and was able to both send and receive emails so eliminated that possibility.
    I also have these accounts set up on my iPhone, so checked if there was any issues and everything was working fine. I then checked my iphone details and made sure the same was on my desktop and still no such luck.
    I’ve tried out some of the articles I’ve found on here (the ones written in plain English) still no results. I’m not very IT illiterate and just wondered if anyone else has got any ideas, whether there is something specific with 123-reg accounts and Mac Mail?
    Many thanks.

    Thanks
    I just had another hunt around looking at posts and discovered that it was because I recently changed to BT Infinity and they had a block on.
    I didn't even think to question the ISP.
    https://discussions.apple.com/message/21173608#21173608

  • F4IF_INT_TABLE_VALUE_REQUEST with Maximum Number of Hits.

    Hi, all,
    Currently i'm doing a customized F4 help for a selection-option filed on a report by using the function module 'F4IF_INT_TABLE_VALUE_REQUEST'. When i execute my report and go to the selection-option filed just now i created and press F4, i can see a list of data in my search help. However when i go to the tab 'Restrictions', i can't see the 'Maximum No. of Hits' option.
    So anyone have any idea about this? or how to make the 'Maximum No. of Hits' box come out in my F4 help?
    Thanks in advance.

    My full code :-
    TABLES : BSIK , DDSHF4CTRL .
    DATA: BEGIN OF T_ZUONR OCCURS 0,
           ZUONR TYPE BSIK-ZUONR,
          END OF T_ZUONR.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME  TITLE TEXT-001.
    SELECT-OPTIONS   : ASGN_CK FOR BSIK-ZUONR.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR ASGN_CK-LOW.
      SELECT ZUONR FROM BSIK INTO TABLE T_ZUONR.
      SORT T_ZUONR BY ZUONR.
      DELETE ADJACENT DUPLICATES FROM T_ZUONR.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD         = 'DYNR'
          DYNPPROG         = SY-REPID
          DYNPNR           = SY-DYNNR
          VALUE_ORG        = 'S'
          CALLBACK_PROGRAM = SY-REPID
          CALLBACK_FORM    = 'F4CALLBACK'
        TABLES
          VALUE_TAB        = T_ZUONR.
         RETURN_TAB       = T_ZUONR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR ASGN_CK-HIGH.
      SELECT ZUONR FROM BSIK INTO TABLE T_ZUONR.
      SORT T_ZUONR BY ZUONR.
      DELETE ADJACENT DUPLICATES FROM T_ZUONR.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD         = 'DYNR'
          DYNPPROG         = SY-REPID
          DYNPNR           = SY-DYNNR
          VALUE_ORG        = 'S'
          CALLBACK_PROGRAM = SY-REPID
          CALLBACK_FORM    = 'F4CALLBACK'
        TABLES
          VALUE_TAB        = T_ZUONR.
         RETURN_TAB       = T_ZUONR.
      PERFORM F4CALLBACK.
    *&      Form  F4CALLBACK
          text
    -->  p1        text
    <--  p2        text
    FORM F4CALLBACK.
    *TABLES   RECORD_TAB  STRUCTURE SEAHLPRES
    *CHANGING SHLP        TYPE SHLP_DESCR
            CALLCONTROL LIKE DDSHF4CTRL.
      DATA :  SHLP        TYPE SHLP_DESCR,
              CALLCONTROL LIKE DDSHF4CTRL.
      SHLP-INTDESCR-DIALOGTYPE = 'C'.             " Dialog type ( Dialog with value restriction )
      CALLCONTROL-NO_MAXDISP   = '500'.           " For getting Maximum no of hits tab
    ENDFORM.                    " F4CALLBACK
    *But it is not working, Please help. There is some problem with the Perform F4CALLBACK Module. Please help.

  • F4IF_INT_TABLE_VALUE_REQUEST

    Hi All,
    I have 2 parameters on my selection screen for which  i have given on value request help using fm F4IF_INT_TABLE_VALUE_REQUEST.
    the 2 para are firstname and lastname.when the user press f4 help he can see both first name and last name.
    my requirement is when he click on first name the last name paramters shl aslo get filled or when he chose for last name f4 help the first name shld get filled.
    how can we achive this.
    pls help

    Hi pawan,
    here a short example how i do it:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FECOD.
      REFRESH: T_QPK1CDTAB.
      CALL FUNCTION 'QPK1_GP_CODE_SELECTION'
           EXPORTING
                I_KATALOGART           = 'C'
                I_CODEGRUPPE           = P_FEGRP
                I_CODE                 = '*'
                I_SPRACHE              = SY-LANGU
                I_PICKUP_MODE          = 'X'
           TABLES
                T_QPK1CDTAB            = T_QPK1CDTAB
           EXCEPTIONS
                NO_MATCH_IN_RANGE      = 1
                NO_USER_SELECTION      = 2
                NO_AUTHORIZATION       = 3
                NO_SELECTION_SPECIFIED = 4
                OBJECT_LOCKED          = 5
                LOCK_ERROR             = 6
                OBJECT_MISSING         = 7
                OTHERS                 = 8.
      READ TABLE T_QPK1CDTAB INDEX 1.
    <b>  P_FEGRP = T_QPK1CDTAB-CODEGRUPPE.
      P_FECOD = T_QPK1CDTAB-CODE.
      CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'.</b>*
    I set both parameters in the F4. I have 2 F4-Forms for  P_FEGRP and  P_FECOD.
    hope it helps.
    Regards, Dieter

  • F4IF_INT_TABLE_VALUE_REQUEST help

    hi,
    I have a table of 2 values ( WBS and project definition code ) , I used this function F4IF_INT_TABLE_VALUE_REQUEST for F4 on the project definition field. After that I want to return both Project definition and WBS that I've selected . I used value_org = 'S" but I can get only 1 record in the return_table ? Could you please help me?
    Thanks in advance

    Hi,
    Check this Code..
    F4 help is povided on the P_PLNNR field and if any data is selected then P_PLNNR and P_PLNAL is updated in the screen. Both values are shown in the F4 help(P_PLNNR and P_PLNAL ).
    PARAMETES : p_werks type ...
    PARAMETES : p_plnnr type ....
    PARAMETES : p_plnal type....
    AT SELECTION-SCREEN ON P_PLNNR.
      data:
        lg_condition    type string.
      data:
         lwa_ddshretval type ddshretval,
         lwa_dselc      type dselc,
         lwa_dynpread   type dynpread.
      data:
         li_f4_insp     type standard table of t_f4_insp,
         li_ddshretval  type standard table of ddshretval,
         li_dselc       type standard table of dselc,
         li_dynpread    type standard table of dynpread.
      lwa_dynpread-fieldname = 'P_WERKS'.
      append lwa_dynpread to li_dynpread.
      clear lwa_dynpread.
    * Read Screen Field Values.
      call function 'DYNP_VALUES_READ'
        exporting
          dyname     = sy-repid
          dynumb     = sy-dynnr
        tables
          dynpfields = li_dynpread.
    * Read the first record as only one record will be present
      read table li_dynpread into lwa_dynpread index 1.
      p_werks = lwa_dynpread-fieldvalue.
      if p_werks is initial.
        move 'PLNTY EQ ''Q''' to lg_condition.
      else.
        move 'WERKS EQ P_WERKS AND PLNTY EQ ''Q''' to lg_condition.
      endif.
    * Fetch Data
      select werks
             plnnr
             plnal
             plnty
             ktext
        into table li_f4_insp
        from plko
        where (lg_condition).
      lwa_dselc-fldname = 'F0002'.
      lwa_dselc-dyfldname = 'PLNNR'.
      append lwa_dselc to li_dselc.
      clear lwa_dselc.
      lwa_dselc-fldname = 'F0003'.
      lwa_dselc-dyfldname = 'PLNAL'.
      append lwa_dselc to li_dselc.
      clear lwa_dselc.
    * FM For F4 Help
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield        = 'PLNNR'
          dynpprog        = sy-cprog
          dynpnr          = sy-dynnr
          dynprofield     = 'PLNNR'
          value_org       = 'S'
        tables
          value_tab       = li_f4_insp
          return_tab      = li_ddshretval
          dynpfld_mapping = li_dselc
        exceptions
          parameter_error = 1
          no_values_found = 2
          others          = 3.
      if sy-subrc eq 0.
        refresh li_dynpread.
        read table li_ddshretval into lwa_ddshretval index 1.
        if sy-subrc eq 0.
          move lwa_ddshretval-fieldval to p_plnnr.
          lwa_dynpread-fieldname = 'P_PLNNR'.
          lwa_dynpread-fieldvalue = lwa_ddshretval-fieldval.
          append lwa_dynpread to li_dynpread.
          clear lwa_dynpread.
        endif.                             " IF sy-subrc EQ 0.
        read table li_ddshretval into lwa_ddshretval index 2.
        if sy-subrc eq 0.
          move lwa_ddshretval-fieldval to p_plnal.
          lwa_dynpread-fieldname = 'P_PLNAL'.
          lwa_dynpread-fieldvalue = lwa_ddshretval-fieldval.
          append lwa_dynpread to li_dynpread.
          clear lwa_dynpread.
        endif.                             " IF sy-subrc EQ 0.
      endif.                               " IF sy-subrc EQ 0.
    * Set Screen Field Values.
      call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-repid
          dynumb               = sy-dynnr
        tables
          dynpfields           = li_dynpread
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.
      check sy-subrc eq 0.

  • F4IF_INT_TABLE_VALUE_REQUEST - No of hits

    Hi,
    I am passing an internal table of more than 500 values to the function module F4IF_INT_TABLE_VALUE_REQUEST, but it's automatically restricting this to 500 entries. Kindly let me know, how I can customize this restriction to the value I need.
    Thanks and Regards,
    Ashok

    Hi,
    The actual problem is that only: I don't see that no of hits option when I click the downward arrow. Pls find the code that I have used to call this function module.
      select aufnr into table lt_aufnr
                   from aufk
                   where auart = 2000
                   and astkz = 'X'.
      if sy-subrc = 0.
      call function 'DYNP_GET_STEPL'
       IMPORTING
         POVSTEPL              = lv_stepl
       EXCEPTIONS
         STEPL_NOT_FOUND       = 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.
    *call function 'HELP_VALUES_GET_WITH_TABLE'
    EXPORTING
      FIELDNAME                           = 'AUFNR'
      TABNAME                             = 'AUFK'
    IMPORTING
      SELECT_VALUE                        = ZSDYN_ZCHECK2-AUFNR
    tables
       fields                              = lt_fields[]
       valuetab                            = lt_aufnr[]
    EXCEPTIONS
      FIELD_NOT_IN_DDIC                   = 1
      MORE_THEN_ONE_SELECTFIELD           = 2
      NO_SELECTFIELD                      = 3
      OTHERS                              = 4
    *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 'F4IF_INT_TABLE_VALUE_REQUEST'
             exporting
                  retfield        = 'AUFNR'
                  pvalkey         = ' '
                  dynpprog        = lv_repid
                  dynpnr          = lv_dynnr
                  dynprofield     = 'ZSDYN_ZCHECK2-AUFNR'
                  stepl           = lv_stepl
             tables
                  value_tab       = lt_aufnr[]
                  field_tab       = lt_fields[]
             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.

  • F4IF_INT_TABLE_VALUE_REQUEST Problem

    Hi Folks,
    I have problem with FM F4IF_INT_TABLE_VALUE_REQUEST
    Here is the scenario.
    i have interbnal table tbwerks[] that contains plant and description(two fields).
    DATA: BEGIN OF tbwerks OCCURS 10,
           werks LIKE t001w-werks,
           name1 like t001w-name1,
          END OF tbwerks .
    then i am populating values to internal table.
    now i want to display all the plants in listbox.
    for that i am using the following FM
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'TBWERKS-WERKS'
                value_org       = 'S'
           TABLES
                value_tab       = tbwerks[]
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    But, here i am getting all descriptions insted of plants.
    can't we use internal table with two fields here..?
    what could be the problem..
    sara

    Hei Sara,
    I've the similar requirement as yours. In my case, the two columns are Administrator and Administrator name ( instead of plant and plant description ) and I've solved the problem this way :
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_sachx.
      PERFORM build_dropdown.
    FORM build_dropdown.
      TYPES:BEGIN OF ty_admin,
             sachx LIKE t526-sachx,
             sachn LIKE t526-sachn,
            END OF ty_admin.
      DATA:it_admin  TYPE  TABLE OF ty_admin,
           it_return TYPE STANDARD TABLE OF ddshretval.
      DATA:wa_admin  LIKE LINE OF it_admin,
           wa_return LIKE LINE OF it_return.
      DATA:l_retfield TYPE  dfies-fieldname.
    Get HR administrators
    SELECT sachx sachn FROM t526 INTO CORRESPONDING FIELDS OF TABLE it_admin
                       WHERE sachx LIKE 'H%'.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = l_retfield
          value_org       = 'S'
        TABLES
          value_tab       = it_admin
          return_tab      = it_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.
      ENDIF.
      READ TABLE it_return INTO wa_return INDEX 1.
      READ TABLE it_admin INTO wa_admin WITH KEY
                      sachn = wa_return-fieldval.
      WRITE wa_admin-sachx TO p_sachx.
    Refresh it_admin, otherwise valuse in the drop-down will keep on
    adding up each time
      REFRESH:it_admin.
    ENDFORM.                    " build_dropdown
    It's working fine...
    Regards,
    Rudresh

  • F4IF_INT_TABLE_VALUE_REQUEST and search in fields

    Hi Friends,
    I want to make a search operation with F4IF_INT_TABLE_VALUE_REQUEST. My code is;
      DATA:
      BEGIN OF HELP_LIST OCCURS 0,
             ID LIKE ZLIST-ID,
             NAME LIKE ZLIST-NAME,
            SNAME LIKE ZLIST-SNAME,
      END OF HELP_LIST,
      FIELD_TAB LIKE DFIES OCCURS 0 WITH HEADER LINE.
      CLEAR FIELD_TAB.
      FIELD_TAB-TABNAME = 'HELP_LIST'.
      FIELD_TAB-FIELDNAME = 'ID'.
      FIELD_TAB-POSITION = 0.
      FIELD_TAB-OFFSET = 0.
      FIELD_TAB-REPTEXT =  'ID'.
      FIELD_TAB-INTLEN = 9.
      FIELD_TAB-OUTPUTLEN = 9.
      APPEND FIELD_TAB.
      CLEAR FIELD_TAB.
      FIELD_TAB-TABNAME = 'HELP_LIST'.
      FIELD_TAB-FIELDNAME = 'NAME'.
      FIELD_TAB-POSITION = 1.
      FIELD_TAB-OFFSET = 9.
      FIELD_TAB-REPTEXT =  'Name'.
      FIELD_TAB-INTLEN = 50.
      FIELD_TAB-OUTPUTLEN = 50.
      APPEND FIELD_TAB.
    CLEAR FIELD_TAB.
      FIELD_TAB-TABNAME = 'HELP_LIST'.
      FIELD_TAB-FIELDNAME = 'SNAME'.
      FIELD_TAB-POSITION = 1.
      FIELD_TAB-OFFSET = 9.
      FIELD_TAB-REPTEXT =  'Surname'.
      FIELD_TAB-INTLEN = 50.
      FIELD_TAB-OUTPUTLEN = 50.
      APPEND FIELD_TAB.
      SELECT ID NAME SNAME
      FROM ZLIST
      INTO TABLE HELP_LIST.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD        = 'ID'
                VALUE_ORG       = 'S'
                DYNPPROG        = 'ZPROJECT'
                DYNPNR          = '0202'
                DYNPROFIELD     = 'TMP_ID'
                WINDOW_TITLE    = 'Search'
           TABLES
                VALUE_TAB       = HELP_LIST
                FIELD_TAB       = FIELD_TAB
           EXCEPTIONS
                PARAMETER_ERROR = 1
                NO_VALUES_FOUND = 2
                OTHERS          = 3.
    Respect to above code, I can list my values. And when I want to try 'H*' for Name field, I am getting error as : "Not possible to restrict with search pattern here"
    But, If I don't pass FIELD_TAB table, I don't get error. I need to pass this table for another reason. But also I need to search for name and surname fields.
    How can I do?
    Thanks.

    Hi Uwe,
        Thank you for your response. Yes, that is an option I was thinking of as an alternative.
        I want to display to the user the User_Addrs selection-window, with the names. Once they choose the multiple-selection list of names, I want them to be able to save the user address and the associated first/last names in the variant.
        The selection screen can be cut down to possibly one less selection-field: by combining the first/last name...but the update to screen-fields would likely still be a problem.
      Still working on this one, 
       Dan Perecky

  • F4IF_INT_TABLE_VALUE_REQUEST -Restrictions dialog box

    Hi,
    I am using the function module F4IF_INT_TABLE_VALUE_REQUEST in screens, to implement a search help in my program , but instead of directly displaying the hit list , i want the restrictions screen to be displayed first with some default values, and the list should be displayed only based on the valuies entered in thius restrictions screen. How can i do this using this function module.
    To be more precise,
    i need the restrictions dialog box to be displayed and this will have 6 fields. i have to pass values to 2 fields from my program, the first field need not be filled and teh remaining fields should be left for the user to enter.
    how do i achieve this?
    Please help.

    Check the sample code. Using the Event PROCEE ON VALUE-REQUEST we can get the F4 Help.
    PROGRAM  ztest_duplica.
    DATA: kunnr1(10),
               kunnr2(10).
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  get_help  INPUT
    *       text
    MODULE get_help INPUT.
      DATA:i_retab TYPE TABLE OF  ddshretval,
           wa_ret TYPE ddshretval.
      TYPES: BEGIN OF x_itab,
      kunnr TYPE kunnr,    "it should be type to some standard data element
      END OF x_itab.
      FIELD-SYMBOLS: <fs> TYPE ANY.
      CLEAR : kunnr1, kunnr2.
      DATA: dynfield  TYPE help_info-dynprofld,
            wa_itab TYPE x_itab,
            i_tab LIKE TABLE OF wa_itab WITH HEADER LINE.
      CLEAR  dynfield.
      IF sy-dynnr = '0100'.
        dynfield = 'KUNNR1'.
      ELSE.
        dynfield = 'KUNNR2'.
      ENDIF.
      SELECT kunnr FROM kna1
          INTO TABLE i_tab
          UP TO 20 ROWS.
      "retfield we will pass the column name we are going to get from f4
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'KUNNR'   "<---Return field column name
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = dynfield
          value_org   = 'S'
        TABLES
          value_tab   = i_tab
          return_tab  = i_retab.
      IF sy-subrc EQ 0.
        READ TABLE i_retab INTO wa_ret INDEX 1.
        ASSIGN (dynfield) TO <fs> .
        <fs> = wa_ret-fieldval .
        UNASSIGN <fs>.
      ENDIF.
    ENDMODULE.                 " get_help  INPUT
    Flow logic for 100 screen
    screen consists of Input field pointing to KUNNR1
    PROCESS BEFORE OUTPUT.
    * MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    process on value-request.
    field kunnr1 module get_help.
    Create a Tcode and Intitial screen 100. and check it .
    Regards
    Vijay Babu Dudla

  • F4IF_INT_TABLE_VALUE_REQUEST not returning value with 2 decimals point

    hi all,
    i use function F4IF_INT_TABLE_VALUE_REQUEST to do search help, the master data in table ZINVEST has field ZNO, with field type CURR , 2 decimals point.
    the return table shows 2 decimals point but in display screen it only shows 1 decimal point, pls advice
    here's the coding:
    DATA : BEGIN OF itab OCCURS 0,
              e_value(20),
             END OF itab.
      DATA: BEGIN OF field_tab OCCURS 0.
              INCLUDE STRUCTURE dfies.
      DATA END OF field_tab.
      DATA : return_tab LIKE ddshretval OCCURS 0 .
          CLEAR field_tab.
          field_tab-fieldname = 'E_VALUE'.
          field_tab-intlen = 17.
          field_tab-outputlen = 17.
          field_tab-decimals = 2.
          field_tab-inttype = 'C'.
          field_tab-scrtext_m = 'Investment No'.
          APPEND field_tab.
          SELECT * FROM ZINVEST.
            CLEAR: itab.
            itab-e_value = ZINVEST-ZNO.
            APPEND itab.
          ENDSELECT.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'E_VALUE'
          dynprofield     = 'A'
          dynpprog        = sy-cprog
          dynpnr          = sy-dynnr
        TABLES
          value_tab       = itab
          field_tab       = field_tab
          return_tab      = return_tab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.

    Hi ester,
    You shud try this way. Try to use this code.
    DATA:  BEGIN OF it_help OCCURS 0,
           zuonr TYPE zvinvoice,
           kunnr TYPE kunnr,
           name  TYPE zvcustname,
           END OF it_help.
    SELECT-OPTIONS: p_zuonr FOR bsid-zuonr.
    SELECT DISTINCT
             zuonr
             kunnr
      INTO CORRESPONDING FIELDS OF TABLE it_help
      FROM bsid
      WHERE zuonr <> space.
      SORT it_help BY zuonr kunnr.
      DELETE ADJACENT DUPLICATES FROM it_help
      COMPARING zuonr kunnr.
      IF it_help[] IS NOT INITIAL.
        SELECT kunnr
               name1
               name2
        INTO TABLE it_kna1
        FROM kna1
        FOR ALL ENTRIES IN it_help
        WHERE kunnr = it_help-kunnr.
        SORT it_kna1 BY kunnr.
        CLEAR v_tabix.
        SORT it_help BY kunnr.
        LOOP AT it_help.
          v_tabix = sy-tabix.
          READ TABLE it_kna1 WITH KEY kunnr = it_help-kunnr
                                      BINARY SEARCH.
          IF sy-subrc EQ 0.
            CONCATENATE it_kna1-name1 it_kna1-name2 INTO it_help-name  
            SEPARATED BY space.
            MODIFY it_help FROM it_help INDEX v_tabix
                                        TRANSPORTING name.
          ENDIF.
        ENDLOOP.
    FORM event_selscr_valreq_for_pzuonr .
    ***Function module to display the search help for the assignment filed****
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield         = 'ZUONR'
          dynpprog         = sy-cprog
          dynpnr           = sy-dynnr
          dynprofield      = 'P_ZUONR'
          window_title     = text-029
          value_org        = 'S'
          callback_program = sy-repid
        TABLES
          value_tab        = it_help
        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.
    Reward if help ful.
    Regards
    Azad.

  • F4IF_INT_TABLE_VALUE_REQUEST and first selection of mult

    Hi All,
       I am using F4IF_INT_TABLE_VALUE_REQUEST and it works well, except for the first time.This is a regular report type program.
        o If one item/line is selected the first time, nothing is returned to the screen fields.
        o If more than one item is selected, the first one is lost. The second and other lines make it back to the screen field.
           o The actual values are not displayed until I right-click and select the 'multiple selection' option.
        o The next multiple selects always returns correctly- Whatever is chosen makes it to the bottom of the screen field.
        Using StepL or not does not seem to make a difference.
      Call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = RtField
          dynpprog        = l_prog             
          dynpnr          = l_screen           
          dynprofield     = specifichlpfld
          Value_org       = 'C'       
          WINDOW_TITLE    = WinTitle
          MULTIPLE_CHOICE = 'X'
        TABLES
          field_Tab       = OutField_Tab
          value_tab       = OutUsrAddrs    
          RETURN_TAB      = RETURN_TAB.
       Thanks for any help,
                       Dan P.

    Hi All,
        This is the code that shows the problem. It can be cut/pasted into a program for demostration.
    *& Report  YDMP_TRY2F4IN_INT_TABLE_VAL_RE                              *
    *& Author: Daniel Perecky                                              *
    *& Test prg for function module call F4IF_INT_TABLE_VALUE_REQUEST.     *
    *& Works, kind of.                                                     *
    *& o If one item/line is selected the first time, nothing is           *
    *&   returned to the screen fields.                                    *
    *& o If more than one item is selected, the first one is lost. The     *
    *&   second and other lines make it back to the screen field.          *
    *&      o The actual values are not displayed until I right-click      *
    *&        and select the 'multiple selection' option.                  *
    *& o The next multiple selects always returns correctly- Whatever is   *
    *&   chosen makes it to the bottom of the screen field.                *
    REPORT  YDMP_TRY3F4IN_INT_TABLE_VAL_RE          .
    Tables: User_Addrs.
    Selection-Screen Begin of Block EMAILN.
    Selection-Screen Skip.
    Selection-screen Begin of Line.
    Selection-Screen Comment 1(25) Text-013.
    Selection-screen End of Line.
    Selection-screen Begin of Line.
    Selection-Screen Comment 1(12) Text-015.
    Selection-Screen Position 10.
    Select-Options: GnrlF for USER_ADDRS-Name_First.
    Selection-Screen Position 63.
    Select-Options: GnrlL for USER_ADDRS-NAME_Last.
    Selection-screen End of Line.
    Selection-screen Begin of Line.
    Selection-Screen Position 68.
    Select-Options: GnrlSpMl for User_Addrs-BName.
    Selection-screen End of Line.
    Selection-Screen Skip.
    Selection-Screen End of Block EMAILN.
    Include type pool SSCR
    TYPE-POOLS SSCR.
    Define the object to be passed to the RESTRICTION parameter
    DATA RESTRICT TYPE SSCR_RESTRICT.
    DATA OPT_LIST TYPE SSCR_OPT_LIST.
    DATA ASSRTD   TYPE SSCR_***.
          CLASS CX_RPTERR_EXCEPTION  DEFINITIO
    CLASS CX_RPTERR_EXCEPTION DEFINITION
                            INHERITING FROM CX_STATIC_CHECK.
    ENDCLASS.                    "CX_RPTERR_EXCEPTION  DEFINITIO
    Initialization.
    Used for function module: 'SELECT_OPTIONS_RESTRICT'
      Clear Opt_List.
      Move 'JUST_EQ' to Opt_List-Name.
      Move 'X' to Opt_List-Options-Eq.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
      Clear Opt_List.
      Move 'NOINTERVLS' to Opt_List-Name.
      Move 'X' to: Opt_List-Options-CP,
                   Opt_List-Options-EQ,
                   Opt_List-Options-GE,
                   Opt_List-Options-GT,
                   Opt_List-Options-LE,
                   Opt_List-Options-LT,
                   Opt_List-Options-NE,
                   Opt_List-Options-NP.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
      Clear Opt_List.
      Clear Assrtd.
      Move: 'B' to Assrtd-Kind,
            'EMAILN' to Assrtd-Name,
            'I'      to Assrtd-SG_Main,
           'N'      to Assrtd-SG_Addy,
            'JUST_EQ' to Assrtd-Op_Main,
          'NOINTERVLS' TO Assrtd-OP_ADDY.
      APPEND Assrtd TO RESTRICT-***_TAB.
    Call function module
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
           EXPORTING
                 RESTRICTION                = RESTRICT
              DB                          = ' '
           EXCEPTIONS
                 TOO_LATE                   = 1
                 REPEATED                   = 2
                 NOT_DURING_SUBMIT          = 3
                DB_CALL_AFTER_REPORT_CALL  = 4
                SELOPT_WITHOUT_OPTIONS     = 5
                 SELOPT_WITHOUT_SIGNS       = 6
                 INVALID_SIGN               = 7
                REPORT_CALL_AFTER_DB_ERROR = 8
                  EMPTY_OPTION_LIST          = 9
                 INVALID_KIND               = 10
                 REPEATED_KIND_A            = 11
                 OTHERS                     = 12.
    Exception handling
      IF SY-SUBRC NE 0.
      ENDIF.
    Use same form for all three fields. Update all fields every time.
    At Selection-Screen on Value-Request for GnrlF-Low.
      Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
    At Selection-Screen on Value-Request for GnrlL-Low.
      Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
    At Selection-Screen on Value-Request for GnrlSpMl-Low.
      Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
    Start-of-Selection.
      Try.
    Some regular report code goes here.
        Catch CX_ROOT.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          Exit.
      EndTry.
    End-of-Selection.
    *=============================================================================================
    *| Form  GetFillUserInfo                                                                       |
    *| Get all user information from SAP tables and fill out Selection-Screen tables.              |
    *| Fill in all fields for user.                                                                |
    *=============================================================================================
    Form GetFillUserInfo Tables NameF Type Standard Table          NameL Type Standard Table
                                             SAPIds Type Standard Table.
      Data: NameFLoc Type Range of User_Addrs-Name_First with header line,
            NameLLoc Type Range of User_Addrs-Name_Last with header line,
           OutlookLoc Type Range of ZXX_Hrid-ZZ_EMail_Address with header line,
            SAPIdLoc Type Range of User_Addrs-BName with header line.
      data: step_line like sy-stepl.
      Types: Begin of UsrAddrsT.
      Types: BNAME Like User_Addrs-BName,
             NAME_LAST Like User_Addrs-Name_Last,
             NAME_FIRST Like User_Addrs-Name_First,
             NAME_TEXT Like User_Addrs-Name_Text,
             DEPARTMENT Like User_Addrs-Department.
      Types: End of UsrAddrsT.
      Data: UsrAddrsInt type standard table of UsrAddrsT with header line.
      Types: Begin of UsrAddrsT2.
      Types: Value(80) Type C.
      Types: End of UsrAddrsT2.
      Data: UsrAddrs type standard table of UsrAddrsT2 with header line.
      Data: Field_Tab type standard table of DFIES with header line.
      DATA: Return_Tab Type Standard table of ddshretval with HEADER LINE.
      Data: RtField Like DFIES-FIELDNAME,
            WinTitle(40) Type C.
    Generic F4 tables
      Data: OutField_Tab Type Standard table of DFIES with header line,
            OutUsrAddrs Type Standard table of UsrAddrsT2 with header line.
      Data: l_prog like syst-cprog,
            l_screen like syst-dynnr,
            specifichlpfld like Help_Info-Dynprofld.
      Data: TblSz Type I.
      l_prog = syst-cprog.
      l_screen = syst-dynnr.
        Select D2BName D2Name_First D2NAME_LAST D2Name_Text D2~Department
            From ( Usr21 as D1
              Inner Join User_Addrs as D2
              On  D1BName = D2BName )
              Appending Corresponding fields of table UsrAddrsInt
           Where D2~BName <> Space.
        Sort UsrAddrsInt by Name_Last Name_First BName.
        Delete UsrAddrsInt Where BName cs 'n/a' or ( BName = 'Z_USER' and Name_Text cs 'USER SAMPLE' ) or BName = 'SAMPLE'.
    Fill value table- one column data per row.
        Loop at UsrAddrsInt.
          If UsrAddrsInt-BName <> Space.
            Write UsrAddrsInt-BName to Usraddrs-Value.
          Else.
            Write space to UsrAddrs-Value.
          Endif.
          Append UsrAddrs.
          If UsrAddrsInt-NAME_TEXT <> Space.
            Write UsrAddrsInt-NAME_TEXT to Usraddrs-Value.
          Else.
            Write space to UsrAddrs-Value.
          Endif.
          Append UsrAddrs.
          If UsrAddrsInt-DEPARTMENT <> Space.
            Write UsrAddrsInt-DEPARTMENT to Usraddrs-Value.
          Else.
            Write space to UsrAddrs-Value.
          Endif.
          Append UsrAddrs.
        EndLoop.
        Select Distinct d1tabname D1fieldname D1Domname d1Datatype D1~position
               D1rollname D1inttype D1intlen D1leng D1Decimals D1outputLen
            From DD03M as D1
            appending corresponding fields of table Field_tab
          where
             DDLanguage = Syst-Langu  and
             d1~tabname = 'USER_ADDRS' and
             D1~fieldname in ('BNAME', 'NAME_TEXT', 'DEPARTMENT').
        Sort Field_Tab by position.
        Loop at Field_Tab.
          Select Single DDText
               Into Field_Tab-FieldText
            From DD03M
          Where Tabname = Field_Tab-Tabname and
             FieldName = Field_Tab-fieldName and
             DDLanguage = Syst-Langu.
            If Syst-Subrc = 0.
              Modify Field_Tab.
            Endif.
        EndLoop.
        RtField = 'BNAME'.
        WinTitle = 'Find Person(s) for SAP E-Mail'.
        specifichlpfld = 'USR21-BNAME'.
        Clear: OutField_Tab, OutUsrAddrs.  Refresh: OutField_Tab, OutUsrAddrs.
        OutField_Tab[] = Field_Tab[].
        OutUsrAddrs[] = UsrAddrs[].
      Call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = RtField
         stepL           = Step_Line
          dynpprog        = l_prog              " sy-cprog
          dynpnr          = l_screen            " sy-dynnr
          dynprofield     = specifichlpfld
          Value_org       = 'C'        "'S'
          WINDOW_TITLE    = WinTitle
          MULTIPLE_CHOICE = 'X'
        TABLES
          field_Tab       = OutField_Tab
          value_tab       = OutUsrAddrs      "SelFNames
          RETURN_TAB      = RETURN_TAB.
      If SY-SUBRC <> 0.
        If Syst-Batch = ' '.  " Online
          Sy-MsgTy = 'I'.
        Else.
          Sy-MsgTy = 'E'.
        Endif.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        If Syst-Batch = ' '.  " Online
          Raise Exception Type CX_RPTERR_EXCEPTION.
        Endif.
      Endif.
      CALL FUNCTION 'DYNP_GET_STEPL'
        IMPORTING
          POVSTEPL        = Step_Line
        EXCEPTIONS
          STEPL_NOT_FOUND = 1
          OTHERS          = 2.
      If SY-SUBRC <> 0.
        If Syst-Batch = ' '.  " Online
          Sy-MsgTy = 'I'.
        Else.
          Sy-MsgTy = 'E'.
        Endif.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        If Syst-Batch = ' '.  " Online
          Raise Exception Type CX_RPTERR_EXCEPTION.
        Endif.
      Endif.
          Loop at Return_Tab.
            Clear UsrAddrsInt.
            Read table UsrAddrsInt with key BName = Return_Tab-FIELDVAL.
            If Syst-Subrc = 0.
              NameFLoc-Low = UsrAddrsInt-Name_First.       " should be ok if blank- append anyway.
              NameLLoc-Low = UsrAddrsInt-Name_Last.
              sapIdLoc-Low = UsrAddrsInt-BName.
              Append: NameFLoc, NameLLoc, SapIdLoc.
              Clear: NameFLoc, NameLLoc, SapIdLoc.
            Endif.
          EndLoop.
      Loop at NameFLoc.
        NameFLoc-High = space.   NameFLoc-Sign = 'I'.   NameFLoc-Option = 'EQ'.    Modify NameFLoc.
      EndLoop.
      Loop at NameLLoc.
        NameLLoc-High = space.   NameLLoc-Sign = 'I'.   NameLLoc-Option = 'EQ'.    Modify NameLLoc.
      EndLoop.
      Loop at SapIdLoc.
        SapIdLoc-High = space.   SapIdLoc-Sign = 'I'.   SapIdLoc-Option = 'EQ'.    Modify SapIdLoc.
      EndLoop.
      Loop at NameFLoc.
        Move-Corresponding NameFLoc to NameF.
        Append NameF.
        Add 1 to TblSz.
      EndLoop.
      Refresh NameFLoc. Clear: NameF, NameFLoc.
      Loop at NameLLoc.
        Move-Corresponding NameLLoc to NameL.
        Append NameL.
      EndLoop.
      Refresh NameLLoc. Clear: NameL, NameLLoc.
      Loop at SapIdLoc.
      Move-Corresponding SapIdLoc to SAPIds.
        Append SapIds.
      EndLoop.
      Refresh SapIdLoc.   Clear: SapIds, SapIdLoc.
    EndForm.                    " GetFillUserInfo

  • F4IF_INT_TABLE_VALUE_REQUEST select entrie row

    Hello All,
    I have a VALUE_TAB internal table (<b>it_mngrp_mncod</b>) with 3 fileds. After selecting a row in F4 pop up, I need to get all the three column values. In return_tab I am getting only the last field, which is the value of CODE in it_mngrp_mncod. Is there any way to select the entire row in F4 pop up?
    Here is the piece of my code:
    *& Report  ZCK_TEST
    REPORT  zck_test.
    TABLES: viqmel, viqmfe.
    CALL SCREEN 101.
    *&      Module  code_pf4_i15  INPUT
    MODULE code_pf4_i15 INPUT.
      DATA: BEGIN OF it_mngrp_mncod OCCURS 0,
                 kurztext TYPE qtxt_code,
                 codegruppe TYPE qcodegrp,
                 code TYPE qcode,
                 END OF it_mngrp_mncod.
      DATA: it_returntab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
      DATA: it_fieldtab LIKE dfies OCCURS 0 WITH HEADER LINE.
      DATA p_field TYPE fieldname.
      GET CURSOR FIELD p_field .
      PERFORM code_pf4_f40 USING p_field.
    ENDMODULE.                 " code_pf4_i15  INPUT
    *&      Form  code_pf4_f40
    FORM code_pf4_f40 USING p_field.
      PERFORM get_f4_values CHANGING  p_field.
    ENDFORM.                    " code_pf4_f40
    *&      Form  GET_F4_VALUES
    FORM get_f4_values  CHANGING    p_field.
      DATA: field1 TYPE fieldname,
             field2 TYPE fieldname.
      DATA: p_katalogart TYPE qkatart.
      SPLIT p_field AT '-' INTO field1 field2.
      IF field2 = 'OTGRP' OR  field2 = 'OTEIL'.
        p_katalogart = 'B'.
      ELSEIF field2 = 'FEGRP' OR  field2 = 'FECOD'.
        p_katalogart = 'C'.
      ELSEIF field2 = 'URGRP' OR  field2 = 'URCOD'.
        p_katalogart = '5'.
      ELSEIF field2 = 'MNGRP' OR field2 = 'MNCOD'.
        p_katalogart = 'A'.
      ELSEIF field2 = 'TASK_CODEGRP' OR field2 = 'TASK_CODE' OR field2 =
    'TXT_TASKCD'.
        p_katalogart = '2'.
      ENDIF.
      SELECT codegruppe code INTO CORRESPONDING FIELDS OF TABLE
    it_mngrp_mncod FROM qpcd WHERE katalogart = p_katalogart.
      LOOP AT it_mngrp_mncod.
        SELECT SINGLE kurztext
                FROM qpct
                INTO it_mngrp_mncod-kurztext
               WHERE katalogart = p_katalogart
                 AND codegruppe = it_mngrp_mncod-codegruppe
                 AND code = it_mngrp_mncod-code.
        MODIFY it_mngrp_mncod FROM it_mngrp_mncod TRANSPORTING kurztext.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = p_field
      PVALKEY                = ' '
      DYNPPROG               = ' '
      DYNPNR                 = ' '
      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_mngrp_mncod
         field_tab              =  it_fieldtab
         return_tab             = it_returntab
      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.
      READ TABLE it_returntab INDEX 1.
      MOVE it_returntab-fieldval TO p_field.
    ENDFORM.                    " GET_F4_VALUES
    *&      Module  user_command_101  INPUT
          text
    MODULE user_command_101 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " user_command_101  INPUT
    *&      Module  status_101  OUTPUT
          text
    MODULE status_101 OUTPUT.
      SET PF-STATUS '0101'.
    ENDMODULE.                 " status_101  OUTPUT

    Hi,
    Paste following code as-is just before ENDIF. Then it should work fine.
      data: w_dynpro_field type dynpread.
      data: t_dynpro_field type standard table of dynpread.
      refresh: t_dynpro_field.
      move: sy-repid to d020s-prog,
            sy-dynnr to d020s-dnum.
      move: 'VIQMFE-OTEIL'   to w_dynpro_field-fieldname,
            viqmfe-oteil     to w_dynpro_field-fieldvalue.
      call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = d020s-prog
          dynumb               = d020s-dnum
        tables
          dynpfields           = t_dynpro_field
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.
    Hope this helps...
    Thanks,
    Murali

Maybe you are looking for