CL_BSP_WD_REFERENCE_TOOL Custom Search Help

Hi,
I tried to implement custom search help exactly as the guide "How-To Guide: Implement Value Helps in GenIL Components" instructed but I am facing a problem.
I am using CL_BSP_WD_REFERENCE_TOOL to store a reference of the context node class to be used in the search help class to get filter data, but it is not working, in method IF_BSP_WD_CUSTOM_F4_CALLBACK~RETRIEVE_CUSTOM_VALUES that I implemented the IR_CUSTOM_REF is initial.
I debbugged standard class CL_THTMLB_F4HELP method GET_HELP_VALUES and noticed that when it is calling the same class to get the reference the table inside the class that should have the reference is empty:
STANDARD CODE
* Retrieve the reference to use if any.
      READ TABLE gt_sel_options WITH KEY shlpfield = if_bsp_wd_custom_f4_callback=>gc_key_ref INTO ls_option.
      IF ls_option IS NOT INITIAL.
*  the value in "low" might have been cut off, so get the safe one
        lr_ref = cl_bsp_wd_reference_tool=>get_reference( iv_controller_key = lv_key_str ).
      ENDIF.
I am wondering how that could be possible that a static class has different information when called inside the context node class and when called in CL_THTMLB_F4HELP, the only explanation I have is that the BSP application that is responsible to display the F4 view is statelless.
Does anyone was able to pass a reference to method IF_BSP_WD_CUSTOM_F4_CALLBACK~RETRIEVE_CUSTOM_VALUES?
The code that I implemented:
Inside the V Getter method I set the reference, so class CL_BSP_WD_REFERENCE_TOOL insert into its internal table that is a static attribute my reference:
lo_iterator = me->collection_wrapper->get_iterator( ).
  IF lo_iterator IS BOUND.
    lo_entity ?= lo_iterator->get_by_index( iv_index ).
  ENDIF.
  IF lo_entity IS BOUND.
    CONCATENATE 'FIELDNAME_VSTEL' lv_str_index INTO lv_controller_key.
    CONDENSE lv_controller_key NO-GAPS.
    CALL METHOD cl_bsp_wd_reference_tool=>set_reference
      EXPORTING
        iv_remove_existing = abap_true
        iv_controller_key  = lv_controller_key
        iv_controller_ref  = lo_entity.
    CONCATENATE '\''' lv_controller_key '\''' INTO ls_map-context_attr.
    ls_map-f4_attr      = if_bsp_wd_custom_f4_callback=>gc_key_ref.
    APPEND ls_map TO lt_inmap.
  ENDIF.
* Output mapping
  CONCATENATE 'TABLE[' lv_str_index '].VSTEL'
      INTO ls_map-context_attr.
  ls_map-f4_attr = 'KEY'.
  APPEND ls_map TO lt_outmap.
  CREATE OBJECT rv_valuehelp_descriptor
    TYPE
      cl_bsp_wd_valuehelp_f4descr
    EXPORTING
      iv_help_id                  = '(ZCL_SOCR_CONTLIST_F4)'
      iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
      iv_input_mapping            = lt_inmap
      iv_output_mapping           = lt_outmap
      iv_trigger_submit           = abap_false.
Then in my class ZCL_SOCR_CONTLIST_F4 method IF_BSP_WD_CUSTOM_F4_CALLBACK~RETRIEVE_CUSTOM_VALUES I try to obtain my reference:
IF ir_custom_ref IS BOUND.
            TRY.
                lo_entity ?= ir_custom_ref.
                lo_parent = lo_entity->get_parent( ).
              CATCH cx_sy_move_cast_error.
            ENDTRY.
          ENDIF.
But in vain because in the standard code of class CL_THTMLB_F4HELP when its call static method CL_BSP_WD_REFERENCE_TOOL=>get_reference  the static table attribute that should have the references is empty.
Does anyone have an explanation how a static class can have different data during the execution of the same program, same user session?
Thanks,
Mauricio

Hi,
Any Ideas?

Similar Messages

  • Custom Search help in Record Working Time

    Hi,
    We have a requirement to add a custom field on RECORD Working Time ( ESS). This field has been added and custom search help is assigned to the data element of the field. The values in the F4 help should vary based on employees department.
    The related code for this requirement is written in the serach help exit. The F4 help is working as expected from backend ( ECC) but not in Portal (ESS).
    I have added the custom field in TCATS_SHLP_ITS. After maintaining this table all the values in F4 help are displaying , whereas it should only display the values under employees department in Record Working time.
    I understand the class cl_xss_cat_value_help_general is responsible for the search help in ESS is there any user exit or enhancement available for this class in order to control the serach values on ESS.
    Thanks in advance.
    regards,
    Pradeep

    note that search help of CAT2 and record working time are different!
    these are teh steps
    please modify the following in the table TCATS_SHLP_ITS as follows:
              1. Execute the T-Code SM31
              2. Enter the table name TCATS_SHLP_ITS.
    or check the class
    CL_XSS_CAT_VALUE_HELP_GENERAL
    or check
    CL_XSS_CAT_VALUE_HELP*
    take an example from Sap note 914125

  • Custom search help with F4IF_INT_TABLE_VALUE_REQUEST to retrieve 2 columns

    Hi all,
    i have a problem to retrieve selected value from a custom search help. I need to retrieve 2 columns from the selected line. eg. there are A,B,C,D column in the search help. I need to get the B and D. can anyone help? Thanks

    For achieving this follow the following 4 steps:
    1. While calling F4IF_INT_TABLE_VALUE_REQUEST pass the importing paramter return_tab  to make the data selected by the user IN SELECTION screen. Remember that without this the user entry is avaliable only at START OF SELECTION.
    2. Use this value to READ TABLE your internal table to get the  value of other column.
    3. Load an internal table with values you want to assign to selection screen fields.
    4. Assign  values to the field in selection field using Fn Module: 'DYNP_VALUES_UPDATE'.
    Example:
    DATA: ......,
        lit_fields     type table of dynpread,
        ls_fields      type dynpread,
        lit_ret_tab    type table of ddshretval,
        ls_ret_tab     type ddshretval.
    . call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield        = 'VARI'
          dynpprog        = sy-cprog
          dynpnr          = sy-dynnr
          dynprofield     = 'P_VARI'
          value_org       = 'S'
        tables
          value_tab       = lit_abc
          return_tab      = lit_ret_tab
        exceptions
          parameter_error = 1
          no_values_found = 2
          others          = 3.
    check sy-subrc eq 0.
    *-----get the entered value of field vari
    read table lit_ret_tab into ls_ret_tab index 1.
      lv_vari = ls_ret_tab-fieldval.
    check sy-subrc eq 0.
    *-----get value of the other column vari_d
    read table lit_abc into ls_abc with key vari = lv_vari.
      lv_vari_d = ls_abc-vari_d.
    *----- Append to an internal table with values you want to assin to selection screen fields.
    ls_fields-fieldname = 'P_VARI'.
      ls_fields-fieldvalue = lv_vari.
      append ls_fields to lit_fields.
      ls_fields-fieldname = 'P_VARI_D'.
      ls_fields-fieldvalue = lv_vari-d.
      append ls_fields to lit_fields.
    *---- Assign  values to the field in selection field
    call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-cprog
          dynumb               = sy-dynnr
        tables
          dynpfields           = lit_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.

  • Custom search help in sap field in standard transactions.

    I have a requirement that I have to add a custom search help in XREF2 of bseg table either in fb02-f-43.
    For FB02.
    Display document.
    Select a Line Item.
    Go to Additional Data tab in menubar,a pop-up will come, where we will get the Reference1 fields .
    My requiremnt is to add a custom input help having 3 constant values.
    For F-43.
    Give account , date etc in first screen.
    Go to next screen give the amount.
    Go to more data will get the fields in left side-no pop-up will come.
    Help needed

    hi, Jkuma,
    we met the similar situation with you while developing a anpplication form for HR.
    our conclustions are:
    1. it's not feasible to put all the data into the form, it will make the form too big and slow, so it must be a online interactive form
    2. you may put a search field to let the user to input some kind of criteria and do the search on the r3 side and return the hit list on the form , but it's not so easy to develop a table control on the form using javascript to get the selected one.
    3. so we built a 'selection screen' , using webdynpro for abap,
    it will show up before the form, while can use ddic search help, to make the selection, then put all the selected entries into the adobe form for further processiong.
    how this is helpful hint for you.
    br.
    jun

  • Custom search help in WD for ABAP

    Hi
    I have a Text field which does not have any input help. Now I have a custom Search help object in my R/3 store. How do i use this search help object for displaying the values for this Text field. I believe there is some standard  method  available for this. Kindly help me out.
    Regards,
    <i><b>Seema</b></i>

    Context->Dictionary Search Help.

  • Standard Search Help in Custom Search Help

    I've created a Custom Search Help for Product Hierarchy. But when search help window appears, I want to put a standard search help of Product Hierarchy on Product Hierarchy field which is located on Resctricted section. Is that possible? Let me know if there's a way...
    Thank you

    hello ibnu,
    it is not possible i attach a standard search help mara
    no such feature available .

  • Default multiple values in custom search help

    Hi All,
    I created a custom search help for the vendor. The fields in the search help are LIFNR (Vendor) and KTOKK (Account Group).
    I would like to be able to set three default values for the account group. That is, when the user clicks on the dropdown to display the search help, I would like to have three values populated in the KTOKK field. Is this possible?
    Any help would be appreciated.
    Thanks!

    Hi,
    I am not sure abt default values, but if you are using this search help in any report than you can set hot keys in your search help and using hot keys, you can set some default filter values in you report's parameter.
    you can set variant in your report where parameter is having values like :: =,<hotkey>,<sel1>,<sel2>
    here <hotkey> : wht you have assingned in search help.
           <sel1>    : one of those default values you want to display.
           <sel2>    : one of those default values you want to display for the second field.
    hope it helps,
    Regards,
    Sagar

  • Custom Search Help for the field Equipment number

    Hi,
    I have enchanced sales order transaction and included a field Equipment number(EQUI-EQUNR).
    Here after pressing F4(Search help) standard search help is display.
    I have a requirement wherein, the standard search help should not appear and a customised search where a specific Equipment category type values should appear in the search help.
    Ex. Field equipment  category (EQTYP).EQUNR(Equipment Number).
    Please let me know how to work for the customised search help.

    Hi,
    You need to create a customized search help.
    [Elementary Search Help - Structure|http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21ee38446011d189700000e8322d00/content.htm]
    [Creating Elementary Search Helps|http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21ee5f446011d189700000e8322d00/content.htm]
    Then you need to attach the search help to the screen field..
    [Assigning Search Helps to Screen Fields|http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21ee93446011d189700000e8322d00/content.htm]
    [Hierarchy of Search Help Call|http://help.sap.com/saphelp_nw04/helpdata/EN/0b/32e9b798da11d295b800a0c929b3c3/content.htm]
    regards
    Nitesh

  • Custom search help for characteristic based variant

    Dear Experts,
    I have characteristic based variant report, my requirement is, in any  Article(matnr) related transaction( Ex: MM43, VA01..) I required custom search help based on these characteristics and i will populate article/variant. Attached report selection screen snap. This screen will come in my custom search help.
    Regards,
    Abbas.

    I have found own for my problem. I am using MAT1 standard search help and with database view.
    Regards,
    Abbas.

  • Custom Search Help for Functional Area of Cost Centre(KS01/KS02)

    Hi,
    I need to implement a custom search help and custom enhancement for the field Functional Area in Basic Data tab of Cost Centre Create/Change(KS01/KS02) transactions. Details of the requirement are as below:
    1. There will be a custom relation for the Cost Centre category and Functional Area which was maintained thru a SAP standard table TKA05 and a custom table.
    2.When the relation to Cost Centre category and Functional Area is a one to one it exist in the TKA05 and if its one to many it will be maintained in the custom table.
    3. The requirement is when the Cost Center to Functional area is maintained in table TKA05(One to One) in this case the corresponding Functional Area needs to be populated automatically after entering the cost centre and pressing a enter key by user.
    4.When the Cost Centre Category and Functional area does not exist in table TKA05 and existing in custom table(One to Many) in this case the F4 should be enabled for user selection with the list of Functional area values corresponding to the cost centre category entered that are maintained in the custom table.
    As per the functionality provided by SAP the input help(F4) of the field Functional area in Cost Center does not have any relation with Cost Centre Category. The existing F4 is from the Value Table(TFKB) attached to the domain of FKBER.
    Please provide your valuable inputs to implement the above requirement. Your input will be rewareded.
    Thanks in advance,
    Regards,
    Prasad.

    kalyani,
    i can see your requirement in below way..
    as it just reads: you need to assign the standard cost center help to a z cost center field in component /SAPSRM/WDC_UI_DO_ACC.. which actually is fetched though the component /SAPSRM/WDC_UI_BACKEND_SH
    so, if you see the component controller of SAPSRM/WDC_UI_DO_ACC you will see the component
    USAGE_SH_F4     /SAPSRM/WDC_UI_BACKEND_SH                        
    USAGE_SH_F4     /SAPSRM/WDC_UI_BACKEND_SH     INTERFACECONTROLLER
    so you can replicate the same functionality for your z field.
    but can you clarify one thing.. why are you going for this z field in place of standard field ?

  • Custom Search Help for Business Agreement field in transaction BP.

    Dear Experts,
    My requirement is to add Custom search help to Businees Agreement field (BUPA_CRMM31-BUAG_ID) in transaction code BP.
    PLease guide me how to add Custom search help to Businees Agreement field which dont have search help option.
    Regards,
    Bala

    Hello there,
    I think the requirement/question is not very clear in your post.
    However, the segment Java applet calls a CRM class which has related code and methods.
    Class:  CL_CRM_MKTTG_SEGAP_COM
    Package: CRM_MKTTG_SEG_APPLET.
    Please explain the problem in detail.
    Regards,
    Vinamra.

  • Access Account assignment data inside custom search help

    Hi Experts,
    I have faced with a challenge and I am stuck. Need some expert advise.  I am developing a custom search help for GL account. Inside the search help exit I have to know what is the account assignment category of the accounting line i am currently accessing in WEB UI. for example i have one item in SC and there is a cost distribution between cost center and WBS element. Now i want to access GL account search help from second line in the account assignment ( ie from line having WBS as Acc Assignment).
    one approach that i can think of is Enhance Accounting WD component and capture the details in a static attribute of a custom class and access them inside the search help exit. I know this will work. But i am looking for more clean approach.
    I saw below code in WD comp method GET_BO_INFO of component controller.
    lo_task_container = /sapsrm/cl_ch_wd_taskcont_fact=>get_task_container_instance( ).
       CHECK lo_task_container IS BOUND.
    * Get the BO type
       ev_bo_type = lo_task_container->get_bo_type( ).
    * Get the BO mapper, BO GUID, and item GUID of the lead selection
       CASE ev_bo_type.
         WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_shop.
           lo_bom_sc ?= lo_task_container->get_bom_sc( ).
           ev_hdr_guid = lo_bom_sc->/sapsrm/if_cll_bo_mapper~get_bo_guid( ).
           ev_item_guid = lo_bom_sc->/sapsrm/if_cll_bo_mapper~items_get_lead_selection( ).
    I am not sure if this works. But even if this works I can not get the exact accounting line that the user is currently processing. Any ideas????
    thanks
    sankar.

    Hi,
    Any Ideas?

  • How to pass custom search help(F4 help) for a field in ALV output?

    Hi,
    I want to activate the F4 help in ALV output for a field for which we do not have search help assigned at table ,data element and domain level.
    In field catalog i have enabled it by below line.
    ls_fcat-F4AVAILABL = 'X'.
    but because there are no standard input help available it is giving message as "No input help is available".
    so how to pass our custom search help (g_search) for any field in ALV output.
    I am using object oriented ALV grid display.
    Thanks!!!
    Rajesh Gupta.

    hi,
    check this out:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/acdefb13-0701-0010-f1a2-8eeefa7d3780
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d?quicklink=index&overridelayout=true

  • Appending custom search help

    Hi,
    I have appended a custom search help to std collective search help C_SAKNR, which is assigned to data element SAKNR. The reason to append custom search help is when the user presses F4 on G/L account field on ME51N transaction, there should be another choice of selecting G/L account based on another custom field which we have added on custom data tab. The entries are maintained in custom table which is the selection method.
    To test search help , I executed the Collective search help C_SAKNR, three parameters are used, BUKRS, KTOPL, SAKNR , when I press F4 on SAKNR I can see my search coming up at the end and can select the G/L account value which we have maintained. Now when  try on ME51N screen, the additional custom search doesn't show up, the on screen field has same data element SAKNR.
    I created one structure with field SAKNR and data element SAKNR and used on custom screen, when I execute and press F4 on screen, my custom search comes up with all the std ones. Its not working on ME51n or ME21N screens, not able to figure out whats wrong.
    Please let me know your suggestions on this.
    Thanks

    Solved it myself. I appended my search help in another included collective search help .
    Thanks

  • Custom search help

    Hi expert,
    I want to create a search help that read data from a table and show this data, but only a selection of this data and not all.
    So, I created a custom search help, with an exit search help ( refernce at F4IF_SHLP_EXIT_EXAMPLE ).
    Inside this help I put the selection, with code like reference F4IF_SHLP_EXIT_EXAMPLE .
    My problem is: the match code show all data of table and not the selection !!!
    Any idea ???
    Tks a lot,
    bye.

    Hi,
      In the selection step after receiving the required entries from table you have to pass the details to the following FM 'F4UT_RESULTS_MAP'
    where SOURCE_STRUCTURE is the selection method name(Table structure name)
              APPLY_RESTRICTIONS = 'X'
             SOURCE_TAB is the table with u to pass the selected new entries
             other parameters are general..
         Finally set the CALLCONTROL-STEP = 'DISP'.
    Thanks&Regards,
    Karthik.

Maybe you are looking for

  • Need To Check For Nulls And Force A Date

    I'm trying to check to see if a field is blank (null or blank), if so, force a date into it.  My formula is giving me zeros.  What is wrong with the below formula ? If {Sales_Primary.Type_Of_Sale} = 1  And    Isnull()  Then 1999-01-01

  • Itune and Quicktime not compatible

    I reformated my computer and updated my software. Now my itune won't open and giving me the following error message, "iTunes requires QuickTime 7.5.5 or later." I've tried to download a update but that didn't work. I'm afraid I don't know what system

  • Dynamic Group Prompting Parameters

    Using CRXI I would like to create a report where I can dynamically set groups based on parameters.  For example, users would be prompted to select from three different group levels: by date, by location, by charge group.  So, they can select group by

  • View at actual size in CS4 on iMac is 75%

    recently migrated from a g5 to iMac 27in w/cs4 i've noticed that in all the cs4 apps, when i view at actual size the docs show up at about 75% of the true size--not too much of a problem--but in Photoshop, when designing web pages, not being able to

  • IPhone 4 will not sync with iTunes

    This is what happens: iTunes opens when I plug in my phone, it gives me the whole "waiting for sync to start" thing, takes a couple minutes, then says it can't be synced. Can ANYBODY explain this? I'm seriously getting frustrated.