Dynamic Search Help in WDA Table

Hello Expert,
I would like to assign the standard search help for Webdynpro abap table in item level,
I know using the below code we can assign the search help for particular input field ,
DATA lo_nd_info TYPE REF TO if_wd_context_node_info.
           lo_nd_info = lo_nd_eqt_partner->get_node_info( ).
           CALL METHOD lo_nd_info->set_attribute_value_help
             EXPORTING
               name            = 'PARTNER' " Your attribute Name
               value_help_mode = '121' " Valid value help mode
               value_help      = 'DEBI'. " Search help name.
But my scenario is i have one table which is having threee columns,
Partner type   partner   name,
so based on the partner type i would like to call the standard search help ,
if the line item 1 is having partner type 'KU' then i need to assign DEBI search help
if the line item 2 is having Partner type 'LI' or 'AG' then i need to assign KRED search help ,
If the line item 3 is having Partner type 'AP' then i need to assign VKNK search help
so please help me to achieve the same.
Thanks,
Sankar

One method to achieve this functionality would be  :
1. Find out the maintenance screen and function group of the table maintenance generator say 2000 and ZFGRP.
2. Go to SE80 and open ZFGRP screen number 2000.
3. For Field number 1 , it is assumed that there is already a standard search help for it.
4. For field 2 - create a module in Process on Value Request Event in PAI of the maintenance screen ( Similar to any module pool program)
5. Use FM DYNP_VALUES_READ to read the value of field 1 on the screen ( Because this is before enter is pressed and field 1 on the module pool porogram would not be populated with value )
6.  While creating internal table for this FM, filter out all the values that are not required based on value obtained above.
call the FM F4IF_INT_TABLE_VALUE_REQUEST( In Process on Value request event of field 2 in PAI)

Similar Messages

  • How Can I get multi column values from dynamic search help?

    Hi Gurus;
    I'm using dynamic search help in my program.
    I want to get multi column values from search help. But I dont know solution for this issue.
    I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
    How Can I get multi column values from dynamic search help?
    Thanks.

    Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
    I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
    There are like 3 steps.
    You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
    Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined  (just to keep it straight, i will be putting here) data:  It_return type standard table of ddshretval.
    Next step is to call the function module. Make sure you have values in IT_VALTAB.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
            retfield        = 'FLD2'
            value_org       = 'S'
          tables
            value_tab       = It_VALTAB
            return_tab      = It_return
            dynpfld_mapping = It_dynpfld
          exceptions
            parameter_error = 1
            no_values_found = 2
            others          = 3.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        else.
          perform get_selected_fields tables It_return.
        endif.
    The code within the perform GET_SELECTED_FIELDS  - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
    I need a internal table as well as a work area here. like,
    data: lt_fields type table of dynpread,
            la_fields type dynpread.
      field-symbols: <fs_return> type ddshretval.
    so fill out LT_FIELDS from the IT_RETURN table
    loop at lt_return assigning <fs_return>.
        la_fields-fieldname = <fs_return>-retfield.
        la_fields-fieldvalue = <fs_return>-fieldval.
        append la_fields to lt_fields.
        clear: la_fields.
      endloop.
    Call the FM to update the dynpro
    call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-repid
          dynumb               = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
        tables
          dynpfields           = lt_fields
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    good luck

  • Dynamic Search-help in Selection Screen Parameter

    Hi,
    Please can you provide some solution for the below requirements.
    I have 2 fields ( Organization channel and Team ) in my selection screen. Under one organization channel there can be many teams.
    And I am trying a  dynamic search help on both the fields using event AT selection-screen on Value request and
    FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
    But I am facing the below issue .
    First I am giving some values in field 'Organization channel' . Then I am clicking on F4 button on my  2nd field 'Team' .
    and in debugging mode under the event  'At selection-screen on value request', Select option SO_Team is blank.
    The value provided in the Organiozation channel is not being captured in SO_TEAM-Low
    Please have a look on the below codes.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_team-low .
    if not  so_orgchannel-low  is  initial.      "Here so_orgchannel-low  value is coming as Zeros.
    select  * from HRP1001 into table GT_HRP1001
              where objid = so_orgchannel-low.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
                  retfield        = 'ORGID'
                  value_org       = 'S'
                  dynpprog        = 'ZTEST'
                  dynpnr          = '1000'
             TABLES
                  value_tab       = gt_hrp1001
             EXCEPTIONS
                  parameter_error = 1
                  no_values_found = 2
                  OTHERS          = 3.

    Hi,
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_team-low .
    "Add This  Begin
      CLEAR t_dynpfields.
      REFRESH t_dynpfields.
      t_dynpfields-fieldname  = 'SO_ORGCHANNEL-LOW'.
      APPEND t_dynpfields.
      w_repid = sy-repid.
    * reading Screen variables and Values
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname     = w_repid
                dynumb     = sy-dynnr
           TABLES
                dynpfields = t_dynpfields
           EXCEPTIONS
                OTHERS.
      READ TABLE t_dynpfields INDEX 1.
      so_orgchannel-low = t_dynpfields-fieldvalue.
    "Add this End
    if not  so_orgchannel-low  is  initial.      "Your code is here
    select  * from HRP1001 into table GT_HRP1001
               where objid = so_orgchannel-low.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
              EXPORTING
                   retfield        = 'ORGID'
                   value_org       = 'S'
                   dynpprog        = 'ZTEST'
                   dynpnr          = '1000'
              TABLES
                   value_tab       = gt_hrp1001
              EXCEPTIONS
                   parameter_error = 1
                   no_values_found = 2
                   OTHERS          = 3.
    Regards,
    Prabhudas

  • How to attach a search help in a table control coloumn based on the search

    Hi,
    Can anyone help me for attaching a search help in a table control coloumn based on the search help value of another coloumn
    in the same table control.
    Regards,
    Ratheesh BS

    check
    Re: Switch Search Help during runtime

  • Attach search help to standard table field

    Hi,
    I need to attach search help to standard table field VBKD-EMPST.
    I have create a z search help and taken acess key from SAP.
    But unable to attach this to standard table field.
    Kindly help.
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Oct 27, 2010 6:11 PM

    Hi,
    just go throw this link
    Re: Attaching Search Help to a field
    I hope this will help u
    Thanks
    Regards
    Akhilesh Singh

  • Dynamic value help for a table field to fill two fields, how to?

    Hi all gurus,
    In SRM 7 I defined a dynamic value help for a single field (ZZ_PROLE_R3) of my header custom table.
    That's the code from WDDOMODIFYVIEW in the webdynpro /SAPSRM/WDC_DODC_CT, view V_DODC_CT:
    DATA: lo_tabnode        TYPE REF TO IF_WD_CONTEXT_NODE.
          DATA: lo_tabnode_info   TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
          DATA: tab_value         TYPE WDR_CONTEXT_ATTR_VALUE_LIST,
                wa_value          TYPE WDR_CONTEXT_ATTR_VALUE.
          lo_tabnode = wd_context->GET_CHILD_NODE( name = 'THCUS' ). "the custom table node
          lo_tabnode_info = lo_tabnode->get_node_info( ).
          wd_this->GET_VALHELP_ZZ_PROLE_R3( EXPORTING iv_guid = lv_guid
                                            IMPORTING ZZ_PROLE_R3_VALHELP = tab_value ). "this method returns the dyn value table
          lo_tabnode_info->set_attribute_value_set( name = 'ZZ_PROLE_R3'
                                                     value_set = tab_value ).
    The method GET_VALHELP_ZZ_PROLE_R3 dynamically builds the value help table tab_value; such table is made up by two fields:
    value : contains the value of the field
    text   : contains a description of the value
    The above solution works; now I'd like to enhance it. The custom table THCUS contains also a field called ZZ_PROLE_R3_DESC, which represents the description of ZZ_PROLE_R3. It is, exactly, the TEXT field in tab_value.
    So I'd like to do as follows:
    - the user clicks on the search help for ZZ_PROLE_R3 field of the table;
    - the above described value help appears;
    - after the selection, both ZZ_PROLE_R3 and ZZ_PROLE_R3_DESC are filled with the selected couple value - text chosen from the value help.
    Could anyone help me achieving such a behaviour?
    Again, a little request... when I open the above value help dialog box, the window itself has a label "Floorplan Manager application for OIF.." that obviously I'd like to redefine (e.g. "Role selection value help"). Is there any way to do that?
    Thanks in advance

    Chris Paine wrote:
    It seems to me - given that your code is in wddomodifyview that you are trying to have different dropdowns per row
    - I'm not sure where you are populating lv_guid - but I'd guess it is an attribute of the row selected? If it isn't then I can't see any reason that you would do this code in wddomodifyview and not wddoinit.
    Hi Chris and thanks for your help,
    lv_guid is the GUID of the document's header; I need to pass it to the method that populates my value help table because the values in it are derived from some fields on the document. (the situation actually is more complex; there's an RFC call on the backend for which the document is intended for to retrieve the data that populate the value help...).
    I'm quite unexperienced on webdynpro and terminology; if dropdown menus are fixed selection option that appears on a field, I guess this is not my case. I did a pair of screenshot to provide an idea of what the solution by now is, and what "I would like to have":
    [Pre-selection (F4 icon on the field in table)|http://imagebin.ca/view/npIsaqF.html]
    [Value Help popup for the field ZZ_PROLE_R3|http://imagebin.ca/view/8fZUh3T.html]
    [Result by now |http://imagebin.ca/view/3PaqdvE.html]
    [Result I'd like to have.|http://imagebin.ca/view/dExR0J.html]
    Chris Paine wrote:
    However - by your comment on the "value help dialog box" I am guessing you are using an input field? If this is the case then I would strongly suggest that you change/enhance the structure of the context node THCUS (btw, better coding practise to refer to it as wd_this->wdctx_thcus when using the get child node construct) so that you refer to an actual SAP ddic search help, if you then associate in the structure the value and text fields then populating the text field should happen automatically. Also you'd have the nice side effect that your value help dialog would be named after the associated ddic search help.
    Thanks for the code suggestion, I'll apply that. For what concerns the context node THCUS... It is, by standard, a node which I can't explictly find in the context for the view V_DODC_CT. The problem is that ZZ_PROLE_R3 and the corresponding description field ZZ_PROLE_R3_DESC of the table must be filled with data retrieved dynamically @ runtime from the backend. So I guess I can't populate a val help referring to a dictionary table/field; I'd rather do as follows:
    - retrieve what's the target backend for the document (to do so, I have to process the document .. that's why the header guid passed to my method);
    - RFC call to a custom method that extracts possible values for the specific backend;
    - bind the ammissible values to the value help.
    Chris Paine wrote:
    I realise that this is rather a lot - so if you have any specific question please do respond - hopefully I or someone else will be able to clarify.
    Thanks again for your help; additional info as well as code examples would be highly appreciated

  • How to put dynamic search help in web dynpro ABAP.

    Hi,
    I have a table element with two columns in my web dynpro ABAP.Both the columns are F4 helps.
    Based on the value of the first column,the F4 help of second column must change dynamically.Kindly tell me how to do this.
    Thanks & Regards,
    Raji.

    Hi ,
    Use this code to dynamically assign search help and to deactivate search helps.
    data lo_nd_info type if_wd_context_node_info.
    lo_nd_info = lo_nd->get_node_info( ).
    CALL METHOD lo_nd_info->set_attribute_value_help
    EXPORTING
    name = 'ATTR1' " Your attribute Name
    value_help_mode = '121' " Valid value help mode
    value_help = 'Z187442'. " Search help name
    The various possible values that you can pass to value_help_mode are as shown below.
    deactivated 101
    automatic 111
    ddic 121
    ovs 131

  • Search help icon in table

    Hi,
       While using OVS(Object value selector) search help or any other search help in table column, We are not finding the f4 help icon in the table column.
    Is there any method to get the f4 help icon?
    Regards
    M.Karthiheyan

    Hi,
    You can refer following thread, it is for the similar requirement of displaying Icon --
    [How to display different icon within WDA alv table base on row data ?;
    Here you need to code in Method for OVS rather than DOINIT, as specified in the thread for their scenario.
    Thanks.
    Kumar Saurav.

  • Search help to a table field

    Hello Folks,
    I have an immediate requirement to assign a search help to a specific field in a Table.Requirement is as follows:
    requirement:
    I want the search help to be populated for the field HRP1000-SHORT when HRP1000-OTYPE='O'.
    Values of search help are to be populated from another Custom table field1 where field2 = 'x'.
    Please help me out in fixing this.

    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    parameters: p_vbeln type vbak-vbeln,
                p_posnr type vbap-posnr.
    at selection-screen on value-request for p_posnr.
      data: begin of help_item occurs 0,
              posnr type vbap-posnr,
              matnr type vbap-matnr,
              arktx type vbap-arktx,
            end of help_item.
      data: dynfields type table of dynpread with header line.
      dynfields-fieldname = 'P_VBELN'.
      append dynfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = sy-cprog
                dynumb               = sy-dynnr
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynfields
           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.
      read table dynfields with key fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = p_vbeln
           importing
                output = p_vbeln.
      select posnr matnr arktx into table help_item
                     from vbap
                          where vbeln = p_vbeln.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'POSNR'
                dynprofield = 'P_POSNR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_item.

  • FM to find Search help for a table field

    Hello Colleagues,
    is there any function module which would return the search help associated with a table field ?
    I tried with the FM F4IF_DETERMINE_SEARCHHELP but it returns search help that is associated with either to table field DE or search helps associated with the value table fields. I need to find only
    the search helps that are associated with a table field but not the value tables or fixed values.
    For ex. If i pass table_name = 'SFLIGHT' and field_name='CARRID' then it should return me S_CARRIER_ID. but if i pass field_name='CONNID'  then it should return nothing..
    Best Regards, JVR

    Hi Kishore,
    Use the Function Modulein the F4 help associated with a table field ...
    CALL FUNCTION ' HELP_VALUE_GET"
    EXPORTING
      fieldname =  'CARRID'  "field name in the table you refer
      tabname = 'SFLIGHT'   "Table name
    IMPORTING
    select_value = S_CARRIER_ID.  "Selected field
    Regards,
    Prabhudas

  • Dynamic search help for one field of the SM30 generated maintenance view

    Hi experts,
    I have one Z* table with three fields. For that table I have generated maintenance dialog in SE55 so I can now run the maintenance in SM30. My requirement is: as soon as a user enters a value for the first field, the search help for the second field should be depended on the value in the first field. Let's say when user entered value 01 into the first field then the search help for the second field should be S_HLP01. For other values entered into the first screen the search help for the second field should be S_HLP02. Both search helps are standard (the names differ).
    Is there any change how to achieve this without making completely new dynpro transaction?

    Hi ,
    You can try it this way.
    pass your match-code( search help to function ) HELP_VALUES_GET_WITH_MATCHCODE and get the value and update it in  your screen field.
    But you have to modify the flow logic in POV event. it would be better if you create your own transaction because once the maintenance is regenerated your modified flow logic will vanish

  • A problem creating a Search Help against domain table dd07v...

    At present I use FM DDIF_DOMA_GET to retrieve the Domain Values for a given field/domain. I then populate a drop-down list box with these values and use in a conventional dynpro.
    However, what I would like to do is create a search help against the field characteristics which access table dd07v and retrieve the values for the domain. I'm stuck on the search help part because I don't know how to define the domain name within the search help so that the correct dd07v values are retrieved..
    Do you think this is possible, or should I give up now.?.
    Jas

    Problem resolved. You can hard code values, like the domain name within the search help.
    Although I have found that if you don't use a search help and you have domain values then your drop-down list values will be automatically populated from the domain values for the field. At least in my dynpro it does.
    Jas

  • Connect search help to standard table

    hi!
    i want to connect search help to structure P0001-MSTBR, without a repair.
    is it possible? and if so how?
    regards
    yifat

    Hi,
    If you want to add a search help to a structure or a table, it would eb a modification. No other way.
    However, you could decide to program the F4 in your transaction. You could then make use of the FM F4IF_INT_TABLE_VALUE_REQUEST. Just pass to this FM, an internal table of values. Ofcourse you would have to populate some other fields like field name, etc.
    Remember to reward points.
    Rgds,
    Prashanth.
    SAP.

  • Dynamic Search Helps In An Input Field

    Hi Experts,
              I need to populate an input field with different search helps based on the user action i.e when user selects "Audit"  i hav to show the audit search help for my input field, when he selects  "Audit Plan" i would hav to show audit plan search help.
    My Questions >
    1> i intend to use the method set_attribute_value_help of the interface if_wd_context_info and do the coding as :-
    data lo_nd_info  type if_wd_context_node_info.
      lo_nd_info = lo_nd->get_node_info( ).
    CALL METHOD lo_nd_info->set_attribute_value_help
            EXPORTING
              name            = 'identification' (attribute Name)
              value_help_mode = '121'
              value_help      = 'plm_auditplan'.(Help Name)
    Is this the correct way to go if not plz suggest a more appropriate method.
    2> in the context for that attribute ,what should i specify for the property input field
        Input Help Mode
        i.e should it be deactivated , automatic or should i give the dictionary serach help and specify  one of the search helps by giving its name.
    Your responses will be greatly appreciated,
    Chaitanya.

    Hi Ebru,
    Yes, it is possible using OVS, freely programmed and dictionary help.
    For OVS, refer this blog: /people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap
    For Dictionary Search Help, refer http://help.sap.com/saphelp_nw70/helpdata/EN/47/9f724642314aabe10000000a42189b/frameset.htm
    For freely programmed, refer:
    http://help.sap.com/saphelp_nw70/helpdata/EN/47/9ef8cc9b5e3c5ce10000000a421937/content.htm
    I hope it helps.
    Regards
    Arjun

  • Dynamic Search Help  in webdynpro abap

    Hi,
    I have 2 fields in my UI- say Object Type and Object Name. Both the fields are search helps which i have created.
    Based on the selection made in the Object Type, the Object Name search help will be populated with values accordingly.
    For Ex: Object Type can have values - Program, Project Cluster, etc.
    If i select Program, then in my Object Name search help i should get values ERP Package 5.0, Netweaver, etc
    and if i select Project Cluster, then in my Object Name search help i should get values HCM, FIN, etc.
    How can i do this?
    Regards,
    Wilma.

    Hi Ralf.
    I checked the test application WDR_TEST_DDIC_SHLP. If it had behaved like the way you explained, then it would perfectly match my requirement.
    But in the test application, in the search help for Country, there are no values for the country that i can select and only cities can be selected. The entry that i select in the input help for Country forms the input for the city field.
    Kindly check and let me know.
    Regards,
    Victoria Wilma

Maybe you are looking for

  • How to set  password for BPEL domain

    Hi, I am new to SOA. I want to setup client-server environment for few developers. I installed SOA 10.1.3.3 in the server machine. And I created few domains in BPEL, one for each developer. It didn't ask me to set the password while creation of the d

  • Reset password and now cannot connect to the internet

    I tried to reset my airport password, and now airport utilities cannot locate the base station and the password is said to be invailid when I enter it, or it repeatedly askes for the password with not change.  Any tips??

  • CATS-Cost table

    Hi all, I am trying to generate a new report for CATS time entries. In which table can I get the cost for the particular hours confirmation per employee (Not cost of the PM order as a whole; instead the confirmation wise cost data) Can anyone please

  • A good book on the innards of Mac OS X

    Always been a mac person but since the switch over to OS X I do not have the grasp I use to have on the underlying info like OS 9. Can anyone recommend a good book that describes in English what the /etc folder does, when to use the NetInfo Manager..

  • Coldfusion 9.0.1 64 bit installation for multiserver configuration

    Hi, I am trying to install Coldfusion 9.0.1 64 bit in one of my server(Windows server 2008 SP2 64 bit machine), but Enterprise Multiserver configuration is disabled. And it is saying that JRun4 is detected and asking us to uninstall. I had uninstalle