How to find count of records based on batch wise.

Hi All,
We are working on OWB10gr2. I would like share one requirement. Any one can suggest me how to do it and which is the best way to get accurate information.
We have 2 schemas’ like nia_src and nia_tgt. currently we are moving data from nia_src to nia_tgt for that reason we implemented some mappings based on requirement. In my source schema (nia_src) having 100 tables with data and similar structure replicated in target schema (nia_tgt).
In source schema every table having one date field for which record is inserted and based on that field we can find how may records are inserted on particular table ,particular time.
Same like target also maintaining date fields for tracking purposes.
We have done some mappings and scheduled also. Every day we are into the target with incremental data. All are working fine not any issues.
I wanted to know how many records inserted, updated, merged for particular batch
How can we find?
Can we find exact information in OWB_REP_OWNER schema on WB_RT_AUDIT?.
For tracking purposes I need to find those values how many records are available in
Source table and how many records are populated to the target schema?
How to find schedule batch count of records table wise for batch wise?
Please suggest me any one on this.
thanks and regards,
venkat.

RE: based on pre operator can we find count of records. if yes how to do it.
No, you cannot tell from the pre- operator how many records will be inserted or updated into a mapping. How could you? The mapping hasn't run yet!
At best (if you have simple mappings with single targets) you could come up with a strategy to have the pre-mapping procedure aware of it's package name, then select from user_source for that package body until you find that first cursor used for the row-based processing, copy the cursor into a local variable, and then execute immediate select count(*) from that cursor definition. But still, all that would get you is the number of rows selected - not inserted / updated / errored etc.
A post-mapping procedure that is aware of the package name will, however, run prior to package exit so that the package spec is still in memory so you can access the public variables in the package spec. We do that in our standard post-mapping procedure
CREATE OR REPLACE procedure erscntrl_finalize_prc(
                       p_process_id     in  number,
                       p_process_name   in  varchar2)
as
      l_numread      number         := 0;
      l_numInserted  number         := 0;
      l_numUpdated   number         := 0;
      l_numMerged    number         := 0;
      l_owb_audit_id number         := 0;
      l_owb_status   number         := 0;
      sqlStmt        varchar2(2000) :=
                           'begin '||
                           '  :1 := '||p_process_name||'.get_selected; '||
                           '  :2 := '||p_process_name||'.get_inserted; '||
                           '  :3 := '||p_process_name||'.get_updated; '||
                           '  :4 := '||p_process_name||'.get_merged; '||
                           '  :5 := '||p_process_name||'.get_audit_id; '||
                           '  :6 := '||p_process_name||'.get_status; '||
                           ' end;';
begin
      -- we use dynamic SQL to return required audit field values.
      --  This allows us to alter which values we need at a later date
      --  without impacting the deployed mappings.
    execute immediate sqlStmt
    using   out l_numread,   out l_numInserted,  out l_numUpdated,
            out l_numMerged, out l_owb_audit_id, out l_owb_status;
  -- then execute our own logging package.
   owb_mapping_log_pkg.finalize(
                       p_process_id,
                       p_process_name,
                       l_numread,
                       l_numInserted,
                       l_numUpdated,
                       l_numMerged,
                       l_owb_audit_id,
                       l_owb_status
end;
/However, even in this case bear in mind that if you run the mapping in set-base mode, all Oracle returns is the number merged which does not give values for the inserted and updated counts. If you really need those values you need to either a) run in row-based mode or row-based-target-only, or come up with some custom queries. For example, in your pre-mapping do a select count(*) from your_target_table, then run the mapping, then get the number merged, then do another select count(*) from your_target_table. With these values and basic math you could tell the number inserted by the growth in the table, and the rest of the number merged must have been updates.
That being said, if you are playing with dimensions as large as most of the ones I am - there is no bloody way that you want to do two select count(*) statements on each run without a really, really good reason.....
Cheers,
Mike

Similar Messages

  • How to find the particular record in 1000's of workflow jobs are running

    Hi,
    In a data manager -> in workflow tab>IF a record is in CHECK-OUT MODE there are 1000's of jobs are running in that workflow tab. Can anyone tell me how to find that particular record in that workflow jobs.
    Can anyone show me the difference in getting a record in 5.5 and 7.1

    Hello COTI
    Unfortunatly, SAP MDM doesn't have good ability for  WF search.
    All WF clarify by it's status (unlaunched, avialable, Received, complited, error  etc.)
    For each WF SAP MDM assing unique Job ID and this id will be shown in Job ID field in Data Manager WF Tab.
    You can change WF list order by all WF fields like as Job ID, Step, User, Start etc. and try to find your's WF.
    You can use Java API - this is one of the best solution for WF management and WF mass upload  (for example)
    Regards
    Kanstantsin Chernichenka

  • How to find last inserted record in the table.

    Version: Oracle 10g
    I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
    How to find last inserted record in the table "Manufacture".
    As i come to know that Rowid is not result perfect results. Please provide your inputs.

    user13416294 wrote:
    Version: Oracle 10gThat is not a version. That is a product name. A version is 10.1.0.2 or 10.2.0.4, etc.
    I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
    How to find last inserted record in the table "Manufacture".Not possible as your data model does not cater for it. That simple.
    If there is a need to determine some order or associate some time to an entity, then that should be part of the data model - and a relationship, or one or more attributes are needed to represent that information. Thus your data model in this case is unable to meet your requirements.
    If the requirements are valid, fix the data model. In other words - your question has nothing to do with Oracle and nothing to do with rowid, rowscn or other pseudo columns in Oracle. It is a pure data modeling issue. Nothing more.

  • How to find name of partner based on partner number

    Hello All,
    Can any one help me how to find name of partner based on partner number.
    Regards,
    Lisa

    SELECT kunnr name1 erdat
              FROM kna1
              INTO TABLE i_kna1
              WHERE erdat IN s_date.
      SELECT kunnr kunn2 knref vkorg vtweg spart
                    FROM knvp
                    INTO TABLE i_knvp
                    FOR ALL ENTRIES IN i_kna1
                    WHERE kunnr = i_kna1-kunnr AND
                    vkorg IN s_vkorg AND
                    vtweg IN s_vtweg AND
                    spart IN s_spart AND
                    parvw = 'ZR'.
      LOOP AT i_kna1.
        READ TABLE i_knvp WITH KEY kunnr = i_kna1-kunnr.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING i_kna1 TO i_cust2.
          MOVE-CORRESPONDING i_knvp TO i_cust2.
          APPENd i_cust2.
       endif.
      ENDLOOP.
    *SELECT kunnr name1
              FROM kna1
              INTO TABLE i_kna1.
      loop at i_cust2.
        read table i_kna1 with key kunnr = i_cust2-kunn2.
         IF sy-subrc = 0.
           i_cust2-name2 = i_kna1-name1.
        modify i_cust2.
      endif.
    endloop.*
    icust2 will have partner number ,....partner name is in KNA1,..
    so look in tat ..by above code.._ if this is wat u r luking for

  • How to find the Org.key based on Job key and Org Unit.

    Hi,
      Please Let me know how to find the Org.Key based on the Job Key and org Unit.
    Regards
    nagendra.

    On recent ThinkPad, the Product ID Key sticker has been moved from the bottom of the unit to behind the battery.
    You need to contact Lenovo technical support directly to ask about recovery media.

  • How to Find out the all  tables in module wise ?

    Dear Friends,
    1.How to Find out the all  tables in module wise ?
       what are the total number of table in SAP ?
    2. how to find out all existing functions in SAP ?
    Thanks and regards,
    Subasha Chandra Sahoo.

    Hi,
    You will get the module wise list from:
    http://www.sourceveda.com/SAPReference.htm
    http://www.sourceveda.com/
    Regards...

  • How to get count of records for each type from internal table

    Hi Guys,
    I want to implement a logic to find out the count of records in a internal table.
    Assume my internal table have one field having the entries as shown below.
    Internal table Entries
    10
    10
    10
    11
    11
    12
    12
    12
    12
    13
    14
    14
    15
    15
    15
    15
    15
    16
    16
    17
    18
    19
    20
    20
    20
    ....... etc....
    I should get an output as below
    10's - 3
    11's -2 ,
    12's - 4.... etc..
    Could any one help me how to do this.
    Thanx,
    Kumar

    REPORT  zzz.
    DATA: i(100),
          t(100),
          j TYPE n.
    TYPES: BEGIN OF gt_int_type,
            linex(100) TYPE c,
           END OF gt_int_type.
    DATA: gt_int TYPE STANDARD TABLE OF gt_int_type,
          wa_int LIKE LINE OF gt_int.
    START-OF-SELECTION.
      wa_int-linex = '10'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '10'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '10'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '11'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '11'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '12'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '12'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '12'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '12'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '13'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '14'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '14'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '15'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '15'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '15'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '15'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '15'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '16'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '16'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '17'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '18'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '19'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '20'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '20'.
      APPEND wa_int TO gt_int.
      wa_int-linex = '20'.
      APPEND wa_int TO gt_int.
      LOOP AT gt_int INTO wa_int.
        WRITE:/ wa_int-linex.
      ENDLOOP.
      ULINE.
      SKIP 3.
      SORT gt_int BY linex.
      READ TABLE gt_int INDEX 1 INTO i.
      j = 0.
      LOOP AT gt_int INTO wa_int.
        IF wa_int-linex EQ i.
          j = j + 1.
        ELSE.
          WRITE:/ i,'''s = ', j.
          j = 1.
          i = wa_int-linex.
        ENDIF.
      ENDLOOP.
      WRITE:/ i,'''s = ', j.
    consider clearing leading/trainling spaces...

  • HOW TO FIND LAST DOCUMENT DATE BASED ON MATERIAL NUMBER

    Hi,
           I want to know how to find the last document details based on material number.
    Is there any Functional modulle or BAPI programe?
    i,e, I want know last goods receipt details (MIGO)  based on material number.
    Can u please anybody tell me.
    Thanks,
    S.Muthu.
    Edited by: Subramaniyan Marimuthu on Jan 2, 2008 9:07 AM

    Hello.
    Check the BAPI_GOODSMVT_GETITEMS
    -example--
    Get GRs after a specific date for a specific plant/ storage location and movement types
      wa_budats-sign = 'I'.
      wa_budats-option = 'GE'.
      wa_budats-low = '20071201'.
      APPEND wa_budats TO budats.
      wa_plants-sign = 'I'.
      wa_plants-option = 'EQ'.
      wa_plants-low = '1000'.
      APPEND wa_plants TO plants.
      wa_stlocs-sign = 'I'.
      wa_stlocs-option = 'EQ'.
      wa_stlocs-low = '0001'.
      APPEND wa_stlocs TO stlocs.
      wa_mvts-sign = 'I'.
      wa_mvts-option = 'EQ'.
      wa_mvts-low = '101'.
      APPEND wa_mvts TO mvts.
      wa_mvts-low = '901'.
      APPEND wa_mvts TO mvts.
      wa_mvts-low = '123'.
      APPEND wa_mvts TO mvts.
      CALL FUNCTION 'BAPI_GOODSMVT_GETITEMS'
        TABLES
          plant_ra        = plants
          stge_loc_ra     = stlocs
          move_type_ra    = mvts
          pstng_date_ra   = budats
          goodsmvt_header = header
          goodsmvt_items  = item
          return          = return.
    Reward if helpful.
    Cheers,
    George

  • How to find the last records of the table in adventure work db

    hi all,
    i want to find out " how to receive a last records of the table (eg:  person.emailaddress ) in sql 2008 and 2005"
    Thanks

    If you are looking for the latest record( the one which got inserted/modified last) then use this query
    select top 1 * from person.emailaddress
    Order by ModifiedDate desc
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • How to find SOLMAN CR number based on Trnsport request number

    I want to find CR Number in SOLMAN of a changed query.
    I found the user  who changed the query Request number of changed query.
    How can I find the CR number based on this Information.
    Please help.
    Thanks.

    you can goto SOLAR_PROJECT_ADMINISTRATION / System Landscape / CR  / Task list
    regards
    Nesimi

  • How to find the longest record in a table?

    Hello,
    Is there a function to find the longest record in a table? Or is there a data dictionary that would tell you which record contains the longest data?
    I have a table with five columns and one million records. I want to find the record (5 columns combined) with the longest data. Thank you.

    Dear watson2000!
    The function "VSIZE" tells you the number of bytes in the internal representation of a column which means the size of a value within a column. An example of vsize can be found here:
    [http://www.adp-gmbh.ch/ora/sql/vsize.html]
    So I think you should try it with this query to get the size of the longest record:
    SELECT MAX(VSIZE(column1)) +
           MAX(VSIZE(column2))  +
           MAX(VSIZE(column3))  +
           MAX(VSIZE(column4))  +
           MAX(VSIZE(column5)) AS "Maximum Row"
    FROM your_table;To identify the longest record try like this:
    SELECT rowid
    FROM   your_table
    GROUP BY rowid
    HAVING  (MAX(VSIZE(column1)) +
             MAX(VSIZE(column2)) +
             MAX(VSIZE(column3)) +
             MAX(VSIZE(column4)) +
             MAX(VSIZE(column5))) = (SELECT MAX(VSIZE(column1)) +
                                          MAX(VSIZE(column2))  +
                                          MAX(VSIZE(column3))  +
                                          MAX(VSIZE(column4))  +
                                          MAX(VSIZE(column5))
                                   FROM your_table;)I hope that these two queries could be of help to you.
    yours sincerely
    Florian W.
    Edited by: Florian W. on 23.04.2009 20:53

  • How to find if certain record exists from stored procedure

    Hello
    I am not an expert in this and am trying simple thing. I want to find if certain record exists in a table and if so set some boolean variable.
    create or replace procedure findit(param)
    AS
    return_group boolean;
    BEGIN
      myflag := false;
    --here goes my question
    -- say I have SELECT WHATEVER FROM TABLE WHERE BLA = param
    --if it returns at least one record set myflag to true;
    END;Any idea?

    THanks Satyaki_De,
    However, when I put simple SELECT statement in the body of my procedure it does not compile. Actually I should have said that before. So here is my code and where it breaks:
    create or replace procedure close_subjects(study_id varchar2)
    AS
    return_group boolean;
    BEGIN
    dbms_output.enable(1000000);
    FOR current_group IN(
       SELECT DISTINCT group_id from groups WHERE study_id=study_id
    ) LOOP
       FOR current_subject IN(
          SELECT individual_id from groups WHERE group_id=current_group.group_id AND study_id=study_id
       ) LOOP
          return_group := true;
          SELECT INDIVIDUAL_ID FROM ASSIGN WHERE DATE_TIME_ASSIGNED = ( SELECT MAX(DATE_TIME_ASSIGNED) FROM ASSIGN WHERE INDIVIDUAL_ID = current_subject.individual_id ) AND                            ASSIGN_STATUS_ID = 'A';
         IF SQL%RowCount = 0 THEN
           return_group := false;
             dbms_output.put_line(current_subject.individual_id);
          END IF;
       END LOOP;
    END LOOP;
    END;
    /If I comment out SELECT statement and leave dbms_output for testing purposes it works well. As I said I am faaaar from expert and seems to me that I cannot have SELECT in procedure BODY?

  • How to find the unmatched records between the two tables?

    We have to tables in SQL Server database.
    But unable to find the unmatched record betwwen these two tables.
    There 12 records are unmatched. But unable to get those records.
    I am using the below sql:
    select c1,c2,c3,c4,c5,c6 from Table1
    except select c1,c2,c3,c4,c5,c6 from Table2
    Please help. Thanks in advance.

    Hi knra,
    Please try the following codes:
    select c1,c2,c3,c4,c5,c6 from Table1 t1
    where not exists
    (select * from Table2 t2
    where t1.c1= t2.c1
    and t1.c2= t2.c2
    and t1.c3= t2.c3
    and t1.c4= t2.c4
    and t1.c5= t2.c5
    and t1.c6= t2.c6)
    Best Regards,
    Allen Li
    Allen Li
    TechNet Community Support
    This is what I would've said, but it would make life much easier for you if you have a reference or ID for each entry, this is why we use keys.

  • How to find Count for last updated records

    Dear All,
    My database is Oracle 9i
    I am having 2 Tables 1) A_em_de
    2) B_ep_dt
    in A_em_de table 10 records is there
    I am inserted records from B_ep_dt table
    now what the problem is to find the count of last updated/insert rows from A_em_de table
    please help me
    Regards,
    Ravi.

    SQL> create table t
      2  as
      3  select rownum id
      4    from all_objects
      5   where rownum <= 10
      6  /
    Table created.
    SQL> create table b
      2  (id number)
      3  /
    Table created.
    SQL> begin
      2  insert into b
      3  select *
      4    from t;
    5 dbms_output.put_line (sql%rowcount);
      6  end;
      7  /
    10
    PL/SQL procedure successfully completed.

  • How to find all condition records

    HI,
      How can I find all the condition records for a combination of sales organization, distribution channel and matnr.
      In a condition table we can find only current valid condition record. I want to display all the valid condition records for this combination. I find one field in KONH table with VAKEY where we can give these values. Is it correct process?
       What is difference between condition header and item levels? ie. whether one condition number can have different materials prices as items? if so the above logic wont work. So can you please clarify.
    Thanks in advance.
    with many regards,
    Vamsi

    Ya now I have understood what you are talking about.
    The fields in the header level and first field in the item level usually is formed based on the access sequence you select. Eg) If you choose PR00 with access sequence Sales Org / Dist Chnl / Material you would find the Sales Org and Dist Chnl as part of the header level and the material at the item level.
    The significance of the item level is that you can maintain different records for the header level data entered, however the item level field has to change. In our example if you need to maintain the price of 10 products for the same Sales Org and Dist Chnl you can do so by entering one after the other.So your header level would contain the Sales Orgn say 0001, Dist Chnl 01 while you can maintain the value for M1, M2....M10 in the same screen.
    If you enter a record where the combination of the header field and first field in the item level already exist in the same screen the system would then give you an error message "The condition is being processed in the current session" and would remove the second record. You can try this out my entering the material M1 twice in the same screen of VK11.
    Hope it helped you. Do let me know if you have any doubt.
    Regards
    NP

Maybe you are looking for

  • Repeating Header and Footer on each page in Sub-Report

    Post Author: Jimbob CA Forum: General I am formatting a report that has subreports.  I can get the header on every page, but the footer only appears on the last page.  How do I get a header and footer to print on each page of the subreport? Thanks fo

  • 0 photos in photo stream

    i have six photo streams from family members in family and friends streams however they all show 0 photos, can't figure out what i am doing wrong.  I have the photos on my iPhone but want them on my mac so i can do some other things with them

  • Locking middle or last column in a datagrid

    Does anyone know how to lock say the middle or last column in a datagrid. What i really need is for the first and fifth column to be locked in a datagrid or Advanced datagrid. Is this possible or do i need to put two datagrids next to each other and

  • How can you fix the too many http redirects on the App Store

    Each time I use my App Store and click on top 25 or categories it says too many http redirects and I need help fixing this problem. This problem has been occurring for about 1-2 weeks

  • TS1591 Itunes or ipod Classic Malfunction?

    My problem started yesterday, and I'll try to sum it up in a list for anyone who may have advice: 1. I connected my iPod to my MacBook Pro yesterday, and when iTunes opened it said there was any issue with the iPod and it needed to be restored. 2. In