Default selection of dropdown value help in bp search for custom field

Hi guys,
i've problem setting a default selection of the value help. I appended a structure containing a field of type CRMT_BOOLEAN to the crmt_bupa_il_header_search and show it at the bp search page.
The default order of the value help is
[ ] false
[x] true
which means that the first entry (false) is selected by default. I want the second entry to become the default entry. I tried to sort the ddlb_table of this field in the get_v_xxx but this didn't had any effect to the value help.
DATA:  lt_ddlb TYPE  bsp_wd_dropdown_table,
lr_ddlb TYPE REF TO cl_crm_uiu_ddlb.
lt_ddlb = cl_crm_uiu_bt_tools=>get_strcmp_ddlb(
iv_structure = [structure]
iv_component = [my_zfield])
IF NOT lr_ddlb IS BOUND.
CREATE OBJECT lr_ddlb
TYPE
cl_crm_uiu_ddlb
EXPORTING
iv_source_type = 'T'.
ENDIF.
SORT lt_ddlb DESCENDING BY key.
lr_ddlb->set_selection_table( it_selection_table = lt_ddlb ).
rv_valuehelp_descriptor = lr_ddlb.
Is this approach not working at all? After sorting lt_bblb contains the values in correct sequence, the webui is showing the value help as before.
Is it possible to set a selected value in any way?
Thanks and BR,
Sven

Hi Sven Wagener,
what i understand is you want to set the default entry is second value right?
if this is your requirement then go for this procedure.
In redefine do_init_context method and fetch the collection in that collection get your field name and value.
make a condition like this if the value = 'first value of your drop down' then set to second value.
this method will execute only in the initial stage means when ever you login into your business role this method will execute.
example:
lr_col ?= me->typed_context->yournode->collection_wrapper->get_current( ).
check lr_col is bound.
lr_col->get_property_as_string( EXPORTING iv_attr_name = 'DROPDONWFIELD' RECEIVING rv_result = lv_dropdownfield ).
if lv_dropdownfield EQ 'FIRSTFIELDKEY'.
lv_dropdownfield = 'SECONDFIELDKEY'.
lr_col->set_property( EXPORTING iv_attr_name = 'DROPDONWFIELD' iv_value = lv_dropdownfield ).
IF this is not your requirement then give me some screen shorts.
Thanks & Regards,
Srinivas.

Similar Messages

  • How to search for a field and its value in an internal table

    Hi,
    I want to search for a field(which i dont know whether it exists or not) in an internal table and on finding that field, I have to update the value of that field. How do I do it? I think its similar to how SEARCH works but i wanted to know the internal table eqivalent of it.

    Hi Sujay,
    this code will help ful to u, just gi through it,
    TABLES : KNA1,VBAK,VBAP.
    ***********INTERNAL TABLE DECLARATIONS****************
    DATA : IT_KNA1 TYPE TABLE OF KNA1,
           WA_KNA1 TYPE KNA1.
    DATA : IT_VBAK TYPE TABLE OF VBAK,
           WA_VBAK TYPE VBAK.
    DATA : IT_VBAP TYPE TABLE OF VBAP,
           WA_VBAP TYPE VBAP.
    START-OF-SELECTION.
      SELECT * FROM KNA1
      INTO TABLE IT_KNA1
      WHERE KUNNR = P_CUST.
      IF NOT IT_KNA1 IS INITIAL.
        SELECT * FROM VBAK
        INTO TABLE IT_VBAK
        FOR ALL ENTRIES IN IT_KNA1
        WHERE KUNNR = IT_KNA1-KUNNR.
        IF NOT IT_VBAK IS INITIAL.
          SELECT * FROM VBAP
          INTO TABLE IT_VBAP
          FOR ALL ENTRIES IN IT_VBAK
          WHERE VBELN = IT_VBAK-VBELN.
        ELSE.
          WRITE : / 'Customer',P_CUST,'does not exist ......'.
        ENDIF.
      ELSE.
        WRITE: / 'sales order does not exist for',P_CUST.
      ENDIF.
    Rewards points plz if useful
    Ganesh.

  • Crm pc ui F4 Help does not work properly for custom field

    Hi ,
    I am having a issue with F4 help. For a custom field I have enabled BP search. The custom field gets populated with selected BP number from the search screen.
    Problem is, 
    Once opportunity is saved, for standard fields BP name gets displayed while for my custom field BP name does not get displayed only BP number stays at the place.
    What should be custom field size to accomodate BP selection?
    Have anybody done something like assigning BP search with custom field ?
    Any Ideas if I am missing something?

    Hi Bhatt,
      Your problem isnt in the F4 application. The problem is the logic of class corresponding to fieldgroup that your field is contained.
      You need a development like standard.
    Regards.
    Manuel

  • Reg : F4 help for custom fields in ALV report

    hi friends..
    in my internal table i have fields including 1 custom field..
    DATA : BEGIN OF i_final OCCURS 0,
      pernr LIKE p0000-pernr,
      begda LIKE p0000-begda,
      plans LIKE ZPOSITION-plans,  (custom)
      werks LIKE pspar-werks,
      end of i_final.
    i want to display this i_final table in alv. for that i genetrate one fieldcatalog
    PERFORM fcat USING:
                      'I_FINAL' 'PERNR' 'P0000' 'PERNR' '15' 'X' '',
                      'I_FINAL' 'BEGDA' 'P0000' 'BEGDA' '10' 'X' '',
                      'I_FINAL' 'PLANS' 'ZPOSITION' 'PLANS' '8' 'X' '',
                      'I_FINAL' 'WERKS' 'PSPAR' 'WERKS' '14' 'X' ''.
    in custom table zposition, i maintain serch help for custom field "PLANS".
    then i used reuse_alv_grid_display.. for all the std fields along wit custom fields
    i got f4 all std fields but for my custom i am not getting the f4 help
    how can i get the F$ help for this custom fields Zposition-plans..
    plz give some idea

    Hi
    In that Ztable against the field
    PLANS give the check table name as  <b>T528B</b>
    then it will automatically give the search help
    or you can create your own search help(elementary) and add to that field
    Reward if useful
    regards
    Anji

  • Search Help for Custom field in Sourcing Cockpit

    Hi SRM Experts,
    I added custom field "rush order" in the Structures as per requirement. I added code in MODIFY_SCREEN function module. Search help is working for "rush order" in Process Purchase Orders (to search PO) and Check Status (Searching Shopping Cart). But it is not working in sourcing cockpit. Please guide or suggest me is there any additional settings or programming is required to have search help for custom fields in Sourcing Cockpit.
    Thanks a lot in advance.
    Thanks,
    Koyya

    Hi SRM Experts,
    Please let me know any suggestion on this issue.
    Thanks a lot in advance.
    Thanks,
    Koyya

  • Help will not search for search term

    CS6, Windows XP. When accessing online help for CS6 applications, InDesign for example, InDesign Help / Help and Tutorials screen comes up. There is a box, Adobe Community Help with space for a search term and magnifying glass icon and the icon of the application for which I want help.  When I type in the search term and click on the magnifying glass or hit Enter,  nothing happens. Help does not search for term in question. What am I missing?

    If the PDF is not a scanned image, can you share it with us: https://forums.adobe.com/thread/1070933

  • The value 1 is not allowed for the field variace key

    Hi experts,
               When i was creating material master i was getting the status message as "the value 1 is not allowed for the field variance key" , but its stopping there its not moving out of that screen and creating the material record. When i see this field in the material master configuration its an optional field. Can you give me suggestions, where it can go wrong.
    Thanks & Regards,
    Ravi.

    Hi
    Can u tell me the field name . I cant get that field ref key. In which view does it come.
    Reg
    Raja

  • Negative values for Custom field in SAP coding block !

    Hi All,
    Hope all of you are doing fine.
    I need your valuable suggestion/possible workaround for the following requirement.
    u2022 The project requires me to add a custom new field to SAP coding block, which can take negative numeric values.
    u2022 The standard u201Caddition of custom fieldu201D configuration allows me to have the data type of the newly added custom field as either NUMC or CHAR. NUMC data type does not allow negative values. Standard configuration does not allow me to choose other data types (for custom field addition) like QUAN which can allow negative values (by checking the Sign at domain level in data type).
    u2022 Moreover, once I have added the custom field, itu2019s not possible to change the data type of the newly added field (say from NUMC to QUAN).
    I wanted to know if anyone of you have any project experience/knowledge about possible workaround, where we can add a custom field in SAP coding block, which can accept negative numeric values (through standard configuration or otherwise).

    No experience on that, but I strongly advise you to not trying to do something else than what was designed by SAP. So, you can create a character type field, with for example a field exit (though this technology is obsolete, it's very useful in that case) to validate its content (and reformat it if needed).
    Note that from a functional perspective, I think an amount is strange in the coding block, so maybe ask the functional people to know why they need it...

  • Restricting dropdown values corresponding to a search criterion

    Hi,
    I want to restrict the dropdown values for search criterion 'Status' in the search opportunity view.This has to be restricted to the search popup we get when we select 'Add Opportunity' in the sub-opportunity assignment block.The restricted dropdown values of the popup should not get reflected else where .
    I want only 3 values in the dropdown corresponding to the 'Status' search criterion.
    How should i go about?
    Thanks and Regards
    Shilpi

    Hi Shilpi,
       On the pop-up view in the method DO_INIT_CONTEXT, you must be populating the values in the context node used for your drop-down list. So while setting the values to the context node used for displaying the values for the drop-down box, you can alter the internal table values.
    for example something like this,
    MY_DROPDOWN is my context node on the popup view.
    LT_VALUES has teh values that i wish to display in the drop-down list
    so in the DO_INIT_CONTEXT method of the popup view,
    ME->TYPE_CONTEXT->MY_DROPDOWN->SET_VALUE_TABLE( LT_VALUES ).
    The SET_VALUE_TABLE method called with reference to the context node will set the values in the internal table passed to the drop-down list.
    hope this helps you to resolve your problem
    Regards
    Ashwinee

  • Value help does not work for ONE person only !

    Hi,
    we have a strange problem. In the Web IC, we are using a standard value help for the country field for a Business Partner. This works fine for everyone (ie, it picks up the country and slots it into the field) except one person. For her, it never returns any value into the country field. We are guessing that it's not Web IC related but is something in her browser settings etc...but haven't been able to pin it down. Can anyone offer any advice on this ?
    thanks for looking.
    Malcolm.

    Hello Malcolm,
    If this error occurs for one user only it's definitely related to the clients PC.
    Did you already delete all temporary files and the cookies on that PC? Usually this does the trick!
    If this does not solve the problem, try to let that particular user login on another PC where the problem does not occur. (If the error does occur on another PC too it's probably profile/authorization related)
    Hope this helps!
    Regards,
    Joost

  • "F4" search-help for custom field in PCUI

    Hello all,
    Does anyone know how I can create my own simple F4-help for a custom field I have added to a custom Tab Page in the PCUI? It should show a selection from a custom table.
    I couldn't find an useable example in the PCUI-cookbook.
    Any ideas anyone?
    Kind regards,
    Martijn de Jong.

    Hi Manuel,
    I saw that paragraph but didn't know how to implement it. Maybe you or someone else can explain/translate in steps what I have to do, according to the text underneath, i want to use a combobox:
    "If you want the application to specify the values for selection (within popup or dropdown list box or
    combobox (COBX respectively TIME)) at runtime instead of using predefined domain values, data
    must be provided by the application via the method FILL_DROPDOWN_LISTBOX. That scenario
    works if the field type is "Input Field" and the F4 application is set to "VALUE_TABLE". With these
    customizing settings, the method FILL_DROPDOWN_LISTBOX of the interaction layer is called at
    runtime and the actual field values will be passed to the application via importing parameter
    IT_SCREEN_STRUCTURE. Thus the application can provide context-sensitive help values within a
    popup or a dropdown list box respectively combobox (COBX respectively TIME). Within the popup
    more than one column of values can be displayed."
    How/where do I (re)define method FILL_DROPDOWN_LISTBOX? Do i have to maintain an own class? and how do i ensure that more columns are shown?
    Kind regards,
    Martijn de Jong.

  • F4 help for custome field

    Dear All,
    I have created one 'Z' InfoObject for some characteristic and i am using the same in mandatory selection parameter for query also. Now this query run monthly only and accordingly data will be loaded and manipulated. So when i choose F4 for that Z field it will show data only for that month but client wants the complete list of Z fields in F4 for paticular fiscal year.
    How can i achieve this?
    Regards,
    SS

    Hi,
    In the infoObject definition (in RSA1) go to the Business Explorer tab.
    There in the General Settings you have an option 'Query Execution Filter Val. Selectn'. This field describes how the selection of filter values functions when a query is executed.
    Here select the 'Only values in infoProvider' option.
    Now run your query and try.
    Hope this helps!
    Regards,
    Saurabh

  • F4 help for custom field

    Hi Experts,
    we have created custom field in SAles order and try to maintain a F4 help for that.
    we have created Search help with search help exit,when we click on F4 help the values are getting populated currectly in the pop-up in UI.  issue is when we select value from the multiple values the value is not getting replicated in the custom field.
    can you please let me know what the issue will be.
    Thanks in advance.
    Regards,
    Anil

    Hi Sheshagiri,
    Thanks for the reply.
    but the issue i think is not with the search help.
    search help we have created and the values are retrived correctly.
    when we select a value from the populated values the values is not been replicated in the specific field.
    please help me on this.
    Regards,
    Anil

  • Get value based on column names for custom metadata field of Webcenter Content

    In UCM, I created a custom metadata field of type Text.  I then enabled optlist in that field.  I populate values to the optList, I am using a View.  The View has three columns.  Let us call them ID, Key, Value.  OptList displays the Keys in its list.  I then create a Content (Content ID: MyContent) in Webcenter Content and choose values from OptList for my new metadata field (MyField).
    From Webcenter Portal, I am populating a selectOneChoice with values of MyField in the Content ID: MyContent.  Remember from previous step, the values populated in selectOneChoice is the list of values selected from optList field MyField.  This optList is in-turn populated from View.  After the user selects a value in selectOneChoice, in Javascript, I need to alert a message in this format "value chosen - corresponding value from View of optList that populates MyField"
    I think an example will be useful:
    Here is a View that I created in Configuration Manager applet in Admin Applets of Webcenter Content:
    ID | State | Capital
    1 | North Carolina | Raleigh
    2 | California | Sacramento
    3 | Illinois | Chicago
    Then, I create a Custom Field (Name: MyField).  MyField is an optList the values are populated from View created above.  The internal value and display value are both State.  Then I Check-In a new content with Content Id: MyContent.  For MyContent, I select these values from OptList for MyField: {North Carolina, Illinois}.
    In my Webcenter Portal application, I create a Content Presenter Taskflow.  I configure it as a single item content presenter.  I assign MyContent as Content Id.  Then, in templateView, I get all values of MyField in MyContent and display them as selectOneChoice.  I created a javascript function that would get the value that user selected in selectOneChoice.  In the View created in Webcenter Content's Configuration Manager (above), there is a value corresponding to each value displayed.  So, for the selected value, I need to get the corresponding Capital and display it in my alert message.
    From Javascript, how can I get the value of Capital, given I have the value of State.

    Hi.
    The idea to achieve your requirement is next:
    Create a helper manage bean that will be call as Map access: #{stateUtil['Calofironia']} (it will return Raleigh). This value will be get calling GET_SCHEMA_VIEW_VALUES IDC service using RIDC in your manage bean.
    Pass the result of #{stateUtil['statename']} to your JavaScript function using <af:clientAttribute.../>
    I hope this information help you.
    Regards,

  • Help with F4 search on additional field in Infotype 0045

    Hi guys,
    I have created an additional field in Infotype called 'Payee_Key' of type P0057-EMFSL. I have to create F4 help for that field. However when creating F4 help through foreign key it is showing all tha values for EMFSL in the table.
    I want the F4 help to be like Payee Key field of Infotype 0057 , where only specific country values of EMFSL , depending on the employee number are shown. not all values.
    Please help me out. Thanks.
    Edited by: soumyajit DM on Dec 15, 2010 10:42 AM

    Hi Zafar,
    Here is the answer to your question:
    1) Create a class say ZABC_F4 that implements the IF_BSP_WD_CUSTOM_F4_CALLBACK interface.
    2) Create method RETRIEVE_CUSTOM_VALUES with below parameters in that class:
    CT_RESULTS_TAB Changing Type SHSVALTAB
    IR_CUSTOM_REF Importing Type Ref To OBJECT
    IS_SEARCH_HELP Importing Type SHLP_DESCR
    3) Write logic for DB select here and put it in below code:
    select * from abc into LT.
    data:   ls_result LIKE LINE OF ct_results_tab.
       LOOP AT lt ASSIGNING <fs>.
        CLEAR ls_result.
        ls_result-key = <fs_>-field.
        ls_result-value = <fs_>-fieldtext.
        APPEND ls_result TO ct_results_tab.
      ENDLOOP.
    4) Redefine the V-method for that attribute and put below code there:
    DATA:
            ls_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
            lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
            lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
        ls_map-context_attr = 'STRUCT.attribute1'.
      ls_map-f4_attr = 'aaa'.
      APPEND ls_map TO lt_intmap.
      ls_map-context_attr = 'STRUCT.attribute2'.
      ls_map-f4_attr = 'bbb'.
      APPEND ls_map TO lt_outmap.
      CREATE OBJECT rv_valuehelp_descriptor TYPE
        cl_bsp_wd_valuehelp_f4descr
        EXPORTING
          iv_help_id        = '(ZABC_F4)'
          iv_help_id_kind   = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
          iv_input_mapping  = lt_inmap
          iv_output_mapping = lt_outmap.
    5) Implement get P for value input, as you know.
    Thats it.
    Regards,
    Bhushan

Maybe you are looking for

  • Can I swap out my old HD when I upgrade....

    Ordered an 15" i7 MBP. I'd like to swap my old HD out (256MB SSD), rather than go through the bother of reinstalling everything or even doing a Time Machine backup. Is this possible? What will happen when I try to boot the new machine with my old HD

  • Cannot Cut and Paste From Excel

    I am trying to simply cut and paste from Excel into the Xcelsius spreadsheet. Even though the user manual indicates to copy from Excel and right click where you want to paste, the Paste and Paste Special functions are greyed out. It is almost like th

  • ORA-12801: error signaled in parallel query server P000

    Hello All, Week before one of the APPLY process ABORTED with following error: ORA-12801: error signaled in parallel query server P000 ORA-04031: unable to allocate 104 bytes of shared memory ("streams pool","unknown object","apply shared t","knalfGet

  • Save and later pre-load a whiteboard

    Folks- Is it possible to save a whiteboard and later load it back in for continued work?  If it is, what are the major steps? Thanks much- Matt PS-I did search this forum, and the three threads that seemed to ask the same question were unanswered.

  • SCCM 2007 SQL SSRS Custom Report Backup Automation

    Has anybody tried to automate Configuration Manager 2007 SSRS Backup / Recovery process to a new hardware thru AfterBackup.bat? To backup and recover all custom reports Manual:- . http://technet.microsoft.com/library/ms155814(SQL.100).aspx Thanks and