Limit Function Module time execution

Hi experts,
I would like to know how to limit FM execution in time .
I can only wait 30 seconds for the function to answer, and continue even if its processing is not over.
I can't figure ou how to do it..does anybody know ?
Thanks in advance !
Regards,

Hi,
I didnt get you , you want to see the time limit FM execution ..? can you tell me the scenario.
here the following link may be useful to you.,
http://help.sap.com/saphelp_nw04/helpdata/en/22/042578488911d189490000e829fbbd/frameset.htm
Thanks & Regards,
Jana

Similar Messages

  • Function Module Strange execution

    Hi Kindly see below scenario:
    I have a RFC FM called "BAPI_DOCUMENT_CHECKIN2" on ERP back end System.
    I execute with below parameters :
    CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'
          EXPORTING: documenttype    = lf_doctype
                     documentnumber  = lf_docnumber
                     documentpart    = lf_docpart
                     documentversion = lf_docversion
                     hostname        = ''
                     statusintern    = ''
                     statusextern    = lf_status
                     statuslog       = ''
          IMPORTING: return     = ls_return
          TABLES: documentfiles = lt_files.
    I give parameters:
      lt_files-storagecategory   = 'Z_xxxL_xxx'.    "
    lt_files-docfile      = '
    10.x.x.xxx\mdmtest\srinivas\srinipaddu.txt'.
    Now "srinipaddu.txt" gets attached in the DMS system (IP:10.x.x.xxx: Belongs to the XI box and not either backend erp or SRM box below)
    Second Scenario:
    Now this same FM which is not present in the SRM BOX is called up using             below syntax (Destination)
    call function 'BAPI_DOCUMENT_CHECKIN2' DESTINATION 'abapdest' EXPORTING: documentnumber            = lf_docnumber
                                                                                    documenttype             = lf_doctype
                                                                                    documentpart             = lf_docpart
                                                                                    documentversion          = lf_docversion
                                                                                    hostname                 = ''
                                                                                    statusintern             = ''
                                                                                    statusextern             = lf_status
                                                                                    statuslog                = ''
                                                                         IMPORTING: return                = pr_ls_return
                                                                         TABLES:    documentfiles         = pr_lt_files.
    Now the FM gets executed but the file in the specified folder is not getting attached in DMS system.
    help me out
    With regards
    Srin

    Hello,
    Assuming you mean in a workflow, you could do this by having the step that calls the FM in a 1-from-2 fork with in the other leg of the fork a step that calls a dummy method and has a 30-minute deadline on it.
    regards
    Rick Bakker
    hanabi technology

  • Debugging Outbound Function module in EDI

    Hello All,
    I have a query regarding debugging function module which is used for creation of outbound Idoc for Purchase Order.
    We have a Z process code which is assigned to a Z function module which creates an IDOC while a PO is created in the system.
    But If I set break points in the Function module, the execution does stop there.
    Can any one please tell me how to debug outbound processing Functioon module while PO is created.
    Regards
    Arindam

    Hi,
    There are 2 ways to to debug an outbound idoc triggered by an output type. One way is to set the output timing to 1, and save the purchase order and then execute RSNAST00 which will take the control to the breakpoint.
    You can also debug the idoc with the output timing set as 4.
    Here the idoc is triggered in update mode. Hence any breakpoints you may have set before will not reflect. Hence you need to activate update debugging.
    Below are the steps for the same..
    1. Add the output type in purchase order.
    2. Enter '/h' to activate debugging in transaction window.
    3. Save purchase order.
    4. The process enters debugging mode.
    5. In Settings tab, select checkbox for Update Debugging.
    6. Click F8.
    7. The control will appear to go out and re-enter debugging mode.
    8. Now from the menu bar, in breakpoints option, choose Breakpoint At Function Module option, and give the name of the function module which is processing the idoc.
    9. Once breakpoint set, click F8.
    10. The control will now go to the function module. You can then debug the FM.
    Hope this information is helpful.

  • How to avoid a function module runnning parallely twice

    Hello,
              There is a scenario, where user calls a function module via RFC.
    The requirement is to avoid the user from running the function module parallely twice or more because it may lead to dead lock problems.
             To realize this creation of a new enqueue object and set up of enqueue of this object in the function is suggested.
            If the object is blocked (which means the function is already being
    running by the sorter), it should go out of the function.
           Can i get help in locking this function module during execution.
    With Best Regards,
               Adarsh.

    Here's a sample of how you might do this - see comments in code for explanation.. run the program in two differ SAPGui sessions to see the effect.
    report zlocal_jc_tfdir_lock.
    start-of-selection.                                                   
      perform set_and_check_lock.                                                                               
    form set_and_check_lock.                                              
    *" Use SAP enqueue to prevent multiple RFC calls of same object       
      data:                                                               
        l_object             like tfdir-funcname.                                                                               
    *" Build some name that is specific to your needs                     
    *" Include sy-uname in key if lock is per user, not for process                                                                               
    concatenate '#Z LOCK:' sy-uname into l_object.                      
    *" and enqueue                                                        
      call function 'ENQUEUE_ESFUNCTION'                                  
           exporting                                                      
                funcname       = l_object                                 
           exceptions                                                     
                foreign_lock   = 1                                        
                system_failure = 2                                        
                others         = 3.                                                                               
    if not sy-subrc is initial.                                         
        message e398(00)                                                  
          with                                                       
            l_object 'is held by' sy-msgv1 space.                    
      else.                                                          
        write: / l_object, 'is now locked - check sm12 for proof'.   
      endif.                                                                               
    endform.

  • Testing of Function Module

    Hi,
         I want to test the BAPI Function mudule for PO.how to test it in SE37.
    please tell me the Step by Step procedure like how to give values and how to know the errors etc.
    Regards,
    Shobha Henry

    hi,
    It similar to like testing any function module. after execution you have to check the RETURN parameter to see how the bapi was executed.
    you might want to call commit bapi in order to see if bapi really does the changes that you want ot do... In such case you to call commit bapi after your bapi call in se37 itself..
    To do so
    1. Go to trasanction SE37
    2. Menu path:  Function Module --> Test --> Test Sequence..
    3. On the popup menu enter the sequence of func mode want to execute in series...
    4. For example, for one of my test I executed bapis in these order.
                BAPI_PS_INITIALIZATION
                BAPI_BUS2054_CREATE_MULTI
                BAPI_PS_PRECOMMIT
                BAPI_TRANSACTION_COMMIT
    Hope this helps you.
    Enjoy SAP.
    Pankaj Singh.

  • Need to know how to find the last execution time for a function module

    HI all
    I need to know
    1) How to find out the last execution time of the function module ?
      say for eg. I have executed a func. module at 1:39pm. How to retrieve this time  (1:39pm)
    2) I have created 3 billing document in tcode VF01 i.e 3 billing doucment no. would be created in SAP TABLE "VBRP" b/w 12am to 12:30 am.
    How to capture the latest SAP database update b/w time intervals?
    3) Suppose I am downloading TXT file using "GUI_DOWNLOAD" and say in 20th record some error has happened. I can capture the error using the exception.
    Is it possible to run the program once again from 21st records ? All this will be running in background...
    Kindly clarify....
    Points will be rewarded
    Thanks in advance

    1.Use tcode STAT input as Tcode of Fm and execute .
    2. See the billing documents are created in table VBRk header and there will always be Creation date and time.
    VBRk-Erdat "date ., u can check the time field also
    So now if u talk the date and time we can filter then display the records in intervals.
    3. with an error exeption how is my txt download finished .
    once exception is raised there will not be a download .
    regards,
    vijay

  • Function Module to find the Last Execution date of Back ground Job

    Hi,
    Is there any function module to find the <b>last execution date of back ground job</b>.
    So that I can transfer the data from SAP to Legacy system based on the document creation date should be in between last execution date and current date.
    thanks in advance.
    Eswar.

    Don't know of a function module, but you should be able to use the information in table TBTCO to get the last start date and time of the job you are interested in.

  • Run Time of update task function module

    Hi
    Any body please tell me how to find out the execution time for a update task function module with in a user exit.
    thanks in advance
    saravanan

    Vimal,
    if the INSERT tries to insert an existing key, check for sy-subrc = 4 in the function module, raise an error (duplicate key) and the iupdate process is aborted - you will get express message.
    It might be better to
    first lock the table
    then check the existence of key
    then call update function (update process will unlock).
    Regards,
    Clémens

  • Call RFC Function Module and return 1000 records at a time

    I would like to call a Remote Enabled Function Module from a non SAP system.  This function module will select data from the database and return it to the calling program.
    Suppose there are 100,000 records that need to be returned, but the calling module would like the data in chunks of 1000 records.  Therefore the calling program would call the FM 100 times. 
    How do I code the function module to know on each subsequent call to grab the next chunk of 1000 records? 
    Let me know if additional information is needed.
    Thanks,
    Aaron

    Hello,
    Here is how you can go for this issue:
    1. Create one RFC function module with following parameter. These parameters are with respective of chunking logic.
         Import: Package Size
         Export: Total number of records
         Changing: chunk count
    Implement following logic:
    1. First of you need to know how many chunks you need to fetch for that get the count of total number of records. This is one  
        time activity so you better maintain one flag import parameter will be set to 'X' only first call.
    2. Get the number of chunk using total number of records / chunk size for e.g. 1000 / 100 so chunk count = 10.
    3. Define internal chunk counter in function module which will be used to locate the correct chunk depending on the chunk
        counter value sent from calling program.
    4. Send first call with package size 100 and chunk count = 1, execute select statement and increment internal
        chunk count check if chunk count = internal chunk count in current case chunk count = 1 so exit select statement and return
        with first chunk.
    5. Send second call with package size 100 and chunk count = 2. Execute select statement and check chunk count with internal
        chunk counter, in current case it will be 1 so skip that data and go for next chunk of 100 records increment internal chunk  
        counter. In this case it will match with external chunk count = 2. load output table with that data and return to calling program.
    6. Repeat step 4 until you reach last chunk.
    You need to use SELECT...ENDSELECT with PACKAGE SIZE addition so for every loop it will return number of records mentioned in package size.
    Hope this helps.
    Thanks,
    Augustin.

  • Function Modules for Data and Time

    Hi all,
              I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
    Thanks in advance

    Hi Ranjith,
    i think this will b usefull for you..
    SAP Bar Chart Function Modules and what they are used for
    Function module
    Used for
    BARC_GRAPHIC_PBO
    Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
    BARC_GRAPHIC_PAI
    Analyzing data returned by the graphic
    BARC_SET_TIME_AXIS
    Setting start and end of time axis
    BARC_SET_OPTIONS
    Setting options
    BARC_ADD_CHART
    Creating a chart
    BARC_SET_CHART_ATTRIB
    Setting chart attributes
    BARC_ADD_SECTION
    Creating a section on the time axis
    BARC_SET_SECTION_ATTRIB
    Setting section attributes
    BARC_ADD_RIBBON
    Adding a ribbon to the time axis
    BARC_SET_RIBBON_ATTRIB
    Setting attributes for ribbons in the chart
    BARC_ADD_GRID
    Adding a time grid
    BARC_SET_GRID_ATTRIB
    Setting grid attributes
    BARC_ADD_LAYER
    Adding a layer (graphic elements)
    BARC_SET_LAYER_ATTRIB
    Setting layer attributes
    BARC_ADD_LINE
    Adding a line
    BARC_ADD_CALENDAR
    Creating a calendar
    BARC_SET_CALENDAR_ATTRIB
    Setting attributes for a calendar
    BARC_ADD_TIME_PROFILE
    Creating time profiles
    BARC_SET_TIME_PROFILE_ATTRIB
    Setting attributes for time profile
    BARC_ADD_INTERVAL
    Adding a time interval
    BARC_SET_INTERVAL_ATTRIB
    Setting time interval attributes
    BARC_ADD_TIME_OBJECT
    Creating a time object
    BARC_CONVERT_DATE
    Creating a date string in bar chart format
    BARC_REVERT_DATE
    Converting a date string in bar chart format to date and time
    BARC_ADD_DATELINE
    Creating a date line
    BARC_SET_DATELINE_ATTRIB
    Setting dateline attributes
    BARC_GET_PROFILE_CONTENTS
    Obtaining profile contents for customizing a chart
    BARC_GET_COLUMN_WIDTH
    Selecting new column width
    BARC_SET_COLUMN_WIDTH
    Setting the column width
    BARC_GET_TEXTINDEX
    Obtaining the text index of a field
    BARC_SET_LABELS
    Positioning the chart display
    BARC_SET_COLUMN_ATTRIB
    Setting column attributes
    BARC_SET_ROW_ATTRIB
    Setting row attributes
    BARC_SET_ROW_HEIGHT
    Setting the line height
    BARC_SET_MAXCHARTS
    Setting the maximum number of charts sent
    <b>If its usefull reward points
    </b>

  • Function modules to read Time clusters B1 and B2 from PCL1 and PCL2

    Hi All
    Are there any function modules or macros to read time clusters B1 & B2?
    I want to read time data in the clusters for reporting purpose.
    Regards,
    Rupesh Mhatre

    You can also call the FM HR_TIME_RESULTS_GET and get the exact cluster you need from B2 like WPBP, ZE, SALDO etc.
    Otherwise if you want to use the older FM declare the GET_TBUFF and GET_BUFFER_DIR as of below structure.
    DATA: BEGIN OF TBUFF OCCURS 5000.                           "XPMK014785
            INCLUDE STRUCTURE PCL1.
            DATA: SGART(2),
          END OF TBUFF.
    DATA: BEGIN OF BUFFER_DIR OCCURS 2000,                      "XPMK014785
            SGART(2),
            CLIENT LIKE PCL1-CLIENT,
            RELID LIKE PCL1-RELID,
            SRTFD LIKE PCL1-SRTFD,
            NTABX LIKE SY-TABIX, "pointer auf aktuellen satz
            OTABX LIKE SY-TABIX, "pointer auf alten satz (falls vorhanden)
            NNUXT LIKE PCL1-SRTF2, "anzahl folgesaetze aktueller Satz
            ONUXT LIKE PCL1-SRTF2, "anzahl folgesaetze alter Satz
          ofset(3) type p,     "offset innerhalb eines entry
          END OF BUFFER_DIR.
    INT_TIME_RESULTS should be of type PTM_TIME_RESULTS.
    Regards
    Ranganath

  • Scheduling function module execution in background jobs

    Hi,
    I have requirement where in after obtaining all the required inputs from the user we will call an function module to execute it.
    The requirement is that the execution of fm shld happen in background and a log must be created showing the user whther it was successful or if it failed with the list of errors.
    Can you kindly give some input on how to schedule the execution of function module in background job and if scheduled how to create the logs to display the success or error message.
    Warm Regards,
    Naveen M

    Hi,
    Just create a simple program where you have to call this FM.
    Pass the values to FM either by declaring some internal table of selection screen and execute the program in background.
    For Message Log, you can use structurre BDCMSGCOLL
    DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    After Call to FM, read from this internal table as follows
    READ TABLE MESSTAB WITH KEY MSGTYP = <Message Type>
                                            MSGNR  = <Message Number>.
    regds,
    Anil

  • Function Module Extraction from KONV Table taking lot of time for extractio

    Hi
    I have a requirement wherein i need to get records from KONV Table (Conditions (Transaction Data) ). i need the data corresponding to Application (KAPPL) = 'F'.
    For this i had written one function module but it is taking lot of time (@ 2.5 hrs) for fetching records as there are large number of records in KONV Table.
    I am pasting the Function Module code for reference.
    <b>kindly guide me as to how the extraction performance can be improved.</b>
    <b>Function Module Code:</b>
    FUNCTION ZBW_SHPMNT_COND.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     VALUE(I_ISOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG OPTIONAL
    *"     VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE OPTIONAL
    *"     VALUE(I_DATAPAKID) TYPE  SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
    *"     VALUE(I_PRIVATE_MODE) OPTIONAL
    *"     VALUE(I_CALLMODE) LIKE  ROARCHD200-CALLMODE OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZBW_SHPMNT_COND OPTIONAL
    *"      E_T_SOURCE_STRUCTURE_NAME OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    The input parameter I_DATAPAKID is not supported yet !
      TABLES: KONV.
    Auxiliary Selection criteria structure
      DATA: l_s_select TYPE sbiwa_s_select.
    Maximum number of lines for DB table
      STATICS: l_maxsize TYPE sbiwa_s_interface-maxsize.
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    cursor
              S_CURSOR TYPE CURSOR.
    Select ranges
      RANGES: L_R_KNUMV  FOR KONV-KNUMV,
              L_R_KSCHL  FOR KONV-KSCHL,
              L_R_KDATU  FOR KONV-KDATU.
    Declaring internal tables
    DATA : I_KONV LIKE KONV OCCURS 0 WITH HEADER LINE.
      DATA : Begin of I_KONV occurs 0,
             MANDT LIKE konv-mandt,
             KNUMV LIKE konv-knumv,
             KPOSN LIKE konv-kposn,
             STUNR LIKE konv-stunr,
             ZAEHK LIKE konv-zaehk,
             KAPPL LIKE konv-kappl,
             KSCHL LIKE konv-kschl,
             KDATU LIKE konv-kdatu,
             KBETR LIKE konv-kbetr,
             WAERS LIKE konv-waers,
             END OF I_KONV.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    The input parameter I_DATAPAKID is not supported yet !
    Invalid second initialization call -> error exit
        IF NOT g_flag_interface_initialized IS INITIAL.
          IF
            1 = 2.
            MESSAGE e008(r3).
          ENDIF.
          log_write 'E'                    "message type
                    'R3'                   "message class
                    '008'                  "message number
                    ' '                    "message variable 1
                    ' '.                   "message variable 2
          RAISE error_passed_to_mess_handler.
        ENDIF.
    Check InfoSource validity
        CASE i_isource.
          WHEN 'X'.
         WHEN 'Y'.
         WHEN 'Z'.
          WHEN OTHERS.
           IF 1 = 2. MESSAGE e009(r3). ENDIF.
           log_write 'E'                  "message type
                     'R3'                 "message class
                     '009'                "message number
                     i_isource            "message variable 1
                     ' '.                 "message variable 2
           RAISE error_passed_to_mess_handler.
        ENDCASE.
    Check for supported update mode
        CASE i_updmode.
    For full upload
          WHEN 'F'.
          WHEN 'D'.
          WHEN OTHERS.
           IF 1 = 2. MESSAGE e011(r3). ENDIF.
           log_write 'E'                  "message type
                     'R3'                 "message class
                     '011'                "message number
                     i_updmode            "message variable 1
                     ' '.                 "message variable 2
           RAISE error_passed_to_mess_handler.
        ENDCASE.
        APPEND LINES OF i_t_select TO g_t_select.
    Fill parameter buffer for data extraction calls
        g_s_interface-requnr    = i_requnr.
        g_s_interface-isource   = i_isource.
        g_s_interface-maxsize   = i_maxsize.
        g_s_interface-initflag  = i_initflag.
        g_s_interface-updmode   = i_updmode.
        g_s_interface-datapakid = i_datapakid.
        g_flag_interface_initialized = sbiwa_c_flag_on.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF i_t_fields TO g_t_fields.
    Interpretation of date selection for generic extraktion
       CALL FUNCTION 'RSA3_DATE_RANGE_CONVERT'
         TABLES
           i_t_select = g_t_select.
      ELSE.                 "Initialization mode or data extraction ?
       CASE g_s_interface-updmode.
         WHEN 'F' OR 'C' OR 'I'.
    First data package -> OPEN CURSOR
        IF g_counter_datapakid = 0.
       L_MAXSIZE = G_S_INTERFACE-MAXSIZE.
          LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'KNUMV'.
            MOVE-CORRESPONDING l_s_select TO l_r_knumv.
            APPEND l_r_knumv.
          ENDLOOP.
          LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'KSCHL'.
            MOVE-CORRESPONDING l_s_select TO l_r_kschl.
            APPEND l_r_kschl.
          ENDLOOP.
          Loop AT g_t_select INTO l_s_select WHERE fieldnm = 'KDATU'.
            MOVE-CORRESPONDING l_s_select TO l_r_kdatu.
            APPEND l_r_kdatu.
          ENDLOOP.
    *In case of full upload
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
       APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
          OPEN CURSOR G_CURSOR FOR
            SELECT MANDT
                   KNUMV
                   KPOSN
                   STUNR
                   ZAEHK
                   KAPPL
                   KSCHL
                   KDATU
                   KBETR
                   WAERS
            FROM   KONV
            WHERE KNUMV IN l_r_knumv
            AND   KSCHL IN l_r_kschl
            AND   KDATU IN l_r_kdatu
            AND   KAPPL EQ 'F'.
        ENDIF.
        Refresh I_KONV.
        FETCH NEXT CURSOR G_CURSOR
                   APPENDING CORRESPONDING FIELDS OF TABLE I_KONV
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR G_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        LOOP AT I_KONV.
         IF I_KONV-KAPPL EQ 'F'.
          CLEAR :E_T_DATA.
          E_T_DATA-MANDT = I_KONV-MANDT.
          E_T_DATA-KNUMV = I_KONV-KNUMV.
          E_T_DATA-KPOSN = I_KONV-KPOSN.
          E_T_DATA-STUNR = I_KONV-STUNR.
          E_T_DATA-ZAEHK = I_KONV-ZAEHK.
          E_T_DATA-KAPPL = I_KONV-KAPPL.
          E_T_DATA-KSCHL = I_KONV-KSCHL.
          E_T_DATA-KDATU = I_KONV-KDATU.
          E_T_DATA-KBETR = I_KONV-KBETR.
          E_T_DATA-WAERS = I_KONV-WAERS.
          APPEND E_T_DATA.
       ENDIF.
        ENDLOOP.
        g_counter_datapakid = g_counter_datapakid + 1.
      ENDIF.
    ENDFUNCTION.
    Thanks in Advance
    Regards
    Swapnil.

    Hi,
    one option to investigate is to select the data with a condition on KNUMV (primary IDX).
    Since shipment costs are store in VFKP I would investigate if all your F condition records are used in this table (field VFKP-KNUMV).
    If this is the case then something like
    SELECT *
    FROM KONV
    WHERE KNUMV IN (SELECT DISTINCT KNUMV FROM VFKP)
    or
    SELECT DISTINCT KNUMV
    INTO CORRESPONDING FIELD OF <itab>
    FROM VFKP
    and then
    SELECT *
    FROM KONV
    FOR ALL ENTRIES IN <itab>
    WHERE...
    will definitively speed it up.
    hope this helps....
    Olivier

  • How to run the Function module Parallelly at a time.

    Hi all,
    LOOP AT ITAB.
    call function 'Z_SAMPLE'
    ENDLOOP.
    Here if ITAB is having 4 records, Function module Z_SAMPLE will be runned 4 times one by one .
    My requirement is If ITAB is having 4 record ,Function module should be runned 4 times parallely(parallel process) .
    Please tell me how i can do this  Can i run that statement 4 times by removing the loop or
    Can i Create 4 different jobs and run that jobs at a time if yes please tell me how to creat the jobs and run parallelly.
    Please suggest me the solution
    Please do ask  me if question is not clear
    Thanks in Advance
    Ajay

    Is it possible ?
    DATA : f1 TYPE string VALUE '1',
           f2 TYPE string VALUE '2',
           f3 TYPE string VALUE '3',
           f4 TYPE string VALUE '4'.
    DATA : f1o TYPE string ,
           f2o TYPE string ,
           f3o TYPE string,
           f4o TYPE string.
    PERFORM call_fm USING f1 CHANGING f1o.
    PERFORM call_fm USING f2 CHANGING f2o.
    PERFORM call_fm USING f3 CHANGING f3o.
    PERFORM call_fm USING f4 CHANGING f4o.
    WRITE f1o.
    WRITE f2o.
    WRITE f3o.
    WRITE f4o.
    *&      Form  CALL_FM
    *       text
    *      -->P_F1  text
    FORM call_fm  USING f1 CHANGING f1o.
    * FUNCTION Z_TEST_MULTI.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(A) TYPE  STRING OPTIONAL
    *"  EXPORTING
    *"     VALUE(B) TYPE  STRING
    *b = a.
    *ENDFUNCTION.
      CALL FUNCTION 'Z_TEST_MULTI'
        EXPORTING
          a = f1
        IMPORTING
          b = f1o.
    ENDFORM.                    " CALL_FM

  • RFC function module - to have it as time dependent

    Hi,
    I have a RFC call to CRM system from R/3 side.  This call is made to get email address of users in CRM system - during the triggering of order confirmation output. 
    Some times the RFC queue is full and these calls also get in to the queue blocking the queue.  This call for me it is an optional and it should not get struck in the queue meaning the order output process should not wait for longer time. 
    Is there a way that I can say if the call is taking longer time say over 60 seconds no need to wait for the CRM data.  Is there any option in the function module to do so (something similar to "starting new task", "performing <a routine> on end of task").
    Thanks in advance...
    Krish

    Thanks for your responses.
    May I know where I can set the timeout in SM59?  If it is a common setting for all RFC connections, then I cannot touch since the regular calls to CRM/ other systems shouldn't get affected.  If it is specific to the RFC connection then I can create a new one and use it over here with time out setting.
    Asynchronous RFC I can try but this call to CRM system is made from the output routine - so I am not sure how we can use it over here.  The output routine checks if any valid email address found in CRM system for the customer.  If so then it sets sy-subrc = 0.  Since this routine is called during the order creation the wait causes delay in order getting saved.  This happens occasionally when the CRM queue is fully occupied.
    Thanks,
    Krishnan V

Maybe you are looking for