How to display our own selected data in a search help using a exit

Hello,
I had created a Search Help Exit to restrict the values to be displayed in the search help. This code was written under the event 'DISP' in the exit. But it is not giving the desired result. So I want to replace the RECORD_TAB of the exit with my own selected data. For this I had written code for selection under the event 'SELECT'. But when I try to overwrite RECORD_TAB with this, this create errors.
What should I do to overwrite the values of the RECORD_TAB field with my own values?
Regards,
Abijith

Hi,
This is how we implemented the code modify the values in search help exit.
Check if display process button is pressed
  IF callcontrol-step = 'DISP'.
Read the parameter ID for company code.
    GET PARAMETER ID 'BUK' FIELD lv_bukrs.
    IF sy-subrc EQ 0.
      lwa_bukrs-sign   = 'I'.
      lwa_bukrs-option = 'EQ'.
      lwa_bukrs-low    = lv_bukrs.
      APPEND lwa_bukrs TO lr_bukrs.
    ENDIF.
  Check if any entry is made in Test account/Testity account name
    LOOP AT shlp-selopt INTO lwa_selopt.
      CASE lwa_selopt-shlpfield.
        WHEN  'ZZTEST'.
          lwa_roy-sign = lwa_selopt-sign.
          lwa_roy-option = lwa_selopt-option.
          lwa_roy-low = lwa_selopt-low.
          APPEND lwa_roy TO lr_roy.
        WHEN 'ZZTEST_NAME'.
          lwa_roy_name-sign = lwa_selopt-sign.
          lwa_roy_name-option = lwa_selopt-option.
          lwa_roy_name-low = lwa_selopt-low.
          APPEND lwa_roy_name TO lr_roy_name.
      ENDCASE.
    ENDLOOP.
  Get customer in entered for a company code
    SELECT kunnr
           bukrs
      FROM knb1
      INTO TABLE lt_knb1
      WHERE kunnr IN lr_roy
        AND bukrs IN lr_bukrs.
    IF sy-subrc EQ 0.
      SORT lt_knb1 BY kunnr.
    Get customer name for  the customer.
      SELECT kunnr
             name1
        FROM kna1
        INTO TABLE lt_kna1
        FOR ALL ENTRIES IN lt_knb1
        WHERE kunnr EQ lt_knb1-kunnr
          AND mcod1   IN  lr_roy_name.
      IF sy-subrc EQ 0.
        SORT lt_kna1 BY kunnr.
      ENDIF.
    ENDIF.
  Get Values for Testty account selected by standard search help
    CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
      EXPORTING
        parameter   = 'Ztest'
        fieldname   = 'Ztest'                                    " Reference to search help parameter
      TABLES
        shlp_tab    = shlp_tab                                    " Reference to field of Seatinfo
        record_tab  = record_tab
        results_tab = lt_test_help
      CHANGING
        shlp        = shlp
        callcontrol = callcontrol.
  Get Values for Testty account Name selected by standard search help
    CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
      EXPORTING
        parameter   = 'Ztest1'
        fieldname   = 'Ztest1'                                    " Reference to search help parameter
      TABLES
        shlp_tab    = shlp_tab                                    " Reference to field of Seatinfo
        record_tab  = record_tab
        results_tab = lt_roy_help
      CHANGING
        shlp        = shlp
        callcontrol = callcontrol.
    LOOP AT lt_knb1 INTO lwa_knb1.
      CLEAR lwa_kna1.
      READ TABLE lt_kna1
            INTO lwa_kna1
            WITH KEY kunnr = lwa_knb1-kunnr
            BINARY SEARCH.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = lwa_kna1-kunnr
          IMPORTING
            output = lv_kunnr.
        lwa_roy_help-ztest1 = lv_kunnr.
        lwa_roy_help-ztest = lwa_kna1-name1.
        APPEND lwa_roy_help TO lt_roy_help .
      ENDIF.
    ENDLOOP.
    SORT lt_ztest_help.
    DELETE ADJACENT DUPLICATES FROM lt_roy_help COMPARING ZTEST1.
Finally transport the computed numbers into the search help data.
    CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
      EXPORTING
        parameter   = 'ZTEST1'
        fieldname   = 'ZTEST1'" Reference to search help parameter
      TABLES
        shlp_tab    = shlp_tab                                    " Reference to field of Seatinfo
        record_tab  = record_tab
        source_tab  = lt_roy_help
      CHANGING
        shlp        = shlp
        callcontrol = callcontrol.
Finally transport the computed numbers into the search help data.
    CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
      EXPORTING
        parameter   = 'ZTEST''
        fieldname   = 'ZTEST''                                  " Reference to search help parameter
      TABLES
        shlp_tab    = shlp_tab                                    " Reference to field of Seatinfo
        record_tab  = record_tab
        source_tab  = lt_roy_help
      CHANGING
        shlp        = shlp
        callcontrol = callcontrol.
  ENDIF.
Nabheet

Similar Messages

  • How to define our own selection screen for logical database  in abap-hr?

    Hi Friends,
    Can u please help me
    How to define your own selection screens for  logical database.
    we use to do like(goto->attributes-HRReportcatagerious ).but How to desin using  customer table like t599c, t599f and how to add to my logical database?
    Thanks in advance
    charan

    check out this online help
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/frameset.htm
    Regards
    Raja

  • How to display Caleder to select Date...Forms 6I

    I am using Oracle form 6i, DB 10G.
    In Scott schema, i made a simple data entry form to enter employee.
    In hire date column , now user entering date by keyboard, but my manager want to display calender there, so that user can select the date by mouse.
    Can you please guide me to make calender.
    Thanks

    Download oracle form 6i demo
    -How to Use the Calendar Class Demo in your Application
    1. Install the Demos that come with Oracle Forms
    2. Open the Calendar.fmb situated in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
    3. Copy the Program Unit: Date_Chosen to your application
    4. Get the Object Library: STNDRD20.OLB located in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
    5. Get the Attached Library: Calendar.pll located in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
    6. Drag the Object Groups: Calendar from calendar.fmb to your application and copy it.
    In the item to get the date, in the Key_ListVal trigger enter the following code:
    date_lov.get_date(sysdate, -- initial date
    's_inventory.text_item5', -- return block.item
    240, -- window x position
    60, -- window y position
    'Start Date', -- window title
    'OK', -- ok button label
    'Cancel', -- cancel button label
    TRUE, -- highlight weekend days
    FALSE, -- autoconfirm selection
    FALSE); -- autoskip after selection
    In either a button when button pressed trigger or on the mouse double-click trigger of the text item that will get the date, enter the following code:
    begin
    go_block('s_inventory'); --this  is  the  block
    go_record(to_number(:system.cursor_record));
    go_item('s_inventory.Text_item5'); -- this is the item
    do_key('list_values'); --this  calls  the  Key_ListVal  trigger  of  the  item
    end;

  • Is that possible to display the user selection data in the printable page?

    Hi All,
    I'm going to add a printablepage button on my page.
    Here comes a questions.
    Is that possible to display the user selection data in the printable page?
    For example,
    I have a table in the page,with 10 records.User select 5 of them.Can I display these 5 records in the printable page?
    Please help.

    Hi Yannick,
    Thanks a lot for the information. It worked.
    The portlet data can be accessible using bindings, but parameter name can be different.
    Meanwhile I have got one more scenario, where the Portlet and Task Flow placed in different pages of WCP Application. On change of data in the Portlet the application should navigate to another page where the Task Flow placed and displays selected data.
    Basically I can not use any button for navigation. The navigation should happen once I do some action in Portlet.
    Is this possible? If yes can you please let me know the steps?
    Thanks in advance!
    Somnath
    Edited by: Somnath Basak on Dec 20, 2011 9:41 AM

  • In the Date Picker, How can I default to select * dates if the user does ..

    In the Date Picker, How can I default to select * dates if the user does not select a date.
    Thanks,
    Doug

    Doug,
    Now lets say l want everythingCould you post some sample data and the output that you want to get..? It would be much easy to understand the requirements...
    When you mean everything, I am assuming you need all possible dates possible between date1 and date2.
    you can use... (from asktom.oracle.com).
      1  select to_date('12-jan-2009','DD-MON-YYYY') + rownum -1
      2    from ALL_OBJECTS
      3    where rownum <= (to_date('20-jan-2009','dd-mon-yyyy') -
      4*                     to_date('12-jan-2009','DD-MON-YYYY') +1 )
    sql> /
    TO_DATE('
    12-JAN-09
    13-JAN-09
    14-JAN-09
    15-JAN-09
    16-JAN-09
    17-JAN-09
    18-JAN-09
    19-JAN-09
    20-JAN-09
    9 rows selected.
    For your case, since you have date1 and date2...
    select to_date(:p12_date1,'DD-MON-YYYY') + rownum -1
      from ALL_OBJECTS
      where rownum <= (to_date(:p12_date2,'dd-mon-yyyy') -
                        to_date(:p12_date1,'DD-MON-YYYY') +1 )Should work.. in my opinion...Haven't tested the second one in Apex .
    Is this what you were looking for ..?? If not, please elaborate...
    Thanks,
    Rajesh.

  • How to add our own applications to Cisco Connect Cloud?

    How to add our own applications to Cisco Connect Cloud?

    You might find this interesting.
    http://newsroom.cisco.com/press-release-content?type=webcontent&articleId=926074
    Interested developers are invited to visit the Linksys Developer Community at http://developer.cisco.com/web/ldc to register and develop apps for Linksys Smart Wi-Fi Routers. Cisco empowers developers with technical, marketing, and sales resources to help support every phase of their developmental and business cycles.

  • How to develop our own provisoning process

    Hi,
    Please tell me step by step how to develop our own provisioning process .

    try below
    1. create it resource
    2. create Resource Object
    3. create Process Form using Form designer
    4. Create adapters (You must have java code ready)
    5. create Process Definition
    6. add process task by associating adapter under process definition
    below link will help to do above
    http://docs.oracle.com/cd/E14571_01/doc.1111/e14309.pdf
    Its better Go with OOTB connector and see how OOTB works and that will give you the proper idea
    You can install any OOTB connector for this
    regards,
    Nishith Nayan
    Edited by: Nishith Nayan on Jan 30, 2012 10:08 PM

  • How to assign search help using ovs for select options for ALV in web dynpr

    how to assign search help using ovs for select options for ALV in web dynpro

    Hi,
    refer http://wiki.sdn.sap.com/wiki/display/WDABAP/InputhelpofObjectValueSelectioninWDABAP
    http://www.****************/Tutorials/WebDynproABAP/OVS/page1.htm
    and http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproAbap-OVSsearch+help
    Thanks,
    Chandra

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • How do I change the default "date range" when searching in the forums?

    Hi all,
    New to the SAP forums...  How do I change the default date range when searching in the forums?  I am getting a 90 day search by default.  Then I have to change it and search again.  Argh!
    Thanks,
    --Amy Smith

    Hi Amy,
    the default date range cannot be changed by users. It is defined system-wide.
    Regards,
    Michael

  • What is the significance of data collection nad search help exit field ?

    Dear Gurus
    I  know i am asking very basic quetion of abap but sdn is  the only source to learn sap for me.I want to thanks you all for your kind support.
    i read  most of the post related to search help and trying to create one.
    for elementary search help.
    SE11 -> SEACH HELP -> ELEMENTARY SEARCH HELP
    I have doubts regarding to fields "DATA COLLECTION" and "SEARCH HELP EXIT".
    reference to a  tutorial it is a maintenance view  shall i  have to reate  a maintenace view first.
    and other field is  SEARCH HELP EXIT what is this.
    please help me .
    Thanks in advance.
    Chitta Ranjan mahato.
    Edited by: chitto123 on Oct 8, 2010 5:59 AM

    Howdy,
    DATA COLLECTION - refers to a database table or view.  This is the data that the search help will search through and display based on the parameters provided, so you can create your own view for the search help if you want the search to cover multiple tables.
    SEARCH HELP EXIT - You can create a function module to be able to alter the Search Help's selection and results at various events throughout the search help.  An example of this function module is provided with some documentation in function module F4IF_SHLP_EXIT_EXAMPLE.
    Cheers
    Alex

  • 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

  • How to add a value/entry in a exisiting search help

    Hello,
    I want to insert bank name and account number in a search help of a SAP field, how can i make an entry in the exisiting search help ?
    Thanks
    Shehryar

    That is a search help exit, u cannot use that if it is a standard search help (unless ofcourse u have the access key)
    Search help exits are coded to define own path to retrieve the values.. suppose u need to have some logical retrieval ..say data is in some other system..or simply if u want to restrict the output programatically in a search help, then we use search help exits.
    bad luck ..in your case u cannot

  • How to create Search Help using more than 1 table

    Hi all,
    I need to create a search help using more than 1 table.
    Eq:-   Itable1 contains the data and Table2 contains the description of a field.
    In my search help i require A field from Table1 and For the corresponding field description from Table2.

    Hi,
    You can do this with the help of collective search help.
    Collective search helps:- Combination of elementary search helps. When we need to fetch data based on multiple selection criteriau2019s. More than one tables are Selection from multiple tables 
    Steps for creating collective search help.
    1) Enter the search help name and click on create.
    2) Choose Collective search help radio button option as the search help type.
    3) Enter the search help parameters.
    Note that there is no selection method to be entered for a collective search help.
    4) Instead of the selection method, we enter the included search helps for the collective search help.
    5)We need to assign parameters for each of the included search helps.
    6) Complete the parameter assignment by clicking on the push button.
    7) Collective search help offers the user to obtain F4 help using any of the included search helps.
    Hope this will help you:
    Reagrds:
    Alok

  • WD ABAP - Search help using Selection-options

    Hi Experts
    i am using interface IF_WD_SELECT_OPTIONS method  ADD_SELECTION_FIELD for filling the selection parameters
    add a new field to the selection
      wd_this->m_handler->add_selection_field(
      i_id = '/DMF/EXT_PROD_ID'
      it_result = lt_range_table
      i_read_only = read_only
    *I_HELP_REQUEST_HANDLER = lt
        i_value_help_type = 'SEARCHHELP'
        i_value_help_id   = '/DMF/PROD_SHLP' ).
    I would like to like to pass the importing parameter to '/DMF/PROD_SHLP'
    Is it possible through this interface .
    thnks in advance

    I assume this is a data dictionary based search help.  You can't pass the importing parameter directly into the field creation.  Data Dictionary Search Helps get their importing parameters from their relationship to other attributes in the same context node automatically. 
    This is from the online help:
    If an input help structure is stored in a field in the ABAP Dictionary, and if you want to use the field mapping of search help parameters stored in the ABAP Dictionary as the field name for the structure for your Web Dynpro input help, then map your context nodes to this structure. This ensures that all components of the structure are available dynamically at runtime as attributes of the node.
    If the context node is not mapped to the structure, the data element's input help can be used if there is one.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm

Maybe you are looking for

  • Virtual User Minutes in Visual Studio Online Account Not Updating

    Dear Team, I have conducted a LoadTest connecting to my VSO account and even after completing the test under Resource Usage section I'm not able to see my VUM(Virtaul User Minute) usage changing. Its always 0. Please help me with it. Regards, Divin

  • How to call the method of a Business Object?

    Hi, Can someone guide me how to call the method of a business object? For example, I want to use the method SalesDocument.Copy of the Business Object VBAK. How can I do that? If you are familiar with any similar scenario please help. Regards, Renjith

  • Can I move the OSB catalogue?

    Hi, We've had jobs fail recently where the catalogue could not be written to because the root file system was full (note: this was NOT due to the catalogue being excessively large; other stuff was using up the space). I would like to prevent this sit

  • Photoshop CS5 Print Settings button does not work

    Photoshop CS5 (updated to newest version 12.0.4) Print Settings button does nothing regardless of printer requested.  Does not work with either an HP1102w or a Cannon Pro9000 Mark II.  I have deleted printers and reinstalled but it still doesn't work

  • Addition of ESB over BPEL

    I'm studying SOAsuite but I can't get clear what the ESB adds in favor of BPEL? In BPEL you have AQ and DB adapters and routing can be done in BPEL too. Can someone explain the difference between both products? Thanx Andre Broers