Search help(f4)  for function module input

can we create a serch help for  function module input giving process

Hello basichodary,
You can encapsulate the function module within a program.  Include the search help in a parameter statement in the calling program and pass the parameter to the function module.  For example, suppose you want to have field i_carrid to have a search help.  Use the following code. 
report  call_function_module.
parameters p_carrid type s_carr_id matchcode object demo_f4_de.
call function 'FUNCTION_MODULE'
   exporting
      i_carrid    = p_carrid
Kind Regards,
Rae Ellen Woytowiez

Similar Messages

  • 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

  • Help code for function module

    Hi Gurus,
    I have to connect two table through function module in ECC side.
    Both table contains some field.
    I am not much familiar with ABAP.
    So PLease  give some demo coding for this.
    Coding  to connect two tables by function module.
    Thanks.
    Saurabh Jain

    Hi,
    Please find the sample code.Here I am extracting data from three tables.
    SELECT         
                   a~vbeln
                 a~MATNR
                 a~CHARG                 
                 a~POSNR              
                 a~SPART                
                 a~ERDAT              
                 a~AEDAT              
                 a~KWMENG
                 a~PSTYV
                 c~KUNNR
                 c~VKGRP
                 c~VKBUR
                 c~VTWEG
                 c~VKORG
                 c~BUKRS
                 c~VKGRP  
                 FROM((VBAP AS a INNER JOIN VBPA AS b
                            ON avbeln  = bvbeln
                           AND aposnr  = bposnr)INNER JOIN VBAK AS c ON cvbeln = bvbeln
                                                                       AND cposnr = bposnr).
    Modify in the way you want and Just include these codes into the Funtion module you create.
    I Hope it my help you.
    Regards,
    Prem

  • Steps for creation of search help exit for a search help

    Hi,
    I have created a search help. I need to create a search help exit for this search help.
    Please let me know how to create a search help exit as well as how to link it to my search help.

    1)Copy the FM F4IF_SHLP_EXIT_EXAMPLE to write your own FM. (check the documentation and coding of FM F4IF_SHLP_EXIT_EXAMPLE).
    2)write your code depending upon the functionality you want.
    3)attach the FM in search help through SE11 in "search help exit" field.
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    This module has been created as an example for the interface and design of Search help exits in Search help.
    All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
    A search help exit is called repeatedly in connection with several events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
    However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
    For more detailed information please refer to the documentation describing the concept of the search help exit.
    The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.

  • Search help exit for field name: BANKL (bank number)

    Is there any search exit that can be used on field BANKL to display only some bank based on user defined criteria?
    Regards

    we can create the search help ..
    we dont need to use CMOD or SMOD for this .
    The search help exit are implemented as function module (newly created) . 
    The place for exit in search help is blank but we can assing our exit ( FM created ) into that . Take the F1 help of that in change mode of search help .
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    well  which search help you want to change. and what changes are needed .?

  • How to log input parameters for Function Modules?

    Hi,
    I need to create a Logging system to trace input parameters for function modules.
    The log functionality could be done by developing a class method or a function module (For example 'write_log'), and calling it within each function module that I want to log. The 'write_log' code should be independent from the interface of the Function Module that I want to log.
    For example, I'd like to write a function/class method that can log both these functions modules:
    Function DummyA
       Input parameters: A1 type char10, A2 type char10.
    Function DummyB
       Input parameters: B1 type char20, B2 type char20, B3 type char20, B4 type Z_MYSTRUCTURE
    Now the questions...
    - Is there a "standard SAP" function that provide this functionality?
    - If not, is there a system variable in which I can access runtime all parameters name, type and value for a particular function module?
    - If not, how can I loop at Input parameters in a way that is independent from the function module interface?
    Thank you in advance for helping!

    check this sample code. here i am capturing only parameters (import) values. you can extend this to capture tables, changin, etc.
    FUNCTION y_test_fm.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PARAM1) TYPE  CHAR10
    *"     REFERENCE(PARAM2) TYPE  CHAR10
    *"     REFERENCE(PARAM3) TYPE  CHAR10
      DATA: ep TYPE STANDARD TABLE OF rsexp ,
            ip TYPE STANDARD TABLE OF rsimp ,
            tp TYPE STANDARD TABLE OF rstbl ,
            el TYPE STANDARD TABLE OF rsexc ,
            vals TYPE tihttpnvp ,
            wa_vals TYPE ihttpnvp ,
            wa_ip TYPE rsimp .
      FIELD-SYMBOLS: <temp> TYPE ANY .
      CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
        EXPORTING
          funcname                 = 'Y_TEST_FM'
    *   INACTIVE_VERSION         = ' '
    *   WITH_ENHANCEMENTS        = 'X'
    *   IGNORE_SWITCHES          = ' '
    * IMPORTING
    *   GLOBAL_FLAG              =
    *   REMOTE_CALL              =
    *   UPDATE_TASK              =
    *   EXCEPTION_CLASSES        =
        TABLES
          exception_list           = el
          export_parameter         = ep
          import_parameter         = ip
    *   CHANGING_PARAMETER       =
          tables_parameter         = tp
    *   P_DOCU                   =
    *   ENHA_EXP_PARAMETER       =
    *   ENHA_IMP_PARAMETER       =
    *   ENHA_CHA_PARAMETER       =
    *   ENHA_TBL_PARAMETER       =
    *   ENHA_DOCU                =
       EXCEPTIONS
         error_message            = 1
         function_not_found       = 2
         invalid_name             = 3
         OTHERS                   = 4
      IF sy-subrc = 0.
        LOOP AT ip INTO wa_ip .
          MOVE: wa_ip-parameter TO wa_vals-name .
          ASSIGN (wa_vals-name) TO <temp> .
          IF <temp> IS ASSIGNED .
            wa_vals-value = <temp> .
          ENDIF .
          APPEND wa_vals TO vals .
        ENDLOOP .
      ENDIF.
    ENDFUNCTION.

  • What are  the input parameters for Function Module

    Dear Experts,
    I want to generate a Sales Tax returns report,those fields are not available in my existing Datasources.
    For that i want to write a Generic Datasource with Function Module.
    audat
    bukrs
    vkorg
    vtweg
    spart
    aurat
    auart
    netwr
    mwsbp
    kschl zedp(consition type)
    kschl zvat(condition type)
    ksch   zcst(condition type)
    matkl     material group
    Here what are the Input parameters for Function Module.
    Thanks in Advance.
    Srinivasan.

    Srinivasan-
    For creating a Generic extractor based on a FM, you first of all need to know what is going to be your structure.. i.e. what all fields you need to pull from what all tables. A functional consultant may help you identify the exact DB tables.
    Once you know them, hand over the requirement and the pdf mentioned by Krishna to the ABAP guy, he would be able to take this up further.
    Also decide 1st whether you would be using a full load or delta. There is a slight difference in the way they are built.
    Let me know how it goes.
    -Bhushan.

  • Help needed - ABAP for  function modules and routines.

    Dear BW gurus,
    Hope everyone is doing great.
    I gotta project recently and we are going live in 3 weeks.My BWLead is getting rolled out in a week and he has to make the knowledge transfer to me ASAP.The bottle-necking thing is I need to have a good idea about the function modules and routines.So I request our SND community to help me out with good ABAP documents for function modules,routines and query.
    my mail id is [email protected]
    Thanks in advance
    Have a nice day
    Regards
    sathiya

    Hello Sam,
    You can create function module in ABAP using tcode SE37.
    For more informations on ABAP:
    http://help.sap.com/saphelp_47x200/helpdata/en/c9/5472f6787f11d194c90000e8353423/frameset.htm
    Use http://help.sap.com
    and also use <b>ABAPDOCU</b> transaction.
    Check these links also...
    <b>Online PDFs:</b>
    http://easymarketplace.de/online-pdfs.php
    <b>ABAP HELP</b>
    If you check these links, you can find many example programs.
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sappoint.com/abap/
    FAQs in ABAP
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    Smart forms
    http://www.sap-basis-abap.com/sapsf001.htm
    Workflow
    <http://www.sap-img.com/workflow/sap-workflow.htm>
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    Mail
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    SAP Scripts:
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    Some useful ABAP Links for learning:
    http://cma.zdnet.com/book/abap/index.htm
    http://www.sapdevelopment.co.uk/
    http://www.sap-img.com/
    http://juliet.stfx.ca/people/fac/infosys/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.sap-img.com/abap-function.htm
    http://www.sapgenie.com/abap/code/abap19.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
    http://www.henrikfrank.dk/abapexamples/index.html
    http://sap.ittoolbox.com/documents/document.asp?i=752
    http://members.aol.com/_ht_a/skarkada/sap/
    http://sappoint.com/abap/
    http://members.tripod.com/abap4/SAP_Functions.html
    http://members.ozemail.com.au/~anmari/sap/index.html
    http://www.planetsap.com/Userexit_List.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://www.kabai.com/abaps/q.htm
    http://www.planetsap.com/Userexit_List.htm
    http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
    http://www.sap-basis-abap.com/index.htm
    http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
    http://www.geocities.com/ResearchTriangle/1635/system.html
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
    http://www.sapfans.com/sapfans/repos/saprep.htm
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
    http://www.sapgenie.com/abap/smartforms_detail.htm
    http://www.sap-img.com/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    http://www.geocities.com/victorav15/sapr3/abap.html
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://abap4.tripod.com/Other_Useful_Tips.html
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://www.sap-basis-abap.com/sapmm.htm
    http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
    http://sapfans.com/
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://www.sapgenie.com/abap/index.htm
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
    http://www.thespot4sap.com/
    http://www.kabai.com/abaps/q.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapgenie.com/abap/tips_and_tricks.htm
    http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
    For FAQ
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    Web log for receive email and processing it through ABAP
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    For Logical database
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Useful link to websites
    http://www.hernangn.com.ar/sap.htm
    Useful for background
    http://www.sappoint.com/basis/bckprsng.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/08703713bf277ee10000009b38f8cf/frameset.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbix_adapters.doc/doc/mysap4/sap4x41.htm
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    For posting web log,
    /people/sap.user72/blog/2005/06/28/sdn-weblogs-making-it-easier
    Dynamic Internal table -web log in sdn
    /people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    Mail
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    BOM Explosion
    /people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
    BOM
    http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
    http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
    http://www.sap-basis-abap.com/sappp007.htm
    OLE
    http://www.sapgenie.com/abap/ole.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
    ALVGRID with refresh
    http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
    For language setting and decimal separator
    /people/horst.keller/blog/2004/11/16/abap-geek-7-150-babylonian-confusion
    Oracle queries
    http://sqlzoo.net/
    To format SQL
    http://www.sqlinform.com/
    SCOT settings
    http://www.sap-img.com/basis/basis-faq.htm
    Status Icon [ALV,Table Control,Tab Strip]
    http://www.sapdesignguild.org/resources/MiniSG-old/from_develop/norm_status_icons.htm#positioning_4
    ALV Group Heading
    http://www.sap-img.com/fu037.htm
    For multiMedia
    /people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework
    Uploading LOGO in SAP
    http://www.sap-img.com/ts001.htm
    LSMW
    http://www.sap-img.com/sap-data-migration.htm
    http://www.sapgenie.com/saptech/lsmw.htm
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary
    http://www.consolut.de/saphelp/sap_online_help.html
    http://www.sap-img.com/
    http://www.sappoint.com/
    http://www.sapdevelopment.co.uk/
    http://www.allsaplinks.com/idoc_search.html
    Best Regards,
    Thangesh

  • Search help (PREM) for personal no. is not coming in ALV grid table control

    hi experts,
    Search help (PREM) for personal no. is not coming in ALV grid table control.
    i have assigned the srch help (prem) to my 'ZFIEXP_PROJALLOC' table for the emp_id.
    but in output it is now showing the help.
    ls_fcat-fieldname = 'EMPLOYEE CODE'.
      ls_fcat-ref_table = 'ZFIEXP_PROJALLOC'.
      ls_fcat-ref_field = 'EMP_ID'.
      ls_fcat-outputlen = '10'.
      ls_fcat-key = 'X'.
      ls_fcat-edit = 'X'.
      ls_fcat-coltext = 'EMPLOYEE CODE'.
      ls_fcat-seltext = 'EMPLOYEE CODE'.
      append ls_fcat to pt_fieldcat.
      clear ls_fcat.
    Then i tried to solve it using the PA0002 . ie.,
    ls_fcat-fieldname = 'EMPLOYEE CODE'.
      ls_fcat-ref_table = 'PA0002'.
      ls_fcat-ref_field = 'PERNR'.
      ls_fcat-outputlen = '10'.
      ls_fcat-key = 'X'.
      ls_fcat-edit = 'X'.
      ls_fcat-coltext = 'EMPLOYEE CODE'.
      ls_fcat-seltext = 'EMPLOYEE CODE'.
      append ls_fcat to pt_fieldcat.
      clear ls_fcat.
    with this it is showing the help in employee code, but, when i click on an empl number, it is not added to my table control and allowing me to add the number by typing them.
    plz help me.
    thanks.

    Hi 
    In the layout give layout-sel_mode  = 'A'.  and
    pass  'A'    to  i_save  exporting parameter to method  set_table_for_first_display.
    The same thing if you are working with function module
    reuse_alv_grid_display.
    Reward points for useful answer.
    Venkat

  • Issue Search Help Exit for Material Group

    Dear Expertsl,
    I developed a search help exit for material group for the search helps both H_T023 and H_2023_MEPO to restrict certain material groups from the actual display as follows
    1)  I developed custom table to hold the Invalid material groups
    2) Developed search help as same as in the bellow link
    link:[https://wiki.sdn.sap.com/wiki/display/Snippets/CaseInsensitiveSearchHelpExitforMaterial+Group]
    3) Before the statement
        SELECT matkl wgbez wgbez60 FROM t023t INTO s_t023t
          WHERE matkl IN t_matkl
    i selected the Invalid materials from the custom table into an internal table
    4)    i am restricting the entries with the following code.
    LOOP AT a_tab.
    only move values that meet the requirements
    after you convert to upper case.
         MOVE a_tab-wgbez60 TO a_tab-wgbez60_test.
         TRANSLATE a_tab-wgbez60_test TO UPPER CASE.
            MOVE      a_tab-wgbez        TO a_tab-wgbez_test.
            TRANSLATE a_tab-WGBEZ_test   TO UPPER CASE.
            MOVE      a_tab-wgbez60      TO a_tab-wgbez60_test.
            TRANSLATE a_tab-wgbez60_test TO UPPER CASE.
          IF a_tab-wgbez60_test IN i_wgbez60 AND
             a_tab-wgbez_test   IN i_wgbez   AND   
             a_tab-matkl        IN i_matkl.
            ADD 1 TO findex.
            MOVE a_tab-matkl   TO temp_tab-matkl.
            MOVE a_tab-WGBEZ   TO temp_tab-WGBEZ.   
            MOVE a_tab-wgbez60 TO temp_tab-wgbez60.
            IF findex > callcontrol-maxrecords.
              MOVE 'X' TO callcontrol-maxexceed.
              EXIT.
            ENDIF.
            READ TABLE i_invalid INTO w_invalid
            WITH KEY matkl = a_tab-matkl.
            IF sy-subrc NE 0.
              APPEND temp_tab.
            ENDIF.
            CLEAR temp_tab.
          ENDIF.
        ENDLOOP.
    This is working fine when we press F4 in ME21N Transaction and give some description and then press enter the popup screen.
    But my requirement is user will enter some description in ME21N material group field and press enter ( Not pressing the F4 here) at this moment this is not going through the search help exit and displaying all the entries including the Invalid materials.
    Note: We can delete the Invalid material groups but the documents which are having the invalid material already will have an issue and need to be corrected all the documents. But our requirement is only to use the correct materials  groups from now onwards.
    I would appropriate if any one can helping this regard.
    Thanks in advance.,
    Regards,
    Venkat

    Hi Venkat,
    You can call your ZSEARCH_HELP from the PAI , on the event SY-UCOMM = Enter using the function module F4IF_FIELD_VALUE_REQUEST.
    For example, your screen field is MARA-ZXXXX, screen 0100 and search help :  ZSEARCH_HELP
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname                   = 'MARA'
          fieldname                  = 'ZXXXX'
          searchhelp               = 'ZSEARCH_HELP '
          dynpnr                      = '0100'
          dynprofield                =  'MARA-ZXXXX'
    TABLES
       return_tab                = lt_returntab.
    This F4IF_FIELD_VALUE_REQUEST will call your custom search help exit.
    Regards
    Deepa.

  • RFC Lookup error :No RFC authorization for function module

    Hi All,
    I have created RFC in the PI system and enabled it as remote. I am working on PI7.1
    I have imported RFC into Repository.But when i am trying to execute RFC lookup function in the graphical mapping I am getting No RFC authorization for function module error.
    Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception> com.sap.aii.mapping.api.StreamTransformationException: Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception> at com.sap.aii.mappingtool.flib7.RfcLookup.cacheMore(RfcLookup.java:95) at com.sap.aii.mappingtool.tf7.rt.AMultiResIterator$MultiOutIterator.gotoNextContext(AMultiResIterator.java:95) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:315) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:406) at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:496) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:133) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:626) at com.sap.aii.ibrep.server.mapping.exec.ExecuteXiMappingCommand.transformInternal(ExecuteXiMappingCommand.java:197) at com.sap.aii.ibrep.server.mapping.exec.ExecuteXiMappingCommand.execute(ExecuteXiMappingCommand.java:94) at com.sap.aii.ib.server.mapping.exec.CommandManager.execute(CommandManager.java:43) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:40) at com.sap.aii.ibrep.server.mapping.MapServiceBean.execute(MapServiceBean.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy1005_10002.execute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:234) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304) Runtime exception when processing target-field mapping /ns0:MT_FileDummy/File; root message: Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception>
    13:42:37 End of test
    Edited by: Rams on Apr 17, 2009 1:43 PM

    Hi! Rams,
    I think the issue is related to Authentification Issue..Even though u did correctly please check once the below
    1) Check any Typo Erros are there while configuring or giving names in Lookups.
    2) please check Authorizations like ID and PWD and Sufficient Roles
    3) Also please check did u given paramters correctly while doing RFC look up I mean paramers , Binding parameters and RFC channel name and adapter type or Simple type it must be an  adapter
    4) In ID part while configuring Interface determinaition you need to give your RFC look Up name there also..Hence check whether u given or not if yes correctly or not
    5) Also remember one thing if your scenario is correct mostly you can know the result in mapping itself it seems while testing Message mapping and Interface mappings give your RFC look up paramters in the parameters tab present in TEST tab and later in Document tab give Input...and execute it works if it doesn;t works and if there is an issue with RFC you can get there only..ok
    Also go through the below document::
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20befc9a-aa72-2b10-ae9b-b0988791d457]
    I hope this will give u brief idea...
    Also check with basis while taking SAP_ALL authorization so that first u ill came to know whether issue is related to authentification or RFC module itself remote enabled and also do SXI_CACHE also ocne to refresh ESR and ID objects..
    Regards::
    Amar Srinivas Eli

  • Alternative for  Function module 'F4_CHOOSE_MCID' in ECC 5.0?

    Hi,
    Can any one tell me the Alternative for  Function module <b>'F4_CHOOSE_MCID'</b> in ECC 5.0?
    Helpful answers will be rewarded.
    Thanks
    Kiran

    Hi,
    Please use this FM UMC_NOTIF_SEND_EMAIL to send an email in ECC 5.0.
    Regards,
    Ferry Lianto

  • Transport of ALE Interfaces for Function Module

    hi,
    i have a Z function module, Z business object type and z message type identifying ALE interface.
    i need to move all the objects from Dev R3 to QA R3. What are the steps involved?
    Thanks,
    Tirumal

    Hi
    While creating a Z function module it will ask you for a change request number. attach it to change request and migrate it to Production.
    In case your function group to which you assigned this function module is open then the CTS number will by default come in CTS number field if any exists for the function group. You can now migrate your CTS to production.
    Now after assinging function module to a CTS you can be sure that your program for function module and FM both will be migrated. For confirmation you can now check attribuutes section in your function module. it will list the SAP program associated with Func mod , function group to which function module is assigned , package and include programs which needs to be migrated. So you only need to attach a CTS and migrate your CTS.
    You can create a Change erquest (CTS) in SE01 or SE10 transactions.
    Regards,
    Amit.
    Please reward any help
    Message was edited by: amit bhadauria
    Message was edited by: amit bhadauria

  • Creating Includes for Function Modules

    Hi Experts,
    Can you please let me know how to create includes for function modules.
    I came across this in a standard include program, which was generated by a function library. The includes inside this program where linked to the function modules (when I double clicked on them).
    Please let me know how to create it.
    Thanks in advance !
    Regards,
    Anand Patil.

    Hi,
    have a look at the code for better understanding
    Declaration of Workareas                                             *
      DATA: lwa_e1bp2017_gm_item_create TYPE e1bp2017_gm_item_create,
            lwa_data         TYPE edidd, " Work area for IDOC
            lwa_control      TYPE edidc. " Work Area for control rec
    Read the control data information of idoc.
      loop at idoc_contrl INTO lwa_control Where mestyp = lc_mbgmcr.
    Extract the data from the segments.
        LOOP AT idoc_data INTO lwa_data
        WHERE docnum = lwa_control-docnum and
              segnam = lc_item_create.
    *->> Set the tabix of the internal table
          lv_index = sy-tabix.
    Move the Material Document Item Segment data
          MOVE lwa_data-sdata TO lwa_e1bp2017_gm_item_create.
    Modify the material document item data  internal table
          PERFORM sub_modify_idocdata changing lwa_e1bp2017_gm_item_create.
    *->> set the changed values to the IDOC SDATA
          MOVE  lwa_e1bp2017_gm_item_create TO lwa_data-sdata.
    *->> Modify the table
          MODIFY idoc_data FROM lwa_data index lv_index.
    Clear the Work areas
          CLEAR : lwa_data,
                  lwa_e1bp2017_gm_item_create.
        ENDLOOP.                                     "LOOP AT t_idoc_data
    Call the BAPI function module to create the
    appropriate Material Document
        CALL FUNCTION 'BAPI_IDOC_INPUT1'
          EXPORTING
            input_method          = input_method
            mass_processing       = mass_processing
          IMPORTING
            workflow_result       = workflow_result
            application_variable  = application_variable
            in_update_task        = in_update_task
            call_transaction_done = call_transaction_done
          TABLES
            idoc_contrl           = idoc_contrl
            idoc_data             = idoc_data
            idoc_status           = idoc_status
            return_variables      = return_variables
            serialization_info    = serialization_info
          EXCEPTIONS
            wrong_function_called = 1
            OTHERS                = 2.
        IF sy-subrc = 1.
          RAISE wrong_function_called.
        ENDIF.
      endloop.
    ENDFUNCTION.
    here when we write the statment
    PERFORM sub_modify_idocdata changing lwa_e1bp2017_gm_item_create and double click on sub_modify_idocdata .
    it will create a include with the name "LZDTSINT052F_GPOMS_GMF01 ".
    now we can write the FORM ..END FORM In this inculde.like this.
    ***INCLUDE LZDTSINT052F_GPOMS_GMF01 .
    *&      Form  sub_modify_idocdata
    Modify the material document item data  internal table
    FORM sub_modify_idocdata
    CHANGING pwa_e1bp2017_gm_item_create TYPE e1bp2017_gm_item_create.
    contant declaration
      CONSTANTS: lc_261(3) TYPE c VALUE '261'.
      DATA : lv_aplzl LIKE resb-aplzl,
             lv_aufpl LIKE resb-aufpl,
             lv_subrc LIKE sy-subrc,
             lv_charg LIKE resb-charg,
             lv_uom LIKE pwa_e1bp2017_gm_item_create-entry_uom.
      CLEAR: pwa_e1bp2017_gm_item_create-reserv_no,
             pwa_e1bp2017_gm_item_create-res_item.
    *->> Get SAP storage bin & Storage type from the Z table
      SELECT lgtyp lgpla
        INTO (pwa_e1bp2017_gm_item_create-stge_type,
              pwa_e1bp2017_gm_item_create-stge_bin)
         UP TO 1 ROWS
        FROM zdtsint050_sttyp
         WHERE zstorage_typ = pwa_e1bp2017_gm_item_create-stge_type
          AND  zstorage_bin = pwa_e1bp2017_gm_item_create-stge_bin.
      ENDSELECT.
      IF sy-subrc NE 0.
        CLEAR: pwa_e1bp2017_gm_item_create-stge_type,
               pwa_e1bp2017_gm_item_create-stge_bin.
      ENDIF.
      PERFORM get_oper CHANGING pwa_e1bp2017_gm_item_create.
    Get the Reservation number and Reservation item number
    basing on the idoc data.
      SELECT rspos werks lgort
             INTO (pwa_e1bp2017_gm_item_create-res_item,
                  pwa_e1bp2017_gm_item_create-plant,
                     pwa_e1bp2017_gm_item_create-stge_loc)
             FROM resb
             UP TO 1 ROWS
             WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no
             AND   matnr = pwa_e1bp2017_gm_item_create-material
             AND   charg = pwa_e1bp2017_gm_item_create-batch
             AND   aufnr = pwa_e1bp2017_gm_item_create-orderid
             AND   vornr = pwa_e1bp2017_gm_item_create-activity
             AND   bwart = lc_261.
      ENDSELECT.
      IF sy-subrc <> 0.
    Start of insertion for R31K993797
        CLEAR lv_charg.
        SELECT rspos werks lgort
             INTO (pwa_e1bp2017_gm_item_create-res_item,
                  pwa_e1bp2017_gm_item_create-plant,
                     pwa_e1bp2017_gm_item_create-stge_loc)
             FROM resb
             UP TO 1 ROWS
             WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no
             AND   matnr = pwa_e1bp2017_gm_item_create-material
             AND   charg = lv_charg
             AND   aufnr = pwa_e1bp2017_gm_item_create-orderid
             AND   vornr = pwa_e1bp2017_gm_item_create-activity
             AND   ( splkz = 'X' or
                     splkz = space )
             AND   bwart = lc_261.
        ENDSELECT.
        IF sy-subrc <> 0.
    End of insertion for R31K993797
          SELECT SINGLE werks lgort
                INTO (pwa_e1bp2017_gm_item_create-plant,
                       pwa_e1bp2017_gm_item_create-stge_loc)
                FROM resb
                WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no.
          CLEAR : pwa_e1bp2017_gm_item_create-reserv_no,
                  pwa_e1bp2017_gm_item_create-res_item.
        ENDIF.
      ENDIF.
    get SAP UOM
      SELECT SINGLE zsap_uom
                    INTO lv_uom
                    FROM zca_uom_conv
                    WHERE zext_uom = pwa_e1bp2017_gm_item_create-entry_uom.
      IF sy-subrc = 0.
        pwa_e1bp2017_gm_item_create-entry_uom = lv_uom.
      ENDIF.
    ENDFORM.                    " sub_modify_idocdata
    *&      Form  get_oper
         Get the operation
         <--P_PWA_E1BP2017_GM_ITEM_CREATE_RE  Segment
    FORM get_oper  CHANGING p_pwa_e1bp2017_gm_item_create TYPE
                   e1bp2017_gm_item_create.
      DATA : l_aufpl LIKE afko-aufpl,
             l_aplzl LIKE afvc-aplzl.
      REFRESH : i_op.
      UNPACK p_pwa_e1bp2017_gm_item_create-orderid TO
             p_pwa_e1bp2017_gm_item_create-orderid.
    Get the reservation and routing number for the order
      SELECT SINGLE
             rsnum
             aufpl
             FROM afko
             INTO (p_pwa_e1bp2017_gm_item_create-reserv_no,
                   l_aufpl)
             WHERE aufnr = p_pwa_e1bp2017_gm_item_create-orderid.
      IF sy-subrc = 0.
        CALL FUNCTION 'CONVERSION_EXIT_NUMCV_INPUT'
          EXPORTING
            input  = p_pwa_e1bp2017_gm_item_create-activity
          IMPORTING
            output = p_pwa_e1bp2017_gm_item_create-activity.
      ENDIF.
    ENDFORM.                    " get_oper
    Regards,
    nagaraj

  • Will Infoset Query work for Function Module

    HI Can someone let me know will a Infoset wuery works for Function module or not. I have 3 tables which i need to extract on, i am building a Infoset Query on 2 tables and using this in my Function Module to join on 3rd table. I have some conditions on 3rd tbale which i need to pull only those records.
    When ever i check the syntax it always gives me a message
    The type "ZUSERLOGINQRY" is unknown. ( This is my Infoset query name).
    Can any one help me on this.
    Thanks,
    Kris.

    HI Pat thanks for responding i havent done this earlier so i am not sure how to declare une code under Infoset Query ---> Extras. I am getting some duplicates in Infoset Query, can you let me know how to clear all those duplicates...
    Appreciate you help.
    Kris.

Maybe you are looking for