Execute FM in background for every 10K records

I've a report which retrieves all the data from the master table using the open fetch cursor with the packet size 10,000
FOR EXAMPLE:
If there are 50,000 records(total)
For each 10,000 records it should trigger a job  (am trying to call a common function module and submit the FM in background from report)  where the validation will be done only through the funtion module.
Totally am expecting 5 job's to be trieggered.
Purpose : I want all the records validation to be completed Simultaneously with fraction of difference.
So friends any idea/any help would be greatly appriciated.
Giri

hi
you need to do the following:
1. set the report as an executable.
2. in tcode sm36
create a job.
assign the abap program- the report created in step 1 ( if you are scheduling from the same sap gateway else it is to be scheduled as an external program)
for the scheduling- you can schedule it after an event ( if the open cursor fetch exceeds or equals 10000) - if the no.of records read are less than 10000, then exit the report- so that the job will not be run.
schedule the date and time
save the job.
3. to view the status and change/delete the job use tcode sm37 and delete the release jobs.

Similar Messages

  • How to get wage type for every time record

    Hi Pros,
          I am using DS 0CA_TS_IS_1, it includes report time type (0REPTT), but not have wage type. in CATSDB, I fied fields for attendance/absence type and wage type. but not every time record has wage type. can you please tell me how to get wage type for every time record? what is relation between reporting time type, attendance/absence type and wage typs?

    Hello,
    Can you talk to your HR/T&E functional consultant if they populate these values in CATSDB table using standard way or if there are custom fields that are in CATSDB OR any other table which can be used to meed the requirements
    Thanks
    Abhishek Shanbhigue

  • Message split for every 1000 records

    Hi All,
    My scenario is Proxy to File.We have to process thousands of records from r/3 to.I need to create separate XML file for every 1000 records in receiver directory.Is there any solution to achieve this?
    Thanks in advance
    Kartikeya

    here;s the blog krish was referring to..
    Night Mare-Processing huge files in SAP XI

  • Commit for every 1000 records in  Insert into select statment

    Hi I've the following INSERT into SELECT statement .
    The SELECT statement (which has joins ) has around 6 crores fo data . I need to insert that data into another table.
    Please suggest me the best way to do that .
    I'm using the INSERT into SELECT statement , but i want to use commit statement for every 1000 records .
    How can i achieve this ..
    insert into emp_dept_master
    select e.ename ,d.dname ,e.empno ,e.empno ,e.sal
       from emp e , dept d
      where e.deptno = d.deptno       ------ how to use commit for every 1000 records .Thanks

    Smile wrote:
    Hi I've the following INSERT into SELECT statement .
    The SELECT statement (which has joins ) has around 6 crores fo data . I need to insert that data into another table.Does the another table already have records or its empty?
    If its empty then you can drop it and create it as
    create your_another_table
    as
    <your select statement that return 60000000 records>
    Please suggest me the best way to do that .
    I'm using the INSERT into SELECT statement , but i want to use commit statement for every 1000 records .That is not the best way. Frequent commit may lead to ORA-1555 error
    [url http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:275215756923]A nice artical from ASKTOM on this one
    How can i achieve this ..
    insert into emp_dept_master
    select e.ename ,d.dname ,e.empno ,e.empno ,e.sal
    from emp e , dept d
    where e.deptno = d.deptno       ------ how to use commit for every 1000 records .
    It depends on the reason behind you wanting to split your transaction into small chunks. Most of the time there is no good reason for that.
    If you are tying to imporve performance by doing so then you are wrong it will only degrade the performance.
    To improve the performance you can use APPEND hint in insert, you can try PARALLEL DML and If you are in 11g and above you can use [url http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_parallel_ex.htm#CHDIJACH]DBMS_PARALLEL_EXECUTE to break your insert into chunks and run it in parallel.
    So if you can tell the actual objective we could offer some help.

  • How to add a row for every 5 records using logic:iterate

    Hi,
    In my application, using logic:iterate iam displaying 20 records per page.
    I want to insert a row for every 5 records.
    Please tell how to insert that row.
    Thanks in advance.
    Mohan

    I think this could work for you
    for (int x=1 ; x<=20 ; x++) {
    addRowWithRecord
    if (x%5==0)
    addEmptyRow
    }

  • How to Run a Report automatically in Background for every night

    Hi,
    How to run a report program in Background automatically for every nigh.
    Thanks
    Ramesh

    Hi Ramesh,
    You can use SM36 and use the "Job Wizard" to define a background job in simple step by step procedure
    Or
    Goto SM37 and specify a job name.
    Next specify the ABAP Program Name of the report you want to execute under Job Step.
    Then click on "Extended Job Selection" and goto the Period Tab.
    There select "Only Periodic Jobs" and then specify the frequency of execution based on Months, Weeks, Days, Hours or Minutes.
    Hope this helps,
    Regards,
    Madhur
    Message was edited by: Madhur Chopra

  • Different background for every Space?

    Is there any utility that would let me specify a different background image for every Space?

    That seems like a trivial feature, but it may be difficult to implement. The system would have to keep the other desktop images loaded in memory (one per space) so that switching would work seamlessly and immediately, without any delay. That's potentially 16 images. If the Mac had two displays, that's 32. And a Mac can have more displays...
    To answer your question, I have not seen any utility to do that.
    I think the idea for Spaces it that your desktop does not move or change. It's your open application windows that slide onto an off of your ONE desktop, based on how you have grouped them. Spaces is an extension of Exposé, which does the same type of thing with open windows. I like the way it works now, and I think it would be distracting and a bit jarring if the background also changed as the windows slid into place.

  • Need Help On Oracle form side for serial no genretion for every last record

    Hi Experts,
    currently i'm facing one problem like :
    i'm populating one receipt detail in Multi block , like when user key in one receipt number that time record should go in first record ,and if they key in second receipt number then record should go in second record . mean to say every time record go in last record ..but the problem is i want to generate Serial no correspondence to every last record ..
    here is my approch :
    cursor c1 is
    select * from table
    where cname =:blk_name.clm_name.
    Last record;
    next_record;
    for v1 in c1 loop
    processed record;
    next_record;
    end loop;
    last_record;
    go_block(___);
    first_record;
    :sno := system.cursor_record ;
    next_reocrd;
    end loop;
    first_record;
    And in block level i'm writing code for Serial number generation when user key in manual entry for receipt detail:
    :blk_name.coulumn_name := :system. cursor_record;
    so in this approach their is no problem it is working properly but the problem is that
    when user fetch one receipt automatically and then after he want to enter next record manually and he decided to go in detail block ,
    and once he reached in detail block that time block level trigger i firing .ans serial number 2 generated and then suddenly he came to know no i want to fetch next record automatically mean to say now user going again master block and fetching next receipt detail ,
    but the problem is when user leaving seccond sr no and going in master block and population next receipt detail that time cursor going on 3 record
    but logically have to replace the second Serial no and generate the again serial number 2 record population .
    so i'm appreciating is anyone if came accoross this type of issue please corrrect my code and send updated code ..plsssssssssssssssssssssssssssssss
    Thanks
    Abhishek
    [email protected]

    Friend, If you forward this question in forms forums , It will be better for you.
    Abishek Go this link and post there friend.
    Link:Forms

  • Uploading data in Background - for CJ27 LSMW recording or BDC

    Hi
    1. please suggest the BAPI for creating project with reference to standard project definition/WBS similar to CJ27 or CJ20N with copy project method
    2. we tried to upload the data in background for LSMW recording and BDC but geting runtime error with raise exception and GUI can not be reach error
    recording done using t.code. cj27
    suggest the suitable method or solution for above

    Hi,
    Refer to this link..creation of project definition and wbs element

  • Select query for every 1000 records

    Hi all ,
             Please help me in the issue . I am using select query Select * from table up to 1000 rows for acheving the records but i want this process to retrigger once the process of 1000 records is compleded again it needs to fetch the next 1000 records and process the same . I am changing the status of the processed records once it is processed . Can can one tell me how to retrigger the select query once the 1000 records are processes.
    Thanks in advance,

    Hi Eric,
                  After selecting the 1000 records, find the key value of the last record. Build up the range as GT. Again use the select query.
    For example,
    Select * into table lt_data from ztab
    where key in r_key
    up to 1000 rows.
    regards,
    Niyaz

  • How can i use page break for every 5 records in sap scripts

    on every 5 lines of records i have go for a new page so what is procedure to do this .if possible send me with coding .

    Hi John..
    this is the way..
    IN THE PRINT PROGRAM...
    DATA : V_MOD TYPE I.
    loop at Itab.
       V_MOD  = SY-TABIX / 5.
       IF V_MOD  = 0.
           CALL FUNCTION 'CONTROL_FORM'
           EXPORTING'
              COMMAND = 'NEW-PAGE' .
      ENDIF.
             CALL FUNCTION 'WRITE_FORM'
    ENDLOOP.
    <b>reward if Helpful.</b>

  • Update a column for every 2000 records in the table

    The table has 50,000 records. I want to update the process_id every 2000 rows. For example, 1 for the 1st 2000 rows, 2 for the next 2000 rows, 3 for the next 2000 rows, and etc. Is there a quick way to do it?
    Thanks much

    hey <[email protected]>
    Two ways of doing this...
    First: PL/SQL
    By declaring a cursor on the table and using the cursor%rowcount method to update your field..something like this...
    Declare
    Begin
    For rno in MyCursor
    Loop
    update <tablename> set process_id = lv_pid where rowid = rno.rowid
    If mod(MyCur%rowcount,2000) = 0 then
    lv_pid = lv_pid + 1;
    End If;
    End Loop;
    End
    I am sorry if u already knew this :-) !!
    Second: SQL
    let u know once (if)i crack it :-( !!
    Goodluck...
    Vasudev

  • Fatal error while executing BDC in background for PFCG transaction

    Hello,
    I have requirement where I have to create or modify roles in PFCG transaction.
    I used BDC to do this. While executing in foreground it works fine but in
    background mode it is giving me runtime error as
    "Control Framework: Fatal error - GUI cannot be reached". What
    could be the reason behind it.
    Is there any BAPI available to meet this functionality where I can modify or
    create new roles in PFCG Transaction code.
    Thank You.
    Regards,
    Dipak

    Hi Dengyong,
    I tried searching with that. But did not get any suitable BAPI or FM to meet this functionality.
    Regards,
    Dipak

  • BDC for every 80 records

    Dear All,
    I have one typical BDC problem.
    If the number of records in file are crossing 80,my bdc is giving problem. So I need to split total records into sets of 80 and submit them.
    So I need to create the session name dynamically, pass the data dynamically.
    IF you can send some example code for the above it will be great help for me.
    Many Thanks,
    Ranjan

    Please find my code..
    This info may be useful..
    I'm doing BDC for KB31N tcode,where i have two items in header(doc date, posting date).Multiple line items(each line item should consists of 4 fields namely cost center,statistical key figure,total qty,text).
    When i'm sending more than 80 rec records i'm being populated an error message "BDC_Close_group, session not opened"
    Kindly advice me how to handle this
    *& Report  ZCO_I025_WSKAZNIKI_STAT_DEV                                 *
    *& Interfejs wczytywania wskaŸników statystycznych                     *
    REPORT  zco_i025_wskazniki_stat_dev                                 .
    TYPES: BEGIN OF l_tab_dane,
        indic LIKE rk23f-stagr,
        quant LIKE rk23f-mbgbtr,
        mpk LIKE rk23f-ekostl,
        order LIKE rk23f-eaufnr,
        text LIKE rk23f-sgtxt,
      END OF l_tab_dane.
    DATA: it_excel TYPE TABLE OF alsmex_tabline,
      wa_excel TYPE alsmex_tabline,
      it_data TYPE TABLE OF l_tab_dane,
      wa_data TYPE l_tab_dane,
      error  TYPE C,
      msg TYPE string.
    DATA:iv_pole TYPE string,
      ddatum(10),
      kdatum(10),
    *Inserted By  Developer
       filelist    TYPE filetable,
            rc          TYPE i.
    DATA: BEGIN OF bdctab OCCURS 5.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdctab.
    SELECTION-SCREEN BEGIN OF BLOCK p1 WITH FRAME TITLE text-001.
    PARAMETERS:
      p_zakla LIKE tka01-kokrs DEFAULT '1000',
      p_ddate LIKE sy-datum DEFAULT sy-datum,
      p_kdate LIKE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN ULINE.
    PARAMETERS:
      p_fname LIKE rlgrap-filename.  " DEFAULT 'd:dane.xls'.
    SELECTION-SCREEN END OF BLOCK p1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          file_filter       = cl_gui_frontend_services=>filetype_excel
         multiselection    = 'X'
        CHANGING
          file_table        = filelist
          rc                = rc.
      IF LINES( filelist ) IS INITIAL.
        EXIT.
      ENDIF.
      READ TABLE filelist INDEX 1 INTO p_fname.
    START-OF-SELECTION.
    AUTHORITY-CHECK OBJECT 'TKA01'
      ID 'KOKRS' FIELD p_zakla.
    CONCATENATE p_ddate6(2) '.' p_ddate4(2) '.' p_ddate(4) INTO ddatum.
    CONCATENATE p_kdate6(2) '.' p_kdate4(2) '.' p_kdate(4) INTO kdatum.
    error = '0'.
    PERFORM wczytaj_dane.
    IF error = '0'.
      PERFORM utworz_sesje.
      PERFORM wprowadz_dane.
        PERFORM zamknij_sesje.   "comment by prav
    ENDIF.
    PERFORM zamknij_sesje.        "add by prav
    IF error = '1'.
      WRITE: msg, /.
    ENDIF.
    WRITE: 'Wykonano', /.
    *&      Form  wczytaj_dane
          text
    FORM wczytaj_dane.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_fname
          i_begin_col             = 1
          i_begin_row             = 1
          i_end_col               = 8
          i_end_row               = 65000
        TABLES
          intern                  = it_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE: / 'B³ad importu pliku wejsciowego: ', p_fname, ' - ',
        sy-subrc.
      ELSE.
        SORT it_excel BY row col.
        LOOP AT it_excel INTO wa_excel.
          IF wa_excel-row = 1.
            CONTINUE.
          ENDIF.
          iv_pole = wa_excel-value.
          CASE wa_excel-col.
            WHEN 1. wa_data-indic = iv_pole.
            WHEN 2.
              REPLACE ',' WITH '.' INTO iv_pole.
              wa_data-quant = iv_pole.
            WHEN 3. wa_data-mpk = iv_pole.
            WHEN 4. wa_data-order = iv_pole.
            WHEN 5. wa_data-text = iv_pole.
          ENDCASE.
          AT END OF row.
            IF wa_data-mpk IS INITIAL AND wa_data-order IS INITIAL.
              error = '1'.
              WRITE:
    'Musi byæ podane Stanowisko kosztów lub Zlecenie wewnêtrzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-mpk IS NOT INITIAL AND wa_data-order IS NOT INITIAL.
              error = '1'.
              WRITE:
    'Musi byæ podane Stanowisko kosztów lub Zlecenie wewnêtrzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-indic IS INITIAL.
              error = '1'.
              WRITE: 'Brak identyfikatora wskaŸnika. Rekord: ', wa_excel-row
              EXIT.
            ENDIF.
            IF wa_data-quant IS INITIAL.
              error = '1'.
              WRITE: 'Brak informacji o iloœci. Rekord: ', wa_excel-row, /.
              EXIT.
            ENDIF.
            APPEND wa_data TO it_data.
            CLEAR wa_data.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "wczytaj_dane
    *&      Form  wprowadz_dane
          text
    FORM wprowadz_dane.
      DATA:licznik TYPE i,
        l_txt TYPE string,
        pole(30) TYPE c,
        liczba(15) TYPE c.
      PERFORM bdc_dynpro      USING 'SAPLSPO4' '0300'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'SVALD-VALUE(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '=FURT'.
      PERFORM bdc_field       USING 'SVALD-VALUE(01)' p_zakla.
      PERFORM bdc_dynpro      USING 'SAPLK23F1' '1200'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field       USING 'COHEADER-SEND_REC_REL' '03SAP'.
      PERFORM bdc_field       USING 'RK23F-STATUS' 'L'.
      PERFORM bdc_field       USING 'COHEADER-BLDAT' ddatum.
      PERFORM bdc_field       USING 'COHEADER-BUDAT' kdatum.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'EKOSTL(1)'.
      licznik = 0.
      LOOP AT it_data into wa_data.
        ADD 1 TO licznik.
        l_txt = licznik.
        CONCATENATE 'EL4(' l_txt ')' INTO pole.
        condense pole no-gaps.
        PERFORM bdc_field USING pole wa_data-indic.
        CONCATENATE 'ELR1(' l_txt ')' INTO pole.
           condense pole no-gaps.
          liczba = wa_data-quant.
          if liczba <  0.
              shift liczba circular  left up to '-'.
          endif.
            condense liczba no-gaps.
        PERFORM bdc_field USING pole liczba.
        IF NOT wa_data-mpk IS INITIAL.
          CONCATENATE 'EL2(' l_txt ')' INTO pole.
             condense pole no-gaps.
          PERFORM bdc_field USING pole wa_data-mpk.
        ENDIF.
        IF NOT wa_data-order IS INITIAL.
          CONCATENATE 'EL3(' l_txt ')' INTO pole.
             condense pole no-gaps.
          PERFORM bdc_field USING pole wa_data-order.
        ENDIF.
        CONCATENATE 'EL8(' l_txt ')' INTO pole.
           condense pole no-gaps.
        PERFORM bdc_field USING pole wa_data-text.
      ENDLOOP.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          tcode            = 'KB31N'
        TABLES
          dynprotab        = bdctab
        EXCEPTIONS
          internal_error   = 1
          not_open         = 2
          queue_error      = 3
          tcode_invalid    = 4
          printing_invalid = 5
          posting_invalid  = 6
          OTHERS           = 7.
      IF sy-subrc <> 0.
        WRITE: / text-010 .
      ENDIF.
      REFRESH bdctab.
    clear:bdctab.        "by praveen
    ENDFORM.                    "wprowadz_dane
    *&      Form  bdc_dynpro
          text
         -->PROGRAM    text
         -->DYNPRO     text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdctab.
      MOVE:
        program   TO bdctab-program,
        dynpro    TO bdctab-dynpro,
        'X'       TO bdctab-dynbegin.
      APPEND bdctab.
    ENDFORM.                    "bdc_dynpro
    *&      Form  bdc_field
          text
         -->POLE       text
         -->WARTOSC    text
    FORM bdc_field USING pole wartosc.
      CLEAR bdctab.
      MOVE:
        pole     TO bdctab-fnam,
        wartosc  TO bdctab-fval.
      APPEND bdctab.
    ENDFORM.                    "bdc_field
    *&      Form  utworz_sesje
          text
    FORM utworz_sesje.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = 'WSKASTAT'
          user   = sy-uname
          keep   = 'X'.
    ENDFORM.                    "utworz_sesje
    *&      Form  zamknij_sesje
          text
    FORM zamknij_sesje.
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
      IF sy-subrc NE 0.
        WRITE: /, 'B³ad podczas zamykania sesji'.
        EXIT.
      ENDIF.
    ENDFORM.                    "zamknij_sesje

  • Trigger for every 1000 record insert

    Hi
    I am working in oracle 9i / Aix 5.3
    I need a trigger which should fire whenever my temp_table growing 1000,2000...etc.,
    The records should reach me in the body of email.
    Like
    Hi
    The temp_table count has been reached to 1000.
    Thanks
    second time execution...
    Hi
    The temp_table count has been reached to 2000.
    Thanks
    etc.,
    How can i achieve this? I'm ok to shell script also for the above functionality
    Thanks
    Raj

    Why do you want to do this?
    SQL> create table temp_table (x number);
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function temp_table_cnt return number is
      2    pragma autonomous_transaction;
      3    v_cnt number;
      4  begin
      5    select count(*) into v_cnt from temp_table;
      6    return v_cnt;
      7* end;
    SQL> /
    Function created.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace trigger trg_a_temp_table
      2  after insert on temp_table
      3  for each row
      4  declare
      5    v_cnt number;
      6  begin
      7    v_cnt := temp_table_cnt();
      8    if mod(v_cnt,1000) = 0 then
      9      dbms_output.put_line('Email Sent for '||v_cnt||' records.');
    10    end if;
    11* end;
    SQL> /
    Trigger created.
    SQL> set serverout on
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2    for i in 1..3456
      3    loop
      4      insert into temp_table values (i);
      5      commit;
      6    end loop;
      7* end;
    SQL> /
    Email Sent for 0 records.
    Email Sent for 1000 records.
    Email Sent for 2000 records.
    Email Sent for 3000 records.
    PL/SQL procedure successfully completed.
    SQL>... however I wouldn't consider this good design, as it requires each of the rows to be committed so that the autonomous transaction procedure can count the number of rows on the table. Of course, if the rows are being inserted through, let's say, user input and are committed on a 1 by 1 basis anyway, then it's perfectly acceptable, but I wouldn't use it for bulk insertions.

Maybe you are looking for

  • Composite foreign key issue

    Hi, I am trying to create a composite foriegn key. I have created my primary key as a composite key, made up of three fields. Table 1 PatientID - Made from 3 fields(a,b,c)(primry key) Table B PatiendID- (should be the foreign key which references tab

  • JSF 1.2 with tiles

    Hi I am using JSF with tiles and am having issues with page navigation with using tiles. Can any body tell me what to write in faces-config.xml so that the required page opens in tile which i have defined for that page in the corresponding tiles-defs

  • Changed o.s. now i have no sound

    i have a HP Pavilion a1110y desktop i changed from XP to a newer version of XP and now i have no sound i need audio drivers but cant find them please help

  • Configuration information

    Hi, We are going to use AT-MIO-16E-10 and PCI-DIO-32SH in RTX subsystem, a real-time extention for Windows NT. I need detail information about the port addresses for all analog and digital I/O for development of device drivers in RTX. Does anyone kno

  • Missing clock app icon

    My clock icon dissapeared, how do I get it back? Solved! Go to Solution.