Problem in Search help in Table control

Dear ABAPers,
I am using the Table control.In that i am using F4 help.the F4 Value should be based o the
another field in the Table control.how to do this.
Thanks & Regards,
Ashok.

I had a similar requirement. In this table control the values for the F4 help for the shipping conditions depend on the vendor the user selects in the first column.
Here is my code:
PROCESS ON VALUE-REQUEST.
  FIELD gs_pod_screen-ship_cond
    MODULE f4_ship_cond.
MODULE f4_ship_cond INPUT.
  PERFORM f4_pod_shipping_conditions.
ENDMODULE.                 " f4_ship_cond  INPUT
FORM f4_pod_shipping_conditions .
  DATA: lt_return TYPE TABLE OF ddshretval,
        ls_return TYPE ddshretval,
        lv_line   TYPE i,
        lv_vendor TYPE bu_partner,
        ls_shlp   TYPE shlp_descr,
        ls_selopt TYPE ddshselopt,
        ls_if     TYPE ddshiface,
        lv_c(132) TYPE c.
* where on the table control did we hit F4?
  GET CURSOR LINE lv_line.
  READ TABLE gt_pod_sales
       INTO gs_pod_screen
       INDEX lv_line
       TRANSPORTING vendor.
  CHECK NOT gs_pod_screen-vendor IS INITIAL.
* the possible values always depend on the vendor => build it every time
* get the search help parameters first
  CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
    EXPORTING
      shlpname = gc_shlp_shipcon
    IMPORTING
      shlp     = ls_shlp.
* now we have to set restrictions based on the vendor
  CLEAR ls_selopt.
  ls_selopt-shlpname  = gc_shlp_shipcon.
  ls_selopt-shlpfield = gc_name_vendor.
  ls_selopt-sign      = gc_i.
  ls_selopt-option    = gc_eq.
  ls_selopt-low       = gs_pod_screen-vendor.
  APPEND ls_selopt TO ls_shlp-selopt.
* set the field for the output
  READ TABLE ls_shlp-interface INTO ls_if
       WITH KEY shlpfield = gc_name_ship_cond.
  IF sy-subrc EQ 0.
    ls_if-valfield = gc_field_shipcon.
    MODIFY ls_shlp-interface FROM ls_if
           INDEX sy-tabix TRANSPORTING valfield.
  ENDIF.
* pass in the base date and call the search help
  CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
    EXPORTING
      shlp                = ls_shlp
    TABLES
      return_values       = lt_return.
  READ TABLE lt_return INTO ls_return INDEX 1.
  IF sy-subrc EQ 0.
    gs_pod_screen-ship_cond = ls_return-fieldval.
  ELSE.
    CLEAR gs_pod_screen-ship_cond.
  ENDIF.
* transfer the value
  MODIFY gt_pod_sales
         FROM gs_pod_screen
         INDEX lv_line
         TRANSPORTING ship_cond.
ENDFORM.                    " f4_shipping_conditions
Hope that helps,
Michael

Similar Messages

  • Search Help on Table Control - Fill more than one field in the table?

    Hey everyone,
    I have built a screen with a Table Control on it... the fields of the table control are linked to an internal table...  The internal table has the line type of a structure I've defined in the data dictionary.  Within that structure in the data dictionary, I've linked some fields to search helps (For example, a MATNR and CUSTOMER search help)...  I've defined in the structure definition which fields from the search help are to be returned to which fields in the structure.
    The problem is, even though I have the search help set to export both the customer number and location when using the search help on the customer field, it still does not fill the location field within the table.  Is this a limitation of using search helps within table controls?
    I'm also finding that by defining the search help through the structure, instead of directly within the screen, the search help round button does not show up on the field, yet I can still press F4 to bring up the search help.  Is there a reason why it's not showing the search help clickable button even though it works fine using F4?
    For doing search helps in Table Controls, is it better to just build the search help, attach it directly to the field in the table, and then after the user picks the single field, use the PAI to run a select and fill the rest of the fields required?
    Thanks,
    Dallas

    Hi Dallas,
    (1)
    What  i understood is that you added a search help by defining it in the internal table type for a field customer number..in the search help you have 2 fields customer number and location...user press the search help ..then you need to fill 2 different fields or 1 field?
    if you need to fill the customer location or location (only one) then you need to set the "import" in the search help for whichever is required.....
    if you need to fill 2 or more different fields..then you can use the technique you have mentioned last , to do a select in PAI and fill the fields....but this you can use if the combination for the fields is unique...eg: u have customer number and location..if customer X can be mapped to location X and location Y..when a select statement is done there are 2 options..so in such cases it is better to leave the option to the user otherwise if there is a clear mapping like customer X can be mapped only to location X then you can use the select..
    (2)
    usually when you define it as a type in the internal table the icon doesn't show up..but you can do alternative like mentioned..go to the table,find the search help for the required field if present or create a new one if required and place the search help mentioned in the screen itself..so as to see the icon...sometimes users are adamant that they need the search help icon to be seen..so it depends on if your user
    (3)
    as in the example of customer number and location mentioned we can provide them different search helps and do the needful processing in PAI to fill the fields
    Table controls may be used for different purposes and requirements....even a checkbox,push button can be placed as a field in table control and used,but yes most of the time requirements are like what is mentioned in your case...
    Regards
    Byju

  • Search help on table control field which imports info from same record

    Hi Team ABAP,
    i got a slight problem here and kinda dont know how to proceed.
    I got a DDIC structure containing fields KSCHL and NACHA.
    Additionally i got a customizing table based on kschl, where allowed NACHA´s per KSCHL get customized.
    Now i got a table control, containing records of type of above described structure.
    I created a search help for Field NACHA which actually uses KSCHL as importing since we just want to see those NACHA´s allowed for the given KSCHL.
    Search help itself works fine. I got problems in how to tell it which kschl to import.
    I have coded an routine in event PROCESSES ON VALUE REQUEST.
    There i could do DYNP_VALUES_READ or get my data right out of the itab on which the table control is based. i just got the problem that i dont have a clue how identify which search help of which table control line got clicked.
    having a first look i dont see any of SY fields changing using different lines. So i´m stuck. any Ideas?
    regards
    Edited by: Florian Kemmer on Nov 30, 2010 9:01 AM
    Edited by: Florian Kemmer on Nov 30, 2010 9:01 AM

    Use FM [DYNP_GET_STEPL|http://www.sdn.sap.com/irj/scn/advancedsearch?query=dynp_get_stepl] "Current sy-stepl at Event POV", then use the returned povstepl value in DYNP_VALUES_READ (and DYNP_VALUES_UPDATE if required)
    Regards,
    Raymond

  • Search help for table control input value

    Hi,
    We have designed a GUI for supply invoice approval workflow with table control.
    In the table control fields, we assigned one search help on one field.
    We can enter the values(F4 Help) up 8 row in the default screen, which is having 8 row.
    After scrolling down for 9th row, I am not getting any F4 help, which I am able to get upto 8 rows.
    Please any one could help me in this...
    BR,
    Thirupathi

    Hi,
    Did you assign the search help to the <b>Search Help</b> of the <b>Attributes -> Dictionary</b> tab of the field?
    Irrespective of scrolling, the F4 help should work for the field in table control.
    Regards,
    Raj

  • SEARCH HELP IN TABLE CONTROL

    Hi friends,
           In dialog programming i am using table control for getting material details
          in material number field i am using search help "sales material description(MAT1S)"
          if i select the material number using search help then it display the sales organization
            i give "conver. exit" = MATN1
                    "search help" = MAT1S
    Thanks & Regards,
    Vallamuthu.M

    I solved my own

  • Search help in table control using attributes window in layout

    Hi.
    I am trying to use search help for my table control fields. the table control basically displays product details.
    I have a name field, description field and price field. I have named my field to match the the structure of my search help (stProducts-name, stProducts-description and stProducts-price respectfully). then for each i entered shProducts (my search help) in the search help field.
    However, upon running the program, in the name, description and price field, by clicking f4 the name of the product is displayed in the field irrespective to which column I am selecting. Also the values in the other fields are not affected.
    Any help would be appreciated
    Thank you

    Hi Charla,
    <li> Here is a sample program how to update other fields when you select f4 help for one field.
    <li> Need to apply in module pool program..
    REPORT zvenkat_f4_for_parameters MESSAGE-ID zmsg .
    TYPES:
       BEGIN OF t_t001w,
         werks       TYPE t001w-werks,
         name1       TYPE t001w-name1,
       END OF t_t001w,
       t_return_tab  TYPE ddshretval.
    DATA:w_t001w      TYPE t_t001w,
         w_return_tab TYPE t_return_tab.
    DATA:i_t001w      TYPE STANDARD TABLE OF t_t001w,
         i_return_tab TYPE STANDARD TABLE OF t_return_tab.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS :p_werks TYPE t001w-werks,
                p_name1 TYPE t001w-name1.
    SELECTION-SCREEN END OF BLOCK b1.
    " AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
      PERFORM f4_help_for_palant.
    *&      Form  f4_help_for_palant
    FORM f4_help_for_palant.
      DATA:
          w_dynpfields TYPE dynpread,
          i_dynpfields LIKE STANDARD TABLE OF dynpread.
      IF i_t001w[] IS INITIAL.
        SELECT werks name1
        FROM t001w
        INTO TABLE i_t001w.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'WERKS'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = 'P_WERKS'
          value_org   = 'S'
        TABLES
          value_tab   = i_t001w
          return_tab  = i_return_tab.
      READ TABLE i_return_tab INTO w_return_tab INDEX 1.
      p_werks = w_return_tab-fieldval.
      READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
      IF sy-subrc = 0.
        w_dynpfields-fieldname    = 'P_NAME1'.
        w_dynpfields-fieldvalue   = w_t001w-name1.
        APPEND w_dynpfields TO i_dynpfields.
        CLEAR w_dynpfields.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname     = sy-repid
            dynumb     = sy-dynnr
          TABLES
            dynpfields = i_dynpfields.
      ENDIF.
    ENDFORM.                    " f4_help_for_palant
    Thanks
    Venkat.O

  • Attaching search help to table control

    i want to attach search help to a field in table control. and based on that entry i want to fill the corresponding columns of that row

    HI Sarath,
    Welcome to SDN..
    Check out this thread ..
    How to create Search Help for a field in Table control !!
    Regards,
    Santosh

  • Assign Search Help to Table

    Hi All,
      I have created a custom check table which also has a text tables assigned to it. I have created a Elementary Search help for the check table and the selection method for the search help is the check table itself.
      The issue is when I goto the check table using SE11, I click on Extras --> Search Help for Table, it does not display the search help that I had created however the search help is displayed for a similar customizing table created by SAP, TVK8.
      I think I need to assign the search help to the custom table that I have created. I would greatly appreciate if anyone can tell me as to how I can assign the search help to the check table.
    Thanks,
    Vamseedhar K

    Check this link..Attaching to Check Tables
    http://help.sap.com/saphelp_nw04s/helpdata/en/63/1b70bfc32111d1950600a0c929b3c3/frameset.htm
    Also check this link.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70260b78-ff89-2a10-5eb0-d2f51467560b
    Also check the steps to create search help.
    This is how u can create "Search Help" for the fields of the ztables that u have created.
    SE11- Create Search Help for 1 field, "Selection Method" box put the Table name to which the field belongs to. "Dialog Type" box write: "Display Value Immediately".
    Search Help Parameter is the Field name for which u want the Help. Tick Imp & Exp options and assign LPOS = 1 and Enter. , save and Activate.
    SE11- Go to the table , Click on the Field that needs to be assigned a search Help....Click at the left side of the Field so that all the corresponding data Elements, Key field etc also gets selected.
    Click on the "Search Help tab" just above the "Data Type " column.
    Put the "Search Help" name that u just created. Mention the Field and Enter. it takes up the required values. Now Copy.
    U can repeat the process for whatever fields u want to assign a Search Help.
    se51- Go to Screen Painter, Select Fields from Dictionary table to which u want search help to be assigned.
    Double click on the Text box of the corresponding field,......> Screen Painter Attributes.......> Search help Text box.........> Enter the name of the Search help that u created for a field.
    Ok....>Save.........> Activate
    Now u should be able to get the Search help for the fields that u wanted to.

  • F4 help in table control. - Urgent  Please

    Hi all,
    Iam using F4 help in table control. when the user selects the data in F4 values 4 more fields that are displayed in the F4 has to be updated in the table control
    What function modules should I use to capture the f4 values and keep in the current table control record. Please help by sending some code.
    Helpful answers will be rewarded.
    Thankhs
    Aditya

    Hi ,
    Check out the follwing Eg.
    To read the remaining fields in the corresponding row use <b>dynpfld_mapping</b> parameters in Table option of F4 help Function Module.And then use <b>DYNP_VALUES_UPDATE </b> FM to populate into the screen fields.
    MODULE shlpcntno INPUT.
      DATA : BEGIN OF i_cntno OCCURS 0,
              contnum LIKE zmps_veh_entry-contnum,
              contsl LIKE zmps_veh_entry-contsl,
              END OF i_cntno.
      CLEAR: i_cntno,i_cntno[],i_return,i_return[],i_map,i_map[].
      SELECT contnum contsl FROM zmps_veh_entry INTO TABLE i_cntno.
      i_map-fldname = 'F0001'.
      i_map-dyfldname = 'I_CNTNO-CONTNUM'.
      APPEND i_map.
      CLEAR i_map.
      i_map-fldname = 'F0002'.
      i_map-dyfldname = 'I_CNTNO-CONSTL'.
      APPEND i_map.
      CLEAR i_map.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'CONTNUM'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'W_CONTNUM'
          value_org       = 'S'
        TABLES
          value_tab       = i_cntno
          dynpfld_mapping = i_map
          return_tab      = i_return.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT i_return.
        IF i_return-fieldname = 'F0001'.
          w_contnum = i_return-fieldval.
        ELSEIF i_return-fieldname = 'F0002' AND flag = 3.
          w_slno = i_return-fieldval.
          CLEAR: i_dynread, i_dynread[].
          i_dynread-fieldname = 'W_SLNO'.
          i_dynread-fieldvalue = w_slno.
          APPEND i_dynread.
          CLEAR i_dynread.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname                     = sy-repid
              dynumb                     = sy-dynnr
            TABLES
              dynpfields                 = i_dynread
          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.
      ENDLOOP.
    ENDMODULE.

  • Help views ( search helps) in tables

    Hello Experts,
    we are creating customized infotypes.Can anyone tell me how to create help views ( search help ) in tables.
    Regards,
    Shilpa.

    Helli Shipa
    You can create the search helps via se11 transaction and then attach the seach help from the field in table
    Regards
    Sonu Gupta

  • How to implement F4 help in table control

    Hi all,
    I am working on a table control in a module pool program. I have three fields in table control , material no. , material description and quantity. my requirement is , in table control , i need to provide the F4 help for material no. and material description, in a way, if i select material no. using F4, the corresponding material description field would be entered automatically in the table control field.
    Pls suggest me on this , if possible pls give me code or logic to do this.
    Thanks
    Saravan
    Moderator message: please don't post the identical question again after the first attempt was locked for good reasons. Search for available information before asking.
    Edited by: Thomas Zloch on Mar 3, 2011 11:54 AM

    Hi Saravana,
    Please search in SCN before posting. You will find many threads related to this question. The basic logic is you have to get the selected row of table control  using DYNP_GET_STEPL function in your POV. Then using function DYNP_VALUES_READ read the material and create the description to be displayed. You have use function F4IF_INT_TABLE_VALUE_REQUEST to display search help.

  • Transfering multiple fields from help in table control

    Hi everyone.
    I have a table control in a dynpro.
    The table control has many fields: x, y, z ...
    I have a module in PROCESS ON VALUE REQUEST for a field "x".
    The module calls a function to search values for field "x" and for field "y".
    How can I transfer the value of field "y" to the screen?
    I know that I can use the function DYNP_VALUES_UPDATE but it updates the field "y" in the wrong position of the table.
    Thanks so much for your help.

    Hi Sara
    It seems you are a new member; welcome to SDN forums. According to SDN customs, you can assign points to posts to thank people. You can do this by clicking the yellow star icon at header of each post. You can assign;
    - one 10 points (solved)
    - two 6 points (very helpful answer)
    - many 2 points (helpful answer)
    Kind regards...
    *--Serdar

  • Multiple selection in F4 help in table control

    Hi,
    I am providing F4 help for a particular field in the table control. User must be able to select multiple values from this F4 help this is done using the function module F4IF_INT_TABLE_VALUE_REQUEST. Now the selected fields have to be transferred to screen, this is done using FM DYNP_VALUES_UPDATE.
    My problem is i have 6 rows displayed in my table control. So only first 6 values from the user selected values are getting updated in my screen fields others are not getting updated. Say if the user selects 10 values out of them only 6 is populating in the screen. How do i get the others also? Please help.
    Thanks,
    Karthik

    Hi,
    Check the Following threads
    can we select multiple entries from a F4 result?
    Table Control dynamic F4
    After you select Multiple rows from F4 Help these are stored in RETURN table.
    Now in main program modify the Internal Table.
    In PAI
    loop at itab.
    " You can not handle this in this Loop
    endloop.
    module modify_from_f4
    process on value-request
    field fname module get_f4 " Here you get the F4 Help and the values are in RETURN tab
    in Program
    module modify_from_f4.
    " in this module you can use the RETURN TAB like
    loop at itab
    read table RETURN with key fnam = itab-fnam " and get the corresponding value and modify itab from RETURN tab
    if you can not find common fields and just want to pass the values then
    read table RETURN INDEX SY-TABIX. " IF the Itab is empty then follow below loop
    endloop.
    loop at return.
    move return-fieldvalue to itab-fnam
    append itab.
    endloop.
    endmodule.
    Cheerz
    Ram

  • Search help in table view of Module pool programming

    Hi SAP all.
    here i have created one screen in se80 and i have created one table control.
    in the table control i have created one field ,for that field i just want to have the search help refer to C_KUNNR.
    when i entered C_KUNNR in the search help box and click on from dictionary it is raising error message saying that table not active in ABAP Dictionary.
    can any body help me in this.
    regards.
    Varma

    Hi,
    In the main screen-.Goto Flowlogic->Goto Layout-->U can give Standard search help name DEBI.
    else.
    Use the Process on Value Request
    Regards
    Arbind

  • Problem in Search Help Exit

    Hi Experts,
    I have aproblem in Search help Exit. I have added tab to the standard search help by creating elemntry search help and assigned that search help to standard search help. I am calling function module for search help exit. I dont have any selection method.
    I am getting the epected results by using the funtion module F4UT_RESULTS_MAP. This funtion module displays all the results list. My only problem i have is when i select the value from the results list the value is not populating in to the field.
      CALL FUNCTION 'F4UT_RESULTS_MAP'
        TABLES
          shlp_tab          = shlp_tab
          record_tab        = record_tab
          source_tab        = lt_export
        CHANGING
          shlp              = shlp
          callcontrol       = callcontrol
        EXCEPTIONS
          illegal_structure = 1
          OTHERS            = 2.
      The callcontrol-step =  'RETURN'.
    how can i handle this step to populate the select record in the field.
    Thanks,
    Edited by: FRANCIS REDDY on Jun 11, 2008 5:42 PM

    Hi check my weblog: https://wiki.sdn.sap.com/wiki/x/du0

Maybe you are looking for

  • Photo Folders in IOS 7.1

    I have an iPad (2nd gen.) running IOS7.1 (latest update).  I want to have separate photo folders in IOS7. I was able to do this on my iPod (3rd gen.) running IOS 5.1. I want to do the same thing on the iPad. I tried to drag and drop the folders onto

  • IDOC to File, variable substitution on outbound message XML tag attributes

    My scenario is IDOC to FILE using XSL mappings.The target format is 2 XML tags (header, line) with the data stored in the attributes of each tag. EG. <header attr1=one attr2=two attr3=three><line attr1=one attr2=two /></header> The name of the file i

  • Differences between assets and G/L accts

    Differences between assets and G/L accts in the balance carried forward Message no. MQ 555 Diagnosis Differences occurred in the balance carried forward when comparing asset summary records and G/L accounts. Procedure Using program RFEWSBAL, select t

  • Sudo unable to open /etc/sudoers

    Whenever I try to do anything at all with sudo on my fresh x86-64 Arch install, it prints out this error: sudo: unable to open /etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin Thi

  • Canon EOS Utility won't quit gracefully

    I'm having real problems with Canon EOS Utility. I've updated to absolutely the latest version {2.8.1} and still it often (but not always) hangs around like a ghost after a session using Live View to control my Canon 7D from my MacBook Pro. In these