How to select data from all HR Master Tables(PA0000 to PA****)

Hi Gurus!
My requirement is to pick the changedon(AEDTM) , changedby(UNAME) and reason for change(PREAS)  from all tables (pa0000 to pa****)of HR  in which he made any change during a specific date.
Now if it is specific for two or three tables then inner join can solve it. but now it is the matter of picking data from maximum 9999 tables for which inner join will not be accurate.
plz suggest me any appropriate way to solve it out. or there is any table which store  the changes in All HR Master Tables.
Thanking in Advance.
Tahir Naqqash

Hi,
it is very tidious to get it in one go, as u know hr tables contains huge data.
You can chack my wiki in https://wiki.sdn.sap.com/wiki/x/XYC0Aw .
Here you need to make the following modification.
1. in the selection screen set on date range with select option.
2. in the select query, change select * by ur specified fields.
3. change dynamic internal table and ALV as per ur required fields
In this way you have to put the table name and the date range and will get the data.
for repeation u can call the same job in background again and again store data in a seperate internal table and display finaly ..... but huge chance of getting 'Time Out ' error in that case for comparetively large day gap.
Regards,
Anirban

Similar Messages

  • How to select data from a PL/SQL table

    Hi,
    I am selecting data from database after doing some screening i want to store it in a PL/SQL table (temporary area) and pass it to oracle reports.
    Is there any way to select the data from a PL/SQL table as a cursor. Or is there any other way of holding the temporary data and then pass it back as a cursor.
    Regards
    Kamal

    A PL/SQL "table" is anything but a table. Whoever came up with this term in PL/SQL to describe what is known as dynamic arrays (the correct programming terminology that existed since the 70's if not earlier and what is used in all other programming languages I'm familiar with)... well, several descriptions come to mind and none of them are complimentary.
    You cannot "select" from a PL/SQL dynamic array as it is not a table within the Oracle context of tables.
    Thus you need to convert (cast) a PL/SQL dynamic array into a temporary Oracle data set/table in order to select from it. This is in general a Bad Idea (tm). Oracle tables and SQL and concurrency controls and all that are especially designed for processing data. PL/SQL arrays is a very simplistic data structure with very limited usage. Why would you want to use that in SQL via a SELECT statement when you can use Oracle tables (or proper temp tables) instead? Besides that, it is also slow to cast a dynamic PL/SQL array into an Oracle SQL data set structure (context switching, copying of memory, etc).
    The proper way to use PL/SQL to generate data sets for use via the SQL engine is pipelined table functions.
    This is not to say that you should never use PL/SQL arrays and casting in SQL.. simply that you need to make sure that this is the correct and scalable way to do it. And that will also always be an exception to the rule when you do.

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • How to select data from a table by passing document number from another tab

    How to select data from a table by passing document number from another table.
    for eg:-
    I want to display name, adres, region from ADRC table
    by using field delivery document number
    Kind Regards,
    Shanbagavalli.S

    Hi Shanbagavalli,
    There are multiple solutions to this questions a few i will try to answer and then you can take the best required for your requirements.
    **Consider that you have a Internal table having document number from other table..
    SELECT NAME ADRES REGION FROM ADRC
           INTO IT_ADRC
           FOR ALL ENTRIES IN IT_DOC
           WHERE DOCUMENT_NO = IT_DOC-DOCUMENT_NO.
    **Consider that you have 1 document number then
    SELECT NAME ADRES REGION FROM ADRC
         INTO IT_ADRC
         WHERE DOCUMENT_NO = W_DOCUMENT_NO.
    Hope this solves your problem.
    Regards,
    Kunjal

  • Select data from all the table names in the view

    Hi,
    "I have some tables with names T_SRI_MMYYYY in my database.
    I created a view ,Say "Summary_View" for all the table names
    with "T_SRI_%".
    Now i want to select data from all the tables in the view
    Summary_View.
    How can i do that ? Please throw some light on the same?
    Thanks and Regards
    Srinivas Chebolu

    Srinivas,
    There are a couple of things that I am unsure of here.
    Firstly, does your view definition say something like ...
    Select ...
    From "T_SRI_%"
    If so, it is not valid. Oracle won't allow this.
    The second thing is that your naming convention for the
    tables suggests to me that each table is the same except
    that they store data for different time periods. This would be
    a very bad design methodology. You should have a single
    table with an extra column to state what period is referred to,
    although you can partition it into segments for each period if
    appropriate.
    Apologies if i am misinterpreting your question, but perhaps
    you could post your view definition and table definitions
    here.

  • How to select data from cluster table

    hi experts,
                   I have a report which picks data from bseg (cluster table ) for a month report it is taking around 4 minutes to process.I feel it is not good when take the report after some months.
    how to select data from these table???how to declare itab for these cluster tables????can we include any search condition or any other kind of internal table???
    please advice.
    mani

    Hi Manikandan,
    The following code may be helpful to understand how to select the data from cluster table.
    Types: Begin of ty_kna1,
    Kunnr type kna1-kunnr,
    adrnr type kna1-adrnr,
    end of ty_kna1,
    begin of ty_bseg,
    belnr type bseg-belnr,
    kunnr type bseg-kunnr,
    end of ty_bseg,
    begin of ty_final,
    belnr type bseg-belnr,
    kunnr type kna1-kunnr,
    adrnr type kna1-adrnr,
    end of ty_final.
    Data: it_kna1 type table of ty_kna1,
    wa_kna1 type ty_kna1,
    it_bseg type table of ty_bseg,
    wa_bseg type ty_bseg,
    it_final type table of ty_final,
    wa_final type ty_final.
    Select kunnr adrnr from kna1 into table it_kna1 where....
    if sy-subrc = 0.
    select belnr kunnr into table it_bseg for all entries in it_kna1 where kunnr = it_kna1-kunnr.
    endif.
    sort it_kna1 by kunnr.
    Loop at it_bseg into wa_bseg.
    move wa_bseg-belnr to wa_final-belnr.
    read table it_kna1 into wa_kna1 with kunnr = wa_bseg-kunnr binary search.
    if sy-subrc = 0.
    move: wa_kna1-kunnr to wa_final-kunnr,
    wa_kna1-belnr to wa_final-belnr.
    endif.
    append wa_final to it_final.
    clear wa_final.
    endloop.
    Loop at it_final into wa_final.
    write: / wa_final-belnr, wa_final-kunnr, wa_final-adrnr.
    endloop.
    Reward if useful.
    Thankyou,
    Regards.

  • How to select data from Maintance View in Program

    Dear All ,
    How to select data from Maintance View V_T052 in abap Program.
    Regards,
    Archana

    TABLES: t179, t179t.
    DATA: v_t179_int TYPE TABLE OF v_t179.
    SELECT * FROM t179
      JOIN t179t ON
        t179prodh = t179tprodh
      INTO CORRESPONDING FIELDS OF TABLE v_t179_int.
    Reward points...

  • How to select data from structure

    how to select data from structure

    Hi Laxman,
    Structure holds single record of data. You can acess data by using the syntax <b>Structure-field</b>
    Please see sample.
    data: wa_mara  type mara.
    select *
              from  mara
              into wa_mara
              up to 1 rows.
    endselect.
    write:/ wa_mara-mandt,
             wa_mara-matnr,
             wa_mara-maktl.
    if helps plz reward points.
    Regards
    Bhupal Reddy

  • How to Pull data from sap r/3 tables to oracle tables

    how to fetch data from sap r/3 tables & data pulled to oracle table .
    GIVE THE APPROPRITE ANSWER FOR THIS.
    THANKS IN ADVANCE.
    If it is useful for me , i am giving point.
    regards ,
    Navita
    Edited by: NAVITA YADAV on Mar 7, 2008 2:07 PM
    Edited by: NAVITA YADAV on Mar 7, 2008 2:08 PM

    You need to perform some native SQL to fetch data. Before doing this connection must be exists b/w your R/3 and Oracle server.
    Basis team will help you to have connection.
    Check the connection name in the table DBCON.
    Check the below code to handle native SQL.
      SELECT SINGLE  DBMS
               FROM  DBCON
               INTO  DBTYPE
               WHERE CON_NAME = DBS.
      IF DBTYPE = 'ORA'.
        TRY.
          EXEC SQL.
            CONNECT TO :dbs
          ENDEXEC.
    ERROR Handling for Native SQL *************
          IF SY-SUBRC <> 0.
            MESSAGE `Docusphere connection failed.` TYPE 'I'.
            EXIT.
          ENDIF.
      EXEC SQL PERFORMING loop_output.
        OPEN C1 FOR
        SELECT  UK1, UK7, uk6, uk9, uk22, uk23, uk25    "field names of Oracle table
        FROM IIS_DOCS_AP10D
        WHERE ( UK2 = 'ZFIINVOICE' OR UK2 = 'ZFIPAYREQ' )    AND
        UK19 = 'E'                                           AND
        UK20 IS NULL
      ENDEXEC.
          DO.
            CLEAR W_OUTPUT.
            EXEC SQL.
              FETCH NEXT C1 into :wa1-arc_doc_id, :wa1-bukrs, :wa1-belnr, :wa1-gjahr, :wa1-wi_id, :wa1-ARCH_METHOD, :wa1-barcd.
            ENDEXEC.
    enddo.
    Reward points if helpful.................

  • JDBC-XI-FILE scenario. How to extract data from more than one table in JDBC

    Hi,
    I was asked a question like in JDBC-XI-FILE scenario........ How to extract data from more than one tables (i.e from JDBC system) ?? What is the logic to do the same ??
    I am not sure whether this is a valid question..........but any help in this regards is highly appreciated.
    Regards
    Kumar

    HI,
    Yes it can be possible ,please see the following links
    JDBC  Receiver with Oracle Stored Procedures
    configuring jdbc adapter with multiple tables
    RFC -> XI -> JDBC Scenario Updating Multiple Tables
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    JDBC Adapter multiple Selects
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=jdbc%20with%20multiple%20tables&cat=sdn_all
    Regards
    Chilla..

  • How to insert data from JTable to mysql Table....

    hello everybody
    i need help about how to insert data from JTable to mysql table... i know about how to create Table model...facing problem about how to insert data from JTable to mysql table....any helping link or code ... ill be thankfulll....for giving me solution...

    table1.getValueAt(table1.getSelectedRow(),0)you are getting the value of a selected row... or if you want you can just use a loop..
    for(.....){
    table1.getValueAt(x,y);
    }I think you know INSERT STATEMENT.. here on it just string concat
    sample e.g. (This not insert)
    "delete from accrule " +
                    "where ruleid= " + tblRA.getValueAt(tblRA.getSelectedRow(),0)+
                    " and accountname='"+tblRA.getValueAt(tblRA.getSelectedRow(),1)+"'"

  • How to select data from one nested table and into another nested table

    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    Thanks,
    in advance

    >
    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    >
    Not unless you provide the code you are actually using.
    There is no definition of 'p_code_result' in your post and you say you 'trying to select data from d_table' but there is no code that loads 'd_table' in what you posted.
    And the SELECT query you posted actuall selects from an object named 'l_loop_idag_code_table1' which isn't mentioned in your code.
    Post the actual code you are using and all of the structures being used.
    Also explain why you even need to use nested tables and PL/SQL for whatever it is you are really doing.

  • How to import data from all excel worksheet ?

    hi
    I want to import data from excel worksheet. There is a fm ALSM_EXCEL_TO_INTERNAL_TABLE but it read data only from "actual" sheet. How can I   
    read data from all exel spread sheets ?
    krzys

    Hi,
    check this code, this is gathered from one of the thread.
    report zole123.
    INCLUDE ole2incl.
    DATA:  count TYPE i,
           application TYPE ole2_object,
           workbook TYPE ole2_object,
           excel     TYPE ole2_object,
           sheet TYPE ole2_object,
           cells TYPE ole2_object.
    CONSTANTS: row_max TYPE i VALUE 256.
    DATA index TYPE i.
    DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
    DATA: BEGIN OF itab3 OCCURS 0, place(50), END OF itab3.
    *START-OF-SELECTION
    START-OF-SELECTION.
      APPEND: 'name1' TO itab1, 'surname1' TO itab2,
                                  'worli' TO itab3,
                'nam2' TO itab1, 'surname2' TO itab2,
                                  'chowpatty' TO itab3,
               'name3' TO itab1, 'surname3' TO itab2,
                                  'versova' TO itab3,
                'name4' TO itab1, 'surname4' TO itab2,
                                  'grant road' TO itab3,
                'name5' TO itab1, 'surname5' TO itab2,
                                  'gaon' TO itab3,
                'name6' TO itab1, 'surname6' TO itab2,
                                  'mahim' TO itab3.
    CREATE OBJECT application 'excel.application'.
    SET PROPERTY OF application 'visible' = 1.
    CALL METHOD OF application 'Workbooks' = workbook.
    CALL METHOD OF workbook 'Add'.
      CREATE OBJECT excel 'EXCEL.APPLICATION'.
      IF sy-subrc NE 0.
        WRITE: / 'No EXCEL creation possible'.
        STOP.
      ENDIF.
      SET PROPERTY OF excel 'DisplayAlerts' = 0.
      CALL METHOD OF excel 'WORKBOOKS' = workbook .
      SET PROPERTY OF excel 'VISIBLE' = 1.
    Create worksheet
      SET PROPERTY OF excel 'SheetsInNewWorkbook' = 1.
      CALL METHOD OF workbook 'ADD'.
    DO 3 TIMES.
        IF sy-index GT 1.
          CALL METHOD OF excel 'WORKSHEETS' = sheet.
          CALL METHOD OF sheet 'ADD'.
          FREE OBJECT sheet.
        ENDIF.
      ENDDO.
      count = 1.
      DO 3 TIMES.
        CALL METHOD OF excel 'WORKSHEETS' = sheet
          EXPORTING
            #1 = count.
       perform get_sheet_name using scnt sname.
        CASE count.
          WHEN '1'.
            SET PROPERTY OF sheet 'NAME' = 'firstName'.
            CALL METHOD OF sheet 'ACTIVATE'.
            " add header here
            LOOP AT itab1.
              index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name " for headings change the - 1 to + 1 to accomodate 2 extra lines
              CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
              SET PROPERTY OF cells 'Formula' = itab1-first_name.
              SET PROPERTY OF cells 'Value' = itab1-first_name.
            ENDLOOP.
          WHEN '2'.
            SET PROPERTY OF sheet 'NAME' = 'LastName'.
            CALL METHOD OF sheet 'ACTIVATE'.
    " add header here
            LOOP AT itab2.
              index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name " for headings change the - 1 to + 1 to accomodate 2 extra lines
              CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
              SET PROPERTY OF cells 'Formula' = itab2-last_name.
              SET PROPERTY OF cells 'Value' = itab2-last_name.
            ENDLOOP.
          WHEN '3'.
            SET PROPERTY OF sheet 'NAME' = 'place'.
            CALL METHOD OF sheet 'ACTIVATE'.
    " add header here
            LOOP AT itab3.
              index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name " for headings change the - 1 to + 1 to accomodate 2 extra lines
              CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
              SET PROPERTY OF cells 'Formula' = itab3-place.
              SET PROPERTY OF cells 'Value' = itab3-place.
            ENDLOOP.
        ENDCASE.
        count = count + 1.
      ENDDO.
    Save excel speadsheet to particular filename
      GET PROPERTY OF excel 'ActiveSheet' = sheet.
      CALL METHOD OF sheet 'SaveAs'
                       EXPORTING #1 = 'c:\temp\exceldoc1.xls'     "filename
                                 #2 = 1.                          "fileFormat
    Note: to make headings, change the -1 to +1 where specified in the above code and add the following where i have mentioned to add it
    index = row_max * ( sy-tabix - 1 ) + 1.
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'value' = header1.
    Reward for helpful answers
    Thanks
    Naveen khan

  • How to select data from view V_TCURR

    Hi all,
    how to fetch data from view V_TCURR.
    I have to fetch 2 fieds:   kursp  and   *tfact
    (what does this * indicates in field name   *tfact)

    The view is a maintenance view and it doesn't even have field tfact available.
    Just select from the table directly
    PARAMETERS: p_kursp for tcurr-kurst,
                p_fcurr for tcurr-fcurr,
                p_tcurr for tcurr-tcurr,
                p_date  for tcurr-gdate.
    SELECT SINGLE
           kursp
           tfact
           INTO ( lv_kursp, lv_tfact )
           FROM tcurr
           WHERE kurst eq p_kurst
           AND   fcurr  eq p_fcurr
           AND   tcurr  eq p_tcurr
           AND   gdatu le p_date. 
    Hope that helps,
    Michael

  • How to select  data from cube by BAPI

    Hi
    now i want to select data from cube by selection
    and the parameter is BAPI'S import.
    I want to know how can i select data from which table the storage  the cube's data
    Thank you for your help !!

    Hi,
    You can use FM: RSDRI_INFOPROV_READ.
                               BAPI_CUBE_GETDETAIL
    Pls Check the below weblog
    /people/dinesh.lalchand/blog/2006/06/07/reading-infocube-data-in-updatetransfer-rules
    Regards,
    CSM Reddy

Maybe you are looking for