Hi, experts. I want  retrieve data from 8 tables

Hi, experts. I want  retrieve data from 8 tables.
On which table i have to write for all entries query.
Thanks in advance.

Hai   Reddy,
Actually IF we Use Join's Actually The Performance Will Be Good For  4 tables.
So It Is Better  To  Create Two Joins  With  4 Tables Each.
First Retrive The Data For First  View.
Then Use For ALL  Entries For  First Table And Then   Get Data For Second data.
Reward  If Found usefull.
Regards.
Eshwar.

Similar Messages

  • How to Retrieve data from Variant Table

    Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?

    Hello Mohan,
    if u already have data and u want to populate it in F4 help then use below code -
    u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
    REPORT  ZGILL_VALUE_REQUEST                     .
    data: begin of lt_all occurs 0.
            include structure DYNPREAD.
    data  end of lt_all.
    data: begin of lt_selected occurs 0.
           include structure DDSHRETVAL.
    data: end of lt_selected.
    DATA: BEGIN OF lt_code OCCURS 0,
                code LIKE zgill_main-PERNR,
          END OF lt_code.
    data no_dyn like sy-dynnr.
    Parameters : ECODE like zgill_main-PERNR.
    *parameters: pernr like pa0001-pernr .
    no_dyn =  sy-dynnr.   "give the scren no directly or sy-dynnr in case of report.
    At selection-screen on value-request for ECODE.
    select PERNR into table lt_code from zgill_main.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield               = 'ECODE'
            dynpprog               = sy-repid
           dynpnr                  = no_dyn
          dynprofield              =       'ECODE'
          window_title           = 'Employee Details'
           value_org              = 'S'
          DISPLAY                = 'F'
       TABLES
            value_tab             = lt_code
           RETURN_TAB             = lt_selected.
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *if sy-subrc eq '0' .
      write: 'success'.
    *endif.
    read   table lt_selected index sy-tabix.
    move lt_selected-fieldval to ECODE.

  • How to retrieve data from edcauditentity table?

    Hello!
    I am interested how to connect to edcauditentity table and retrieve data from this table.
    I have sql query but i don't have idea how to start. For now i can connect to LiveCycle and retrieve policy name.
    Thank in advance!

    Hello Mohan,
    if u already have data and u want to populate it in F4 help then use below code -
    u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
    REPORT  ZGILL_VALUE_REQUEST                     .
    data: begin of lt_all occurs 0.
            include structure DYNPREAD.
    data  end of lt_all.
    data: begin of lt_selected occurs 0.
           include structure DDSHRETVAL.
    data: end of lt_selected.
    DATA: BEGIN OF lt_code OCCURS 0,
                code LIKE zgill_main-PERNR,
          END OF lt_code.
    data no_dyn like sy-dynnr.
    Parameters : ECODE like zgill_main-PERNR.
    *parameters: pernr like pa0001-pernr .
    no_dyn =  sy-dynnr.   "give the scren no directly or sy-dynnr in case of report.
    At selection-screen on value-request for ECODE.
    select PERNR into table lt_code from zgill_main.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield               = 'ECODE'
            dynpprog               = sy-repid
           dynpnr                  = no_dyn
          dynprofield              =       'ECODE'
          window_title           = 'Employee Details'
           value_org              = 'S'
          DISPLAY                = 'F'
       TABLES
            value_tab             = lt_code
           RETURN_TAB             = lt_selected.
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *if sy-subrc eq '0' .
      write: 'success'.
    *endif.
    read   table lt_selected index sy-tabix.
    move lt_selected-fieldval to ECODE.

  • Retrieving data from 3 tables

    Hi,
    I am working on a report where I have to retrieve data from 3 tables(marc,mara,makt).For this I have used 3 select statements for retriving data from 3 tables.There r some fields which r not present in marc table where as present in mara and makt tables.So added thos fields in marc internal table t_marc.I have looped at marc table and used the read statement to read the data from mara table using the key field matnr from both the tables.This read statement is giving the sy-subrc value as 4.Could u pls tell me why this is happening?I am sending my code.
    SELECT matnr
           werks
           pstat
           lvorm
    FROM  marc
    INTO  TABLE t_marc
    PACKAGE SIZE 500
    WHERE matnr IN s_matnr
    AND   werks IN s_werks.
    IF NOT t_marc[] IS INITIAL.
    SELECT matnr
            ersda
            laeda
            meins
       FROM mara
       INTO TABLE t_mara
       FOR ALL ENTRIES IN t_marc
       WHERE matnr = t_marc-matnr
       AND   ersda IN s_ersda
       AND   laeda IN s_laeda.
      IF NOT t_mara[] IS INITIAL.
         SELECT matnr
                maktx
         FROM  makt
         INTO  TABLE t_makt
         FOR ALL ENTRIES IN t_mara
         WHERE matnr = t_mara-matnr.
       LOOP AT t_marc INTO wa_marc.
         READ TABLE t_mara INTO wa_mara WITH KEY matnr = t_marc-matnr.
         IF sy-subrc IS INITIAL.
            wa_marc-meins = wa_mara-meins.
            MODIFY t_marc.
            APPEND wa_marc TO t_output.
          ENDIF.
          READ TABLE t_makt INTO wa_makt WITH KEY matnr = t_marc-matnr.
          IF sy-subrc IS INITIAL.
            wa_marc-maktx = wa_makt-maktx.
            MODIFY t_marc.
            APPEND wa_marc TO t_output.
          ENDIF.
        ENDLOOP.

    hi hema,
    Dont use three select stements for this scenario.
    Just use innerjoin and join all the three tables.
    Three tables should contain  MATNR (material number).
    By using that retrieve data from 3 tables by using a single select statement.
    Eg:
    SELECT DISTINCT a~matnr    "MATERIAL NUMBER
             a~ersda    "CREATED ON
             a~mtart    "MATERIAL TYPE
             a~meins    "BASE UNIT OF MEASURE
             a~bstme    "ORDER UNIT
             b~maktx    "MATERIAL DESCRIPTION
             c~bwkey    "VALUATION AREA
             c~lbkum    "TOTAL VALUED STOCK
             c~salk3    "VALUE OF TOTAL VALUED STOCK
             c~stprs    "STANDARD PRICE
             c~peinh    "PRICE UNIT
             c~bklas    "VALUATION CLASS
             INTO TABLE it_matdetails
             FROM mara AS a INNER JOIN makt AS b ON a~matnr = b~matnr
                            INNER JOIN mbew AS c ON a~matnr = c~matnr
                            INNER JOIN marc AS d ON a~matnr = d~matnr
                            INNER JOIN mard AS e ON a~matnr = e~matnr
             WHERE b~spras = sy-langu AND a~matnr IN matnr AND d~werks IN werks AND e~lgort IN lgort.
    pls reward if helpful.

  • How to retrieve data from catsdb table and convert into xml using BAPI

    How to retrieve data from catsdb table and convert into xml using BAPI
    Points will be rewarded,
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    This is not your requirment but u can try this :
    CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
    GRANT READ ON DIRECTORY text_file TO fah;
    GRANT WRITE ON DIRECTORY text_file TO fah;
    DROP TABLE load_a;
    CREATE TABLE load_a
    (a1 varchar2(20),
    a2 varchar2(200))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY text_file
    ACCESS PARAMETERS
    (FIELDS TERMINATED BY ','
    LOCATION ('data.txt')
    select * from load_a;
    CREATE TABLE A AS select * from load_a;
    SELECT * FROM A
    Regards
    Faheem Latif

  • Retrieve data from cluster tables

    hi
    can any one explain me how to retrieve data from cluster tables
    Regards
    sachin

    you can write a select
    select * from KONV
           into table it_konv
    where <condition>
    you cant join.. cluster tables..

  • Retrieve data from nested tables

    Hi All,
    I have big trouble to retrieve data from nested tables..
    From java code developer are passing struct data type to Oracle procedure.. So equal data type in oracle has been created as created as object
    CREATE OR REPLACE TYPE TXNDATA AS OBJECT
      TRAN_ID            NUMBER             ,
      EVENT_ID                   NUMBER             ,
      EVENT_CD                   VARCHAR2(10 BYTE))and create a procedure which has a IN parameter as TXNDATA
    now i need to retrieve the column data's through SELECT clause such as
    TYPE Proc_txn  IS TABLE OF  TXNJOURNALDATA;
    EVENT_JOURNAL_SEQ Proc_txn;
    select  * from table(cast(EVENT_JOURNAL_SEQ));but above SQL will give all column data's but i need to retrieve only 2 column values such as
    select EVENT_ID , EVENT_CD  from table(cast(EVENT_JOURNAL_SEQ))how can i achieve the above result set?
    Thanks & Regards
    Sami.

    use a table alias in your query
    SQL> set serveroutput on
    SQL> create TYPE TXNDATA AS OBJECT
      2  (
      3    TRAN_ID            NUMBER             ,
      4    EVENT_ID                   NUMBER             ,
      5    EVENT_CD                   VARCHAR2(10 BYTE));
      6  /
    Type created.
    SQL>
    SQL> create type txnjournaldata
      2  as table of txndata;
      3  /
    Type created.
    SQL>
    SQL> declare
      2     txn txnjournaldata := txnjournaldata (
      3                             txndata(10, 20, 'One')
      4                             ,txndata(10, 20, 'Two')
      5                           );
      6  begin
      7     for rec in (select tx.event_id
      8                       , tx.event_cd
      9                    from table (txn) tx
    10                 )
    11     loop
    12        dbms_output.put_line (rec.event_id||' - '||rec.event_cd);
    13     end loop;
    14  end;
    15  /
    20 - One
    20 - Two
    PL/SQL procedure successfully completed.Edited by: Alex Nuijten on Oct 24, 2011 12:24 PM

  • Retrieve data from oracle table, table name passed in runtime into JSP

    Hello All,
    I am new to JSP, i have a requirement,
    I need to retrieve data from oracle table, here table is passed at random. how to get the data displayed in JSP page.
    can any one help me in that
    thanks

    1) Learn SQL.
    2) Learn Java.
    3) Learn JDBC.
    4) Learn DAO.
    5) Learn HTTP.
    6) Learn HTML.
    7) Learn JSP/Servlet.
    8) Learn JSTL.
    9) Apply learned things and develop.
    Whenever you stucks, please come back and post the specific coding/technical problem here.

  • Retrieving data from different tables in the same time crash

    Hi
    this is probably the wrong way to do it, but this is how I did:
    - I wanted a screen with 3 datagrids components retrieving data from 3 different tables.
    - I could make it work while enabling 1 or 2 of them.  When the 3 are enabled, I get this error:
    btw its a huge msg, I will trim it:
    ArgumentError: Can't find ManagedQuery or ManagedOperation named: getItems_paged     at mx.data::RPCDataServiceAdapter/executeQuery()[C:\depot\DataServices\branches\lcds_modeler 101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:325]     at mx.data::RPCDataServiceAdapter/processDataMessage()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:920]     at RPCDataServiceRequest/invoke()[C:\depot\DataServices\branches\lcds_modeler101\frameworks\ projects\data\src\mx\data\RPCDataServiceAdapter.as:1668]     at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\DataStore.as:3343] ...  it continues forever. 
    the getItems_paged is a auto generated function inside the php class flex generates to handle the tables.
    Each of the datagrid is a custom component. I made so to avoid keeping a bunch of code lines in the main 'page'.
    Any suggestion to make it work smoothly?
    Thanks in advance,
    btp~

    Hi
    this is probably the wrong way to do it, but this is how I did:
    - I wanted a screen with 3 datagrids components retrieving data from 3 different tables.
    - I could make it work while enabling 1 or 2 of them.  When the 3 are enabled, I get this error:
    btw its a huge msg, I will trim it:
    ArgumentError: Can't find ManagedQuery or ManagedOperation named: getItems_paged     at mx.data::RPCDataServiceAdapter/executeQuery()[C:\depot\DataServices\branches\lcds_modeler 101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:325]     at mx.data::RPCDataServiceAdapter/processDataMessage()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:920]     at RPCDataServiceRequest/invoke()[C:\depot\DataServices\branches\lcds_modeler101\frameworks\ projects\data\src\mx\data\RPCDataServiceAdapter.as:1668]     at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\depot\DataServices\branches\lcds_m odeler101\frameworks\projects\data\src\mx\data\DataStore.as:3343] ...  it continues forever. 
    the getItems_paged is a auto generated function inside the php class flex generates to handle the tables.
    Each of the datagrid is a custom component. I made so to avoid keeping a bunch of code lines in the main 'page'.
    Any suggestion to make it work smoothly?
    Thanks in advance,
    btp~

  • Retrieve data from the table T2550

    Hi All,
    I have 3 records in the table T2550. The values are as below.
    MANDT WWSAL              BEZEK
    200   001                James
    200   002                John
    200   123456789012345678 test
    If I want to see the first record in the table, if I enter 1  and execute to see it, it is not accepting. It is accepting only when I enter 001 and execute. I thought of using conversion exit for adding leading zeros. But the field WWSAL is having 18 characters. (if we use conversion exit, it will add the leading zeros to the total length, so now the lengthe will become 18 characters hence no results). But in the table it is having only 3 characters length.
    Can any one help me, how can I retrieve the data from T2550 table.
    Thanks in advance.
    Regards
    Ramesh .

    Hi Ramesh,
    I didn't found  this table in R3X or E6Ssystems.You should specify in  which you found this standard table?Then only i can give solution.Even i found a table T255, its structure is different from table you mentioned.
    by
    Prasad GVK

  • Retrieving data from two tables

    Hi,
    I have two tables which have a relation, ID is primary key in one table and in other table it is foreign key. I have entity beans for these tables. How to retrieve data from these two tables? Is there any method which does this and how should i use it.
    thanks
    arepally

    If you use container managed relationships you can get a Collection of the child data in the parent bean. See here for more details: http://developer.java.sun.com/developer/EJTechTips/2002/tt1210.html#1

  • Question about retrieving data from two tables

    Hi everyone.
    I've been working on this and was wondering what the correct way of handling this would be.
    I have two tables, a Billing Table that contains invoices and related information, and a Payments Table that contains payments and related information to that.
    Both tables contain a Date Column for the date that the Invoice was generated or the Payment was made.
    I want to get a list of all Invoices and the respective payments if the invoice was generated between two dates OR the payment was made between these two dates.
    I can get a list of the invoices and their payments if the invoice was generated between those dates.  I can get a list of the payments if they were made between those dates.  But I can't seem to figure out how to do both.
    How do I Join two tables and have it return the data from both tables if either meets the required Date Period?
    Here is the SQL that I have so far.  This SQL returns all of the Invoices and Payments IF the Invoice was generated between these two dates (Or updated). 
    SELECT Billing.ID AS [BID], Billing.AttachmentName, Billing.BillingType, Billing.Invoice, Billing.Description, Billing.Amount, Billing.DateCreated AS [BillingDate],
    Payments.ID AS [PID], Payments.Type AS PaymentType, Payments.Payment, Payments.PaymentNote, Payments.Reason AS [BillReason], Payments.DateCreated AS [PaymentDate],
    Customers.ID AS [CID], COALESCE(NULLIF(Customers.Company,'') + ' - ','') + Customers.LName + ', ' + Customers.FName AS [Name],
    Jobs.ID AS [JID], Jobs.JobType, Jobs.JobStatus, Jobs.JobStatusDate
    FROM Billing LEFT OUTER JOIN Payments ON Payments.BillingID = Billing.ID
    RIGHT OUTER JOIN Customers ON Customers.ID = Billing.CustomerID
    RIGHT OUTER JOIN Jobs ON Jobs.ID = Billing.JobID
    WHERE
    Billing.BillingType = 'Invoice' AND Billing.PaidInFull = 'No' AND Billing.Collections = 'No' AND Billing.ChargeOff = 'No' AND Billing.Lien = 'No' AND Billing.InvoiceCanceled = 'No'
    AND (Billing.DateCreated >= '1/1/2014' AND Billing.DateCreated <= '8/13/14') OR (Billing.DateUpdated >= '1/1/14' AND Billing.DateUpdated <= '8/13/14')
    ORDER BY Name Asc, Billing.Invoice, PID
    Thanks for your help, I really appreciate it.
    -Matt-

    I don't quite follow your query, but your description leads me to think that you need the set of Billing IDs for bills that were created as defined or that have payments that were created as defined.  From that set of IDs you then simply want all Bills
    and their associated payments.  So how do you get that set of IDS?  One way is the union operator: 
    with allbill (billID) as (
    select ID from dbo.Billings where DateCreated between ...
    union 
    select BillingID from dbo.Payments where DateCreated between ... )
    select ...
    from allbill inner join dbo.Billings as bill on allbill.billID = bill.ID inner join dbo.Payments as pay 
    on bill.ID = pay.BillingID 
    order by ... ;
    Your description leads me to believe that you query is much more complicated, but the basic idea is the union in the CTE - generate one combined set of bill IDs that identify all your bills of interest.  Note that I assumed that a payment cannot exist
    with an associated billing.  

  • How to retrieve data from plsql table in BI publisher Data template

    Hi All,
    I have created a data template for XML publisher report. In data template i m getting data from plsql table. for that i have created one package with pipelined function. I am able to run that sql from sql developer .But if i run the concurrent program then i got error like "java.sql.SQLSyntaxErrorException: ORA-00904: "XXXXX": invalid identifier".
    I have used the same parameters in Data template and concurrent program....
    please clarify me what needs to be done....
    thanks in advance....
    Regards,
    Doss

    Hi Alex ,
    i am using pipelined function and get the data from cursor and load it into plsql table (nested table). and i use the below in my data template to fetch the data:
    <sqlStatement name="Q1">
    <![CDATA[select * from  table(PO_SPEND_RPT_PKG.generate_report(P_ORG_ID,P_SOB_ID,P_ORG_NAME,P_PERIOD_NAME,P_CLOSE_STATUS,P_E_PCARD_NEED,P_REPORT_TYPE))]]>
    </sqlStatement>
    if i run the above in sql developer i can get the result....from apps if i run i got the error "java.sql.SQLSyntaxErrorException: ORA-00904: "P_ORG_ID": invalid identifier"
    Edited by: kalidoss on Sep 14, 2012 4:32 AM

  • How to retrieve data from a table?

    I creat a Java application that connect to a database at address 10.4.4.204 and I also creat a table in this database by SQL Navigator. This table contain colums PID, Name, history.
    How can I retrieve these colums and put results to Microsoft Word. I also want these results arrange to colums in Microsoft Word too.
    Then how this line become?
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.4.4.204:1999:db", "tung", "tung12345");
    I need documents and sample code in this case ( retrive and display data from remote database host). Any one help me?

    This may not answer your question, but what about a pure SQL solution?
    NOTE THIS IS UNTESTED:
    SELECT *
    FROM     ERROR_TABLE
    WHERE     ERROR_CD IN
              SELECT      1
              FROM      table1
              HAVING      COUNT(*) > 0
              UNION ALL
              SELECT      2
              FROM      table2
              HAVING      COUNT(*) > 0     
         )HTH!

  • How to retrieve data from a table that match values in a varray?

    Using - Oracle 10g Release 1.2
    How to do write a sql to retrieve data matching values in a varray?
    I have the following:
    declare
        v_ct          NATURAL := 0;
        type t_cur is  REF CURSOR;
        v_cursor t_cur;
        TYPE t_array IS VARRAY(100) OF NUMBER;
        l_codes t_array := t_array();
    begin
        select count(*)
          into v_ct
          from table1
         where ind_cd IS NULL;
        IF v_ct = 0 THEN
            l_codes(1) := 1;
        END IF;
        select count(*)
          into v_ct
          from table2
         where cd IS NULL;
        IF v_ct = 0 THEN
            l_codes(2) := 2;
        END IF;  
       OPEN v_cursor for
          select * from error_table where error_cd in (SELECT * FROM TABLE(CAST(l_codes AS t_array)) );
    end;

    This may not answer your question, but what about a pure SQL solution?
    NOTE THIS IS UNTESTED:
    SELECT *
    FROM     ERROR_TABLE
    WHERE     ERROR_CD IN
              SELECT      1
              FROM      table1
              HAVING      COUNT(*) > 0
              UNION ALL
              SELECT      2
              FROM      table2
              HAVING      COUNT(*) > 0     
         )HTH!

Maybe you are looking for

  • How do I set up a group text

    How do I set up a group text from my contacts with my droid maxx?Kathleen

  • JDeveloper 11.1.1.2.0 - Help text at field level

    Hi, We are making use of the Help.properties file to produce field level text. I have field's such as the following <af:inputText value="#{bindings.DocumentName.inputValue}"                                 label="#{bindings.DocumentName.inputValue eq

  • Problem with an ejb Reference

    Hi all, So I get an ejb3 stateful reference and I put it in a distributed cache (Coherence)...Then after if I get it from cache in the same JVM where it was created then it is ok...If I get it from cache from another JVM then I have an error message

  • [SOLVED] - Package xf86-video-via is missing from repositories!

    Hi, I have a VIA card as follows: VGA Compatible Controller: VIA Technologies, Inc. S3 Unichrome Pro VGA Adapter (rev 01) My X doesn't work except in VESA mode. But in Vesa mode, when I play videos in mplayer, I can't fullscreen them. When I checked

  • Aperture database wont open

    The 2 messages below keep coming up when trying to open Aperture. I have recently bought another drive to do a backup to. Currently Aperture library is on both external drives on the network. One says 46G for a sec then shows 5.4mb ....???  The other