Call SE11 Search Help through ABAP code.

Hello,
I have a requirement in which I need to call various search helps created through SE11 in a Function Module. I want the Search help to return the Values which I would use in my Function Module.
Please suggest if there's a standard FM/ Statement to process SE11 Search helps.
Thanks,
Shalabh

TYPE-POOLS: shlp.
DATA: l_shlp     TYPE shlp_descr_t,
      l_wa       TYPE ddshiface,
      l_bukrs    TYPE char50,
      l_repid    TYPE syrepid,
      L_DYNNR    TYPE SYDYNNR,
      l_ret_val  LIKE ddshretval OCCURS 0 WITH HEADER LINE,
      l_t_fields TYPE dynpread   OCCURS 0 WITH HEADER LINE.
PARAMETERS: p_bukrs TYPE pa0001-bukrs,
            p_werks TYPE pa0001-werks,
            p_btrtl TYPE pa0001-btrtl.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
  FIELD-SYMBOLS <fs> TYPE ddshiface.
  l_repid = sy-repid.
  L_DYNNR = SY-DYNNR.
  CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
    EXPORTING
      shlpname       = 'H_T500P'
*     SHLPTYPE       = 'SH'
    IMPORTING
      shlp           = l_shlp
  LOOP AT l_shlp-interface INTO l_wa.
    IF l_wa-shlpfield  EQ 'BUKRS'.
      l_wa-valtabname = 'PA0001'.
      l_wa-valfield   = 'BUKRS'.
    ELSEIF l_wa-shlpfield EQ 'PERSA'.
      l_wa-valtabname = 'PA0001'.
      l_wa-valfield   = 'WERKS'.
    ENDIF.
    MODIFY l_shlp-interface FROM l_wa.
  ENDLOOP.
* Process standard searchhelp
  CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
    EXPORTING
      shlp          = l_shlp
    TABLES
      return_values = l_ret_val.

Similar Messages

  • Help regarding calling BRFPLUS function through ABAP code

    Hi,
          I have  a situation where I have to input  data into a BRFPLUS function  as a table (i.e the data is input as select options where list or range of data can be provided).The corresponding output is also in the form a table .I've created this function in BRFPLUS and is working fine .Now I have to call it through ABAP code.Can someone kindly  provide me with the probable code for this scenario.
    E.g:
            ZT_MATNR  is the table in brfplus representing the list of MATNR values input along with other such inputs to function module Z_FM
            ZT_ATM   is the  resultant output table  of the function  which contains several fields.
    Now I have to call this BRFPLUS function with help of ABAP code.Could someone kindly help.

    Hello ,
    There should be a number of BRF+ tutorials available in SCN which discuss the FDT APIs. You can have a look at them to get an idea of the various APIs available and their uses.
    For your usecase, you should do the following.
            lo_fdt_function         TYPE REF TO if_fdt_function,
            lo_fdt_result           TYPE REF TO if_fdt_result,
    * Get function handle
          CALL METHOD lo_fdt_factory->get_function
            EXPORTING
              iv_id       = lv_function_id
            RECEIVING
              ro_function = lo_fdt_function.
    where lv_function_id is the GUID of the BRF+ function . You can either make it a constant , or you can use a FDT API to get the function GUID from the BRF+ application name and function name.
    *   Set function context
        TRY.
            CALL METHOD lo_fdt_context->set_value
              EXPORTING
                iv_id    =
                ia_value =
    This is one way to set the input context ( pass the input to the BRF+ function to process ). There are other ways to do this as well. Which one you use would depend on the kind of input you want to pass.
    * Execute BRFPLUS function
      TRY.
          CALL METHOD lo_fdt_function->process
            EXPORTING
              io_context = lo_fdt_context
            IMPORTING
              eo_result  = lo_fdt_result.
    * Get result output
      TRY.
          CALL METHOD lo_fdt_result->get_value
            IMPORTING
              ea_value =
    Another direct way of doing it would be to use the method PROCESS of the class CL_FDT_FUNCTION_PROCESS.
    I have not gone into much explaination here , but it should provide you an idea of how you can go about it.Read the SCN docs on the APIs to get a better idea , or better still if you can get hold of a copy of the BRF+ book by Carsten Ziegler , you will get an end to end explaination of all BRF+ APIs in it.
    Regards,
    Indranil.

  • Uncaught Exception occured while sending mail through abap code.

    Hi,
    Uncaught Exception occured while sending mail through abap code.Run time Errors "UNCAUGHT_EXCEPTION" occured after excuting the call method  CALL METHOD SEND_REQUEST->SEND( ).kindly help in resolving the issue.

    HI,
    Runtime Error:  UNCAUGHT_EXCEPTION details.
    Runtime Errors         UNCAUGHT_EXCEPTION
    Exception              CX_ADDRESS_BCS
    Short text
         An exception occurred that was not caught.
    What happened?
         The exception 'CX_ADDRESS_BCS' was raised, but it was not caught anywhere along
         the call hierarchy.
         Since exceptions represent error situations and this error was not
         adequately responded to, the running ABAP program 'SAPLZSEND_MAIL' has to be
         terminated.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_ADDRESS_BCS', was not caught in
        procedure "SEND_MAIL" "(FORM)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        An exception occurred
    How to correct the error
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "UNCAUGHT_EXCEPTION" "CX_ADDRESS_BCS"
        "SAPLZSEND_MAIL" or "LZSEND_MAILU01"
        "ZSEND_EMAIL"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
        3. If the problem occurs in a problem of your own or a modified SAP
        program: The source code of the program
           In the editor, choose "Utilities->More
        Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "SEND_MAIL" "(FORM)", or its possible occurrence must be declared in the
    RAISING clause of the procedure.
    Please help me to resolve this issue.

  • Difference between Search Helps and Match Codes?

    Difference between Search Helps and Match Codes?

    Serch help
    Search Helps
    The input help (F4 help) is a standard function of the R/3 System. The user can display the list of all possible input values for a screen field with the input help. The possible input values can be enhanced with further information. This is meaningful especially when the field requires the input of a formal key.
    Standard Input Help Process
    A user calls an input help with the following steps (some steps can be omitted, depending on the definition of the input help):
    The user starts the input help to display the possible input values for a field (search field) in a screen template.
    The system offers the user a number of possible search paths. The user selects one of these search paths. Each search path offers a number of restrictions to limit the number of possible input values. These values are offered in a Dialog box for value restriction when the search path is selected.
    The user enters restrictions if required and then starts the search.
    The system determines the values that satisfy the entered restrictions (hits) and displays them as a list (hit list).
    The user selects the most suitable line from the hit list by double-clicking.
    The value of the search field is returned to the screen template (possibly together with other values).
    Steps 2 and 3 are omitted if there is only a single search path available. In this case the dialog box for the value selection is offered immediately. You can also output the hit list directly after starting the input help. Steps 2 to 4 are omitted in this case.
    Function of a Search Help
    This standard process can be completely defined by creating a search help in the ABAP Dictionary. This search help only has to be assigned to the screen fields in which they should be available (see Attaching Search Helps to Screen Fields).
    There are two types of search help:
    Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    See also:
    Example for Search Helps
    Creating Elementary Search Helps
    Creating Collective Search Helps
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/cf/21ee2b446011d189700000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    Match code
    Match code is nothing but the Search help in Higher versions
    It is same way from SE11 you have to create.
    so from SE11 create it and use it.
    Matchcode objects are being replaced by search helps. This is good as search helps are easy to create. However, it has caused some confusion on how best to add search helps to a selection field.
    The trick that I found is to keep your newly created search helps to a 4-character name. The Matchcode object name has this old 4-character limit. This trick is not documented anywhere in the system but it has been a great time saver for me. You can expand this concept by finding existing SAP search helps that are more than 4-characters, copy them to a 4-character name and presto, you have a new matchcode object available for use
    Check this thread to get detailed info
    Match Code Objects
    Match code
    match code
    match code
    Match code
    http://help.sap.com/saphelp_40b/helpdata/en/cf/21ef46446011d189700000e8322d00/content.htm
    Rewards if useful.................
    Minal
    http://web.mit.edu/sapr3/docs/webdocs/dontindex/pdf/mcqc.pdf

  • How to call a Search help in a function module?

    Hi Experts,
    I am a novice to ABAP, I am working on search helps. My requirement is to call a search help in a function module.
    Can anyone  please throw some light on this.
    Any inputs will be helpful.
    Thanks,
    Amita

    yes you can do that..
    in side the source code ..
    write the select statement according to requirement and pass the internal table to below function moduel and return field to yor help field..
    call the below fm inside the function module..
    'POPUP_WITH_TABLE_DISPLAY' or 'REUSE_ALV_POPUP_TO_SELECT'
    see the sample code...
    FUNCTION Z_MFG_PLANTS_F4 .
    "*"Local Interface:
    "  IMPORTING
    "     REFERENCE(W_WERKS) TYPE WERKS OPTIONAL
    "  IMPORTING
    "      REFERENCE(W_MATNR)    TYPE MANTR OPTIONAL
    Alv popup display
    DATA : gc_selfield     TYPE slis_selfield,
           gt_fieldcat_drd TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    p_werks = W_WERKS.
    data : begin of t_marc occurs 0,
                werks type werks,
                matnr type matnr,
            end of t_marc
    select matnr werks from marc into table t_marc where werks = p_werks.
      IF t_disp[] IS NOT INITIAL.
      gt_fieldcat_drd-seltext_m = 'Material'.
      gt_fieldcat_drd-fieldname = 'MATNR'.
      APPEND gt_fieldcat_drd.
      CLEAR : gt_fieldcat_drd.
      gt_fieldcat_drd-seltext_m = 'WERKS'.
      gt_fieldcat_drd-fieldname = ''WERKS'.
      APPEND gt_fieldcat_drd.
      CLEAR : gt_fieldcat_drd.
    Allow the user to select the required plant
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
          i_title               = 'Material Selection for Plant'
          i_selection           = 'X'
          i_screen_start_column = 5
          i_screen_start_line   = 5
          i_screen_end_column   = 70
          i_screen_end_line     = 20
          i_tabname             = 'T_MARC'
          it_fieldcat           = gt_fieldcat_drd[]
        IMPORTING
          es_selfield           = gc_selfield
        TABLES
          t_outtab              = t_MARC
        EXCEPTIONS
          program_error         = 1
          OTHERS                = 2.
      IF sy-subrc  0.
      ENDIF.
      READ TABLE t_MARC INDEX gc_selfield-tabindex.
      IF sy-subrc = 0.
            w_matnr = t_matnr-matnr.
      ENDIF.
    ENDIF.
    ENDFUNCTION.
    rgrds,
    Shweta

  • Creating search help through reports

    Hello experts,
    Is there a method so that I can create search help through reports?
    Thanks,
    Mohit.

    hi,
    we can create F4 help through report and also we can create Input Help from the ABAP Dictionary  .
    please check this link for Input Help from the ABAP Dictionary  .
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa5435c111d1829f0000e829fbfe/content.htm
    and for F4 help in reports you can use some function modules:
    select-options :                 so_selgp FOR t458a-selgp  /
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_selgp-low .
      REFRESH gt_auskt[].
      here insert select query to fill your internal table .
      IF so_selgp[] IS NOT INITIAL.
        DELETE gt_t458a1  WHERE selgp NOT IN so_selgp[].
      ENDIF.
      SELECT aussl auslt FROM t458b INTO CORRESPONDING FIELDS OF  TABLE gt_t458b WHERE spras = 'E'.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
        DDIC_STRUCTURE         = ' '
          retfield               = 'SELGP'
        PVALKEY                = ' '
         dynpprog               = 'ZPPGL_MRP_LIST '
         dynpnr                 = '1000'
         dynprofield            = 'SO_SELGP'
         value_org              = 'S'
      IMPORTING
        USER_RESET             =
        TABLES
          value_tab              = gt_auskt   " internal table.
      EXCEPTIONS
        PARAMETER_ERROR        = 1
        NO_VALUES_FOUND        = 2
        OTHERS                 = 3

  • Diff b/n search help and match code

    hi all,
    can i know the differece between search help and match code object in terms of functionality?
    is there possibility to provide matchcode object for select-options?if yes how can we provide?

    <b>same thread again.</b>
    hi,
    Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input help to a field.
    Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a collective search help with the same name. Each matchcode ID of the matchcode object is converted into an elementary search help with the same name and assigned to the collective search help created from the matchcode object.
    A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP Dictionary in two steps:
    You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes the set of all possible search paths for a search string.
    You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search path for a search string. The matchcode ID defines the fields or field combinations to be used in the search.
    Search Help
    Use
    With this function you can search for objects, thereby defining and linking different selection conditions for the search help.
    Prerequisites
    You can call this function by:
    · Selecting Object ® Search... () in the main menu bar of the Integration Builder
    · Placing the cursor on a software component version and selecting Search... () in the context menu (only in the Integration Repository)
    In this case the software component version is defined as the search criteria.
    Features
    Defining the Object Type
    You can select the object type in a dropdown list in field Object Type.
    In the design (Integration Repository) you can
    · Select an object type (for example Message Interface)
    · Select a cross-object category (for example Interface Objects)
    In the configuration (Integration Directory) you can select types Values Mapping Group and schema in addition to the individual object types.
    CHECK THIS LINK TO CREATE A SEARCH HELP.
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
    CHECK THIS LINK TO CREATE A MATCHCODE OBJECT
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci553386,00.html
    more details...
    Here is the code to attach a search help to a select-options
    SELECT-OPTIONS S_MATNR FOR MARA-MATNR MATCHCODE OBJECT MAT1_A.
    Rgds
    Anver

  • To get f4 search help in Abap Web dynpro

    Hi web Dynpro Experts,
    i want to achieve XK03 Tcode payment mode search help functionality  in abap webdynpro,in clearly When i press f4 i payment mode input field a view should open with  different payment modes like
    a.ebanking payment method,
    b.ebanking treasury pay method,
    c.cheque ..etc..with check boxes when i select a and b methods types it should concatinate and shown as ab in payment methods field.
    I checked for this there is no predefined search helpin data element level(dzwels),and domain level,i hope it is provided by programming.
    if i want to achieve f4 search help through free programming?how to do that?
    how to re use the same screen design which is in XK03?
    please guide me to come out of this issue
    Thanks in advance
    Vijay
    Edited by: vijay kumar on Apr 17, 2010 10:17 AM

    hi friends my question is answere...thanks for ur support

  • Dump with calling Custom search help in SRM Portal

    Hi,
    We are calling a WBS search help from Shopping Cart Cost Assignment screen.
    It works fine with ITS and get the results for WBS elements, but when we try to access the search help through the Portal, after clicking on the FIND button it Dumps "SYSTEM_CANNOT_WRITE_TABLE".
    Any Ideas ??
    Thanks in Advance...!!!

    Hi
    <u>This is clearly a SAP BASIS problem. You need to install GUI Patch 332 (gui46D_332.exe).</u>
    <b>Please go through the links below  for more details -></b>
    Note 842824 - Disposal of the BC-FES-OAC component
    Note 392208 - Automation: Error in the automation controller
    Hope this will definitely help.
    Do let me know.
    Regards
    - Atul

  • Calling DDIC search help

    Hello
    Is it possible to call a DDIC search help within a WD application without binding it to an input field. We are looking for a way to call a search help on a button pressed event.
    Regards, Mathias

    Hi Mathias,
    Using CL_WDR_VALUE_HELP_HANDLER=>HANDLE_VALUE_HELP is a very easy solution to this problem but, you are advised  not follow this approach of using this class & method as they may be stopped at any time by SAP.  All the classes which start with CL_WDR* are meant for internal use by SAP and are not meant for use by customers. We are supposed to use only classes which start with CL_WD*. Try go through this [thread |CALL SEARCH HELP IN WEB DYNPRO;which deals with the same same issue.
    You can try resolve this problem by creating an [Freely Programmed Value Help|https://wiki.sdn.sap.com/wiki/display/WDABAP/Freely%2bprogrammed%2binput%2bhelp] & when you press on the pushbutton you can call this search help. You can try go through this [thread |freely programed F4 help;where I have explained about how you can create an Freely Programmed value help.
    Regards,
    Uday

  • Call of BW queries from ABAP code

    Has anybody information about how is it possible to call a BW query from ABAP code with parametrization (specifying characteristics) ? In our development project it's a crucial part, beacuse we have to provide interim function modules to carry out some conversion routine on BW provided data, before we put it on the screen embedded in a Visual composer Iview.

    Have a look at this:
    Calling BW queries programatically (also posted on BW forum)
    Hope it helps.
    Regards

  • FM : to call collective Search help and update two fields in SSCR

    Hi Experts,
         I have problem while using collective serach help.
        My scenario is using Collective Search help thru that i want to update 2 fields in my selection screen.
    Thru this function module F4IF_INT_TABLE_VALUE_REQUEST  i can mapping and update two fields using DYNP_VALUE_UPDATE but using this function module i can't able to call my Collective Search help
    in other way
    Thru F4IF_FIELD_VALUE_REQUEST  i can able to call the collective search help but _i can't mapping field and can't updated the
    selection screen field_
    Is any otherway to do it, Please help me ASAP.
    Regards,
    Florian.

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • Call a search help

    I'd like to call a search help COBL_EX_FICO within an abap program.
    Do not want to change my structure ... maybe a function module ???
    Thanks

    Hi Stephan
    I'm not sure to understand ?
    You speak about that ?
    parameters : p_geber type bp_geber matchcode object cobl_ex_fico.

  • Search help for material code in VA01

    Dear Experts,
    In VA01 tcode in item level if user press f4 in the material code then we will get all the f4 helps for few fields.Now i need to add one more field  mtart from mara table  in the existing  search help of material code.
    plz suggest me how can i proceed.
    If u have any documets regarding adding one more fied to existing search help plz send me.
    Thanks & Regards,
    farook.
    Edited by: farook shaik on Aug 18, 2009 8:58 AM

    Hi,
       You can do that using search help exits you would find several threads already posted to the forum for this like below:
    Link[Search Help Exits|Search Help Exit;
    Regards,
    Himanshu

  • API calling a search help

    Hi all,
    Is there any Function Module which can be used to call a search help and read the values returned by this search help?
    Thanks,
    Sukru

    Hi,
    Try this FM to read the techinical attributes of any Search help
    F4IF_GET_SHLP_DESCR
    F4IF_SELECT_VALUES
    Regards,
    Karthik.

Maybe you are looking for

  • Small, cheap NAS box that supports nfs/rsync/ssh ?

    Hi all, for my personal backup needs, I'm looking for a standalone NAS box ("networked hard disk/raid solution").  I need to have support for at least one of rsync/nfs/ssh.  (smb/ftp is not enough for me) It shouldn't be too big (eg not the size of a

  • Delete statement that uses a sub-select with the statement in the cursor

    Hi all, How to write write a delete statement that uses a sub-select with the statement in the cursor? CURSOR excluded_dates IS                 SELECT TO_TIMESTAMP(report_parameter_value, in_date_format_mask)       INTO my_current_date_time       FRO

  • N8 Belle update on Mac. Lost contacts, sms, etc.

    Finally updated my N8 to Belle using Nokia Software Updater on a Mac.  It blew out all my personal data.  Should have backed up, I realize now.  Does the update put those files elsewhere on the phone?  Is it possible to restore?

  • Opening a Remote Panel of the Top Level vi for an executable

    Hello Everyone I was wondering how you would open up a remote panel for the top-level vi in an executable? I have created a LabVIEW application and have tested opening the remote panel when it is running in the full labview development suite - this a

  • Leak memory in xerces DomParser

    Hey, I have " leak memory " in my Java application (Stand alone). I suspect that this leak caused by xerces DomParser. i reached to this conculsion after using in Jprobe as a memory debuger. Does any one has a similar problem? Thank you. code: DOMPar