Tracking the execution of Function Modules

Hi there,
for ABAP reports there is an enhancement S38MREP1 'Exit at Start report' in transaction CMOD available which could be used e. g. to track the execution at least of executable programs (TRDIR-SUBC = 1); limitation: it is executed before the selection screen, so no guarantee that a certain program is really submitted afterwards.
Is there something similar available in release 4.5B (or in any higher release?) or how can I track the execution of function modules in the customer name space in a smart way?
Thanks in advance for any support,
Peter

Expanding a bit on Seigfried's post,  you could write a little function module with with a parameter which would be function module name and it would update a custom table everytime it is executed.
Put this function call at the end of the function module that you want to log.
call function 'Z_LOG_FUNCTION_EXECUTION'
      exporting
         fcname = 'Z_THE_NAME_OF_THE FUNCTION'.
The code inside this function module could be something like this.
ztable-fcname = fcname.
ztable-uname  = sy-uname.
ztable-datum  = sy-datum.
ztable-uzeit  = sy-uzeit.
insert ztable.
Regards,
Rich Heilman

Similar Messages

  • Tcode for the execution of function module

    Hi!
    A very simple question:
    What is the Tcode for the execution of function module? (Se38,???)
    I have to execute  the function module RRSI_INITIAL_LINE_INSERT with import parameter I_CHABASNM = 0REQUID.
    Thank you very much!
    regards
    Thom

    hi,
    You create new or edit Fm in SE37. You also put the code for that FM in SE37.
    You can call it through pattern button in SE38, where u pass the importing and exporting parameters of that Fm
    Hope this helps, Do rewad.

  • How to raise the exception in function module

    Dear abaper's.
                   I am creating a Function module .In that in' EXCEPTION' Tab i am giving
    3 exception .1.NO_DATA_FOUND 2.NO_PRINTER_FOUND 3.SMARTFORM_INTERFACE_NOT_FOUND.
    In my coding if this condtion matches i want to raise this exception.how can i do this in my coding .can any one suggest me..
    advance thanks,
    Warm regards,
    Veera

    Hi,
    if that condition is not satisfied,and u didn't handle that exception while calling function module then in the runtime error u will get the text as the description of the exception in function module definition.
    rgds,
    bharat.

  • How to write the exceptions in function module

    dear all,
         how to write the exceptions in function modules with example.
    thanq
    jyothi

    Hi,
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in function modules:
    RAISE except.
    und
    MESSAGE.....RAISING except.
    The effect of these statements depends on whether the calling program handles the exception or not. The calling program handles an exception If the name of the except exception or OTHERS is specified after the EXCEPTION option of the CALL FUNCTION statement.
    If the calling program does not handle the exception
    · The RAISEstatement terminates the program and switches to debugging mode.
    · The MESSAGE..... RAISING statement displays the specified message. Processing is continued in relation to the message type.
    If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE..... RAISING statement does not display a message. Instead, it fills the system fields sy-msgid, sy-msgty, sy-msgno , and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION read_spfli_into_table.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
    *" EXPORTING
    *" VALUE(ITAB) TYPE SPFLI_TAB
    *" EXCEPTIONS
    *" NOT_FOUND
    SELECT * FROM spfli INTO TABLE itab WHERE carrid = id.
    IF sy-subrc NE 0.
    MESSAGE e007(at) RAISING not_found.
    ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table spfli_tab. If it cannot find any entries, the exception NOT_FOUND is triggered with MESSAGE ... RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
    Calling READ_SPFLI_INTO_TABLE
    The following program calls the function module READ_SPFLI_INTO_TABLE:
    REPORT demo_mod_tech_fb_read_spfli.
    PARAMETERS carrier TYPE s_carr_id.
    DATA: jtab TYPE spfli_tab,
    wa LIKE LINE OF jtab.
    CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
    EXPORTING
    id = carrier
    IMPORTING
    itab = jtab
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    CASE sy-subrc.
    WHEN 1.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
    WHEN 2.
    MESSAGE e702(at).
    ENDCASE.
    LOOP AT jtab INTO wa.
    WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
    ENDLOOP.
    The actual parameters carrier and jtab have the same data types as their corresponding interface parameters in the function module. The exception NOT_FOUND is handled in the program. It displays the same message that the function module would have displayed had it handled the error.
    Or
    just have to decide what exceptions u want and under what conditions.
    then declarethese exeptions under the exceptions tab.
    in the source code of ur function module.
    if
    like this u can code .
    now when u call the function module in tme mainprogram.
    if some error occurs and u have declared a exception for this then it will set sy-subrc = value u give inthe call of this fm.
    in the fm u can program these sy-subrc values and trigger the code for ur exception.
    Please reward if useful
    Regards,
    Ravi
    Edited by: Ravikanth Alapati on Mar 27, 2008 9:36 AM

  • What is the Exceptions in function module

    Hi,
    wt is the exceptions in function module? can anyone tell me?
    Thanks
    swathi

    Exception is the mechanism by which you can give the error messages back to the program.
    Say for the REUSE_ALV_GRID_DISPLAY, we have so many exceptions. Every exception has some meaning. Say the exception PROGRAM_NOT_FOUND will be raised when you had passed wrong program name in the CALLBACK program.
    PROGRAM_NOT_FOUND  = 1...
    If the exception was raised than this value will be set to the SY-SUBRC.
    SO, by accessing SY-SUBRC, you can get to know which exception was raised.
    Regards,
    Naimesh Patel

  • What are the Includes in Function Module...? if the fuction group IS ZSJ_FC

    What are the Includes in Function Module...? if the fuction group IS ZSJ_FC..?
    How can I access SAP through Internet....?
    Moderator Message: Interview-like question(s). Thread locked.
    Edited by: Suhas Saha on Sep 30, 2011 11:14 AM

    Hi
    No!  U can insert an own you Z-INCLUDE or somethingelse, try to regenerate the index of the program.
    Max

  • What are all the types of Function module?

    Hi,
    What are all the types of Function module.
    Pls reply me.

    Hi,
    Function modules are one element. There are no types. However sometimes an RFC enabled function module is referred to as RFC Function module, but really it is just a function module. Also BAPIs are function modules, but are usually referred to as just BAPI as opposed to BAPI Function module.
    There is no different function module types , but calling the function module will be different.
    check this function calls syntax
    1. Calls a function module:
    - CALL FUNCTION func.
    2. Call a function module in a different mode (asynchronous Remote Function Call):
    - CALL FUNCTION func STARTING NEW TASK taskname.
    3. Call a function module in the update task:
    - CALL FUNCTION func IN UPDATE TASK.
    4. Call a function module in a remote system (Remote Function Call, RFC ):
    - CALL FUNCTION func DESTINATION dest.
    5. Asynchronous call to a function module with transactional processing (transactional Remote Function Call):
    - CALL FUNCTION func IN BACKGROUND TASK.
    qRFC with output queue
    6. Call a function module that can be activated in the context of enhancements:
    - CALL CUSTOMER-FUNCTION func.
    plz go through the below links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    Thanks,
    Reward If Helpful.

  • Whats the use  of function module RSAP_IDOC_SEND?

    Hi Gurus,
    Can anyone please let me know the use of Function Module - RSAP_IDOC_SEND.
    Regards
    Avi....

    Hi
    Check this...
    Send IDOC in parallel dialog process.
        CALL FUNCTION 'RSAP_IDOC_SEND'
             STARTING NEW TASK l_task
             PERFORMING callback_parallel_idoc ON END OF TASK
             EXPORTING
                  i_mestyp              = p_mestyp
                  i_rcvprt              = p_rcvprt
                  i_rcvprn              = p_rcvprn
                  i_flag_commit_work    = sbiwa_c_flag_on
                  i_s_rqstprms          = l_s_rorqstprms
             TABLES
                  i_t_idoc_data         = p_t_idoc_data
             EXCEPTIONS
                  system_failure        = 1
                  communication_failure = 2.
    <b>reward if Helpful</b>

  • What are the parameters of Function Module

    Hi,
    What are the parameters of Function Module?

    Function Modules are special external subroutine stored in a central library. The R/3 system provides numerous predefined function modules that you can call from the ABAP/4 programs.
    All the function Modules are created under the Function Groups. Function Groups are nothing but the related group of function modules.
    The function modules can be maintained through T.CodeSE37 and T.Code SE80.
    In general the function module has the following components.
    Documentation:
    This is the place where you can find the discription/purpose of the function module.
    Import & Export Parameters.
    Import parameters correspond to the formal input parameters of subroutines. They pass data from the calling program to the function module.
    Export parameters correspond to the formal input parameters of subroutines. They pass data from the function module back to the calling program.
    Table Parameters.
    Table parameters are internal tables. Internal tables are treated like changing parameters and are always passed by reference.
    Exceptions.
    Exceptions are used to handle error scenarios which can occur in the function modules. The function modules checks for any type of error and raise exception and returns SY-SUBRC value to the calling program.
    Source Code:
    the programming logic of the function module is written in this source code.
    Rewards if useful.

  • What is the table contains Function module include program name

    Hi,
    What is the table contains Function module include program name
    Regards,
    Raja

    Try this FUNCTION_INCLUDE_INFO to get the include number to which function module belongs to.From this u ll get only the particular include name.
    or
    if u need the all the includes used in the function group u have use INNER JOIN on TFDIR and D010INC table
    <b>Select binclude into itab from trdir as a inner join d010inc as b on apname = bmaster where apname = fmodname.</b>
    I hope this will help u.
    Thanks & Regards
    Santhosh
    Message was edited by:
            santhosh ds

  • What are the sequence of function modules executed in payroll result

    Dear all,
    what are the sequence of function modules executed  while retrivieng pryroll result.or
    functionmodule sequence in payroll programming.
    By
    bose

    Hi Bose,
    The sequence of FM executed in payroll result are
    1. cu_read_rgdir ---> from this u will get the country key.
    2. cd_read_last -
    > from this fm u will identify the seqnr for the latest record and finally for the payroll result
    3. pyxx_read_payroll_result.

  • Is there a way to use business objects in the program or function module?

    Hi Experts,
    Is there a way to use business objects in the program or function module.
    Thanks in Advance.
    Naval bhatt

    Hi Naval,
    Ofcourse you can use business objects in your programms/ methods.
    You can use function modules or macros (available from include <cntn01>) for using business objects in your application.
    refere following two links for startup information
    http://www.sap-img.com/abap/reading-attribute-of-a-business-object-in-abap.htm
    http://www.jt77.com/business-warehouse/work-flow-12619.html
    Regards,
    Abhijit

  • How to know whether the tables in function module is importing or exporting parameter?

    Hi guys,
    Why the tables are used in function modules, I knw it transfers internal tables, but thing is that how would i know instantly that whether table is getting imported or exported to the funtion module? Do i need to go through program flow or can we know just by seeing the function module?

    Hi anjali,
                   Tables are like multi line containers ,which can act as both import and export parameters .
                   means,the data in the table can be used by the function module during  its execution and the                same table can be populated with result after the fm execution .
      you can also refer :http://help.sap.com/saphelp_erp60_sp/helpdata/en/d1/801ece454211d189710000e8322d00/content.htm 
    Regards,
    Krishna.

  • Use of custom structure defined in the program in Function Module

    Hi,
    We have defined a structure in a program.
    We want to define a Tables parameter in a Function module having the same structure as in the program.
    Is there a way to do this without defining a standard structure?
    Thanks,
    Arun

    Copy the definition in a Type Group (SE11 - Uilities - Other Dictionary objects) in an Abap syntax, include the type group in function group and program top includes via a [TYPE-POOLS|http://help.sap.com/abapdocu_70/en/ABAPTYPE-POOLS.htm] statement (before Release 7.0, EhP2).
    Regards,
    Raymond

  • Error in the SAP standard function module 'RSDRI_INFOPROV_READ'.

    Hello Experts,
    We upgraded from 3.5 to 7,0 support pack 17 .
    After upgrade we are getting error
      with return code 11 'Others´'.
    While debugging the standard function module we found that the standard method s_r_infoprov->read is being executed with the return code = 8 (inherited_error).
    Any suggestions?
    Regards,
    Vivek

    Not sure if the parameters provided were correct,you may wish to do a sanity check
    Input Parameters:
    1. I_INFOPROV - This will hold the Name of the Info Cube from where we need the pull the data.
    2. I_T_SFC - This parameter is in the format of Internal Table which holds the Character Info Objects we need to pull from the Source Cube.
    3. I_T_SFK - This parameter is also in the format of Internal Table which holds the Key Figure Info Objects which we need to pull from the Source Cube.
    4. I_T_RANGE - This is also in the format of Internal Table which holds the Selection criteria for which we need to pull from the Source Cube u2013 For example the Company Code u2013 001 and Fiscal Year Period u2013 001/2006.
    5. I_T_REQUID u2013 Selection of cube data based on Request Id.
    6. I_SAVE_IN_TABLE u2013 In case you need to save the data in DB table
    7. I_REFERENCE_DATE u2013 This holds the current date.
    8. I_AUTHORITY_CHECK u2013 This will hold the value u2018Ru2019, which is meant for READ.
    9. I_DEBUG u2013 This is for Debugging mode and holds the default value u2018Yu2019.
    Output Parameters:
    1. E_T_DATA u2013 This Output Parameter is of internal table format, in which we can mention the output fields (For all the fields mentioned in the Input Parameter, this output parameter will hold the values).
    2. E_END_OF_DATA u2013 Once the FM is executed successfully, this output parameter will hold the value u2018Xu2019, means extraction completed successfully.
    Hope it Helps
    Chetan
    @CP..

Maybe you are looking for

  • How do I position my layer/table for my header in the center and up top?

    I have designed a site before on my dreamweaver 4 site and decided to design a new one. I just tried to insert my header into the website and it worked fine. However, how to I align it directly in the center and all the way to the top so their is no

  • Spam in email sub-account

    I do not use any explicit spam protection tools other than what comes automatically with my Verizon DSL email service.  My primary user account gets no spam, but a sub-account is flooded with spam daily.  How can I extend anti-spam protection to the

  • Few records are missing while downloading to a Spreadsheet  from a Report

    Dear Gurus, few records are missing while downloading to a Spread sheet from a Z report.  There are around 300 records, out of which 11 records are not appearing in Spreadsheet file after saving.  But, the funny thing is when i try to save in other f

  • Transfer file clean up: What is best practice when creating files with timestamps?

    Created an SSIS package to create files that will be sent which are created with a time stamp. What is the best procedure of clean up for the files? I'd like to keep at least a day of files for verification purposes.

  • Compile and execute java

    Hello is it possible to execute a .class file which is n an other directory without changing directory ? E:\FAC\PROJET\Demo>javac HelloWord.java E:\FAC\PROJET\Demo>java HelloWord Hello Word E:\FAC\PROJET\Demo>cd.. E:\FAC\PROJET>java E:\FAC\PROJET\Dem