Performance improvement in a function module

Hi All,
I am using SAP 6.0 version. I have a function module to retrive the PO's . for just 10,000 records its taking long time.
Can any one sugguest the ways to improve the performance.
Thanks in advance.

Moderator message - Welcome to SCN.
But
Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting
Just 10,000 records? The first rule in performance improvement is to reduce the amount of selected data. If you cannot do that, it's going to take time.
I wouldn't bother with a BAPI for so many records. Write some custom code to get only the data you need.
Tob

Similar Messages

  • Performance issue for this function-module(HR_TIM_REPORT_ABSENCE_DATA)

    Hi Friends
    I am having performance issue for this function-module(HR_TIM_REPORT_ABSENCE_DATA) and one my client got over 8 thousend employees . This function-module taking forever to read the data. is there any other function-module to read the absences data IT2001 .
    I did use like this .if i take out this F.M 'HR_TIM_REPORT_ABSENCE_DATA_INI' its not working other Function-module.please Suggest me .
    call function 'HR_TIM_REPORT_ABSENCE_DATA_INI'
    exporting "Publishing to global memory
    option_string = option_s "string of sel org fields
    trig_string = trig_s "string of req data
    alemp_flag = sw_alemp "all employee req
    infot_flag = space "split per IT neccessary
    sel_modus = sw_apa
    importing
    org_num = fdpos_lines "number of sel org fields
    tables
    fieldtab = fdtab "all org fields
    field_sel = fieldnametab_m. "sel org fields
    To Read all infotypes from Absences type.
    RP_READ_ALL_TIME_ITY PN-BEGDA PN-ENDDA.
    central function unit to provide internal tables: abse orgs empl
    call function 'HR_TIM_REPORT_ABSENCE_DATA'
    exporting
    pernr = pernr-pernr
    begda = pn-begda
    endda = pn-endda
    IMPORTING
    SUBRC = SUBRC_RTA
    tables
    absences = absences_01
    org_fields = orgs
    emp_fields = empl
    REFTAB =
    APLTAB =
    awart_sel_p = awart_s[]
    awart_sel_a = awart_s[]
    abstp_sel = abstp_s[]
    i0000 = p0000
    i0001 = p0001
    i0002 = p0002
    i0007 = p0007
    i2001 = p2001
    i2002 = p2002
    i2003 = p2003.
    Thanks & Regards
    Reddy

    guessing will not help you much, check with SE30 to get a better insight
    SE30
    The ABAP Runtime Trace (SE30) -  Quick and Easy
    what is the total time, what are the Top 10 in the hitlist.
    Siegfried

  • Performance testing of a functional module

    Hi
    Based on the input and corresponding expected output parameters we will test a particular functional module
    Here how to check the performance of that functional module
    Output is correct,but is there any standard specified timelimit  for the runtime , Load or it depends upon the complexity of that funct mod.
    Please provide some inputs regarding this
    Regards
    Amuthan M

    http://www.javaperformancetuning.com/tips/webservice.shtml

  • How to execute Se30(performance check) for a function module

    can anyone please let me know hot to execute perofrmance check for a function module.

    In SE30 below the program option you have Function Module option.
    Give the FM name there >execute, It will lead to the SE37 for Function Module execution screen, enter the values>Execute.
    The ctrl will return back to SE30.
    Press Evaluate to know the analysis.
    Hope this answers.
    Regards
    Vinayak

  • Performance problem with OLE_FLUSH_CALL function module

    Hello Everyone,
    I am facing problem with OLE_FLUSH_CALL function module (execution is taking long time which is going to be dump error).
    Could you please help me in knowing solution for this problem?
    Thanking you in advance.
    Srinivas

    Hi Srinivas,
    the OLE_FLUSH_CALL does an RFC from ABAP backend to frontend UI. So high execution time could result from high network time, for example latency between UI and backend server.
    How many UI interaction steps did you measure for the trace above? Ideally, there should only be one OLE_FLUSH_CALL per user interaction step. If its more, the application is not written in an optimized way.
    Best Regards, Randolf

  • In Function Module

    Hi all,
    My function Group name is Z_TEST
    in that i am having function Module ZTEST
    In this function group i have one system generated include with the name   Z_LTEST$02.
    for what this include is created and what is the purpose of this include.
    Thanks in Advance...

    Hi Joe,
    When you create a function group or function module in the Function Builder , the main program and include programs are generated automatically.
    The main program SAPLfgrp contains nothing but the INCLUDE statements for the following include programs:
    キ LfgrpTOP. This contains the FUNCTION-POOL statement (equivalent for a function group of the REPORT or PROGRAMstatement) and global data declarations for the entire function group.
    キ LfgrpUXX. This contains further INCLUDEstatements for the include programs LfgrpU01, LfgrpU02,... These includes contain the actual function modules.
    キ The include programs LfgrpF01, LfgrpF02,... can contain the coding of subroutines that can be called with internal subroutine calls from all function modules of the group.
    The creation of these INCLUDE programs is supported from the ABAP Workbench by forward navigation (for example creation of a subroutine include by double clicking on the name of a subroutine in a PERFORM statement within a function module).
    Regards,
    Ruthra

  • How to Measure Function Module Performance?

    Please can you tell me how I can measure the performance and trace the actions of a Function Module in R/3?
    The function module in R/3 is run when a user calls a WebDynpro action from a WebDynpro screen within the SAP Portal.
    I have tried running a trace on a user (ST05) but that only shows table actions (e.g. reads/fetch etc.). Also it does not appear in ST04 or ST03N. I would like to know how long the program actually takes to run.
    Thanks.
    Paul

    Hi,
    if I want to measure the runtime required to run some Abap, I use SE30. However i used it only for normal Dynpro application, not WebDynpro.
    The detail level of the created trace can be configured. The aggregation level should be set to "Full" or "By call" at the beginning. Disabling aggregation leads to huge trace files.
    You can select which statements should be traced. If you disable an option it's runtime is not lost but add to the traced action in the next level. If for example "Open SQL" is disabled, the time used by it is added into the net time of the method, function module of subroutine. Otherwise if "Open SQL" is enabled the net time of a function module does not include SQL time. SQL time is then listed separately.
    Greetings

  • How application module helps for performance improve

    Hi Everyone,
    I have a sample web-application in which I am connecting with single AM instance (AM for database view object), retrieving some information and then close the connection. I am doing this as,
    // making AM instance
    <application module instance> = Configuration.createRootApplicationModule(<AM name>, config);
    // performing operations
    <operation result> = <application module instance>.<access VO with any operation>();
    System.out.println("Get result here");
    // disconnecting AM instance
    <application module instance>.getDBTransaction().disconnect();
    Configuration.releaseRootApplicationModule(<application module instance>, true);
    These are the activities which are performed by a single user. Now, I am doing stress test on same activities. I am testing the same code with 300 concurrent users (using JMeter with JSP URL). These are working fine. Also I checked multiple times, it always working fine.
    Now, I need to do something through which I can improve the performance. I know, I can use AM pool configurations to make this more effective. I have gone through the Oracle documents and checked the same test case with default or recommended pool configurations and I found similar kind of results (there is not much difference).
    On other hand, I tried with 'releaseRootApplicationModule' method with false parameter and found better results in default as well as recommended pool configurations.
    My question is, is the change of pool configurations recommended by Oracle really work? or do I need to concentrate more on coding part with default pool configurations?
    Here, I would like to know, what are the best practice (in code as well as pool configurations), I need to follow if I really want to improve the performance in real scenarios (when our application will access with large no. of concurrent users).
    I really look forward some help from experts. I have given a lot of time on this to know how really we can make our application more effective in terms of performance.
    I really appreciate for your reply.
    Regards,
    Dilip Gupta.

    >
    We added the createRootApplicationModule() API (in the oracle.jbo.client.Configuration class) to simplify acquiring an application module from the pool for brief programmatic manipulation before it is released back to the AM pool.
    Steve Muench.
    >
    check [url http://radio-weblogs.com/0118231/2009/08/20.html#a959]Check Your App for Misuse of Configuration.createRootApplicationModule()
    Edited by: Mohammad Jabr on May 10, 2012 7:14 AM

  • Function Module performance in Crystal Reports - Best practices

    Hi all,
    We are following a function module based approach for our crystal reporting needs. We tried to follow an infoset approach, but found that most of the critical fields required for reports were retrieved from function modules and bapis.
    Our reports contain some project filters/parameter fields based on which the task reports would be created. I was wondering what would be the best approach/best practices to be considered while designing the FM so as not to impact the crystal report performance? 
    We created a sample FM in our test system with just the table descriptions ( without the input parameters) which would retrieve all the projects and found that crystal reports crashed while trying to retrieve all the records. I am not sure if this is the right approach since this is our project in using FMs for crystal reports.
    Thank you
    Vinnie

    yes. We did try following the infoset approach against the tables however since our project reports contain long text fields and status texts ( retrieved via FMs), we opted for the FM approach. Do you know how texts can be handles from ABAP to Crystal reports?

  • ABAP Function Module to perform validation

    Hi Developers,
    I'm am trying to create a function module to be later used by a Web Dynpro application. The function module should be structured as followed:
    Importing
    USER_ID : User ID to be searched that is entered by user.
    TENANT: Tenant ID that is to be searched, also entered by user.
    Changing
    EXIST: A flag that will return the values Y or N based on a return from the function module.
    The function module must be able to access a specified Oracle database table and perform a check on the table with the provided import values. If the combination exists, it should return a Y. If the combination does not exist it should return an N. Assumption is that tenant and userid fields exist in this table in addition to two other. User ID is the primary key.
    Regards,
    JD

    Hi,
    For getting data from oracle the following threads may help you;
    Access external Oracle database with ABAP
    Accessing an external Oracle database from ABAP
    You can get more threads by [Searching|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_library&adv=true] the Forum.
    Regards
    Karthik D

  • Performance in function module interfaces

    Does anyone know if there is any significant performance difference between passing a set of export parameters back from a function module as opposed to putting the parameters in a table and passing back the table.  I am working on a function that interprets barcodes and is called thousands of times daily, so performance will be critical.

    Hi,
    Is surely just a difference between some microsecos till some millisecond depending of the application server load.
    The fastest way to do so is to use pointers (type ref to data) and changing parms.
    Example for calling the function module:
    data:
    wa_1_ref type ref to data,
    wa_2_ref type ref to data.
    get referenence of wa_1 into wa1_ref.
    get referenence of wa_2 into wa2_ref.
    call function 'example_function'
    changing
    ch_parm1 = wa1_ref
    ch_parm2 = wa2_ref.
    Then your function have to do something like that:
    Field-symbols:
    <ch_parm1> type YOUR_EXPECTED_TYPE,
    <ch_parm2> type YOUR_EXPECTED_TYPE.
    assign ch_parm1->* to <ch_parm1>.
    assign ch_parm2->* to <ch_parm2>.
    *now you can use the field symbols normally
    Doing it so, minimize the memory handling for the runtime environment.
    Regards,
    Gianpietro

  • Perform In RFC function Module

    Hi Experts,
    Can we use perform statement inside the RFC function module.
    I am working with 4.6b version.
    I am not sure about the cause of error.
    Earlier without perform it was working well.
    Now I have written perform , it is giving me error.
    What would be the cause of the error.
    Thanks In Advance
    Irfan Hussain

    Hi,
    what is the error, what it is saying. and are you sure of that.
    try to use using parameter
      PERFORM MOVE_HEADER_IN  TABLES RETURN
                              <b>USING</b> SALESDOCUMENT
                                    SALES_HEADER_IN.
    Regards
    vijay

  • The performance of  SELECT_TEXT  function module

    hi all,
    i have customize report program  when i execute it by giving the inputs in selection screen it is taking around 6 minutes to display the output list. iby using se30 and st05 i found out that
    the function module " SELECT_TEXT " is consuming more time
    below is the function module can one help me in miimizing the performance  the sy-subrc = 0 after the FM is called. but the only problem is it is fectiching 576,800 records consuming more time . can any one help me ?
    CALL FUNCTION 'SELECT_TEXT'
           EXPORTING
                client     = sy-mandt
                id         = '0001'
                language   = sy-langu
                name       = f_tdname
                object     = c_tdobject
           TABLES
                selections = tab_rbkp_text.

    If you explain further why you are that function module then we can give other options
    this is what the Function module help lists
    SAPscript: Select text
    +The SELECT_TEXT creates a table with the text headers of all text modules which correspond to the requirements specified in OBJECT, NAME, ID, and LANGUAGE. The entries in the parameters OBJECT, NAME, ID, and LANGUAGE can also be generic.+
    The search area can be limited further via the parameter TEXTMEMORY_ONLY or DATABASE_ONLY.

  • PERFORM in Z Function Module

    Greetings!
    I'm creating a Z function module and within it I will looping through an internal table and would like to add a PERFORM routine where I pass a couple of data variables from my itab and then within the PERFORM routine take that data with some other coding/validating and fill an internal table from the main function module however when I build the PERFORM routine in the fm include it doesn't recognize my internal table.
    my code looks a little like this in the fm..
    loop at itab...
    perform validate_data using var1 var2 va3.
    endloop.
    Do I need to pass the itab with a CHANGING parameter of the PERFORM call?

    Hi
    U can became the parameters of fm interface as global data:
    In trx SM37 go to EDIT->INTERFACE->GLOBALIZE PARAMETER
    else
    - or u need to use an USING parameter in your FORM in order to transfer the data from z fm to form;
    - or u need to use a workarea defined as global data in order to transfer the data from z fm to form.
    Max

  • Delivered Function Module to perform UOM conversions??

    Hi Gurus,
    Is there any SAP delivered function module that I can use to perform any UOM conversions at all. For eg, Gallons to liters etc.
    Appreciate your inputs.
    Thanks,
    Reddy

    Dinesh and Anil,
    Thanks for your inputs. I ended up using UNIT_CONVERSION_SIMPLE. It met my requirement.
    Regards,
    Reddy

Maybe you are looking for