Sq02: define join between 2 tables as per your choice

Hi Team,
I am trying to create a join between 2 tables ekko & Lfa1. The sq02 tcode by default is joining it as
ekko-lblif = lfa1-lifnr in ecc 6.0
While in 4.7 i found that the same joint exists as
ekko-lifnr = lfa1-lifnr.
I want to create the joint as ekko-lifnr = lfa1-lifnr.
Can i do it ?
Please advice.

yes you can.
right click on the default link and delete it.. then start dragging from EKKO-LIFNR field to LFA-LIFNR. it will work.

Similar Messages

  • Find the key for join between table "crhd" and "equi" for use field "answt"

    I make program for read data from table "crhd" for print  about machine report
    but I can not find the key for link join to table "equi" for print field "answt" (acquistion value)
    please help me  find the key field for join between table "crhd" and "equi" for use field "answt"
    thank you very much...

    This is how the Work Center is linked to a particular Equipment -
    Functional - In IE03 ( view Equipments) You see the Work Center of a particular Equipment.
    Technical - Go to view V_EQUI ( view of EQUI and EQUZ). Pass the Equipment number alongwith V_EQUI-PM_OBJTY = 'A' ( i,.e searching for the Object Type Work Center).  In this way u ll get the V_EQUI-GEWRK - this is the Work Center ID.
    You can pass this Work Center ID to CRHD. And you will get the Work Center text.
    CRHD-OBJTY = 'A'
    CRHD-OBJID = V_EQUI-GEWRK.
    and u ll get the CRHD-ARBPL - this is the Work Center.
    So u need to come backwards, alongwith ur CRHD-OBJTY and CRHD-OBJID , you pass the same to V_EQUI and u get the list of equipment numbers alongwith ur ANSWT(Acquisition value).
    I guess it solves ur problem.

  • ABAP query- unable to delete the join between tables

    Im unable to delete the join between two tables. when i right clicked on the join then it gives two options:
    1. Display join condition
    2. Remove join condition
    both these options are grey in color so i cant select them. how can i remove join?

    goto SQ02 and enter infoset and goto change mode agagin select change mode and click the join then select and delete link...

  • 1.1 query builder join between tables

    In the latest Sql Developer.
    I invoke the query builder and select multiple tables that have foreign keys between them. These foreign key relationships appear in the diagram (good job).
    How do I make those relationship appear in the SQL that query builder returns to the sql worksheet. I shouldn't have to re-specify them on the where/criteria tab.
    It would be nice if these relationships are defaulted in the joining of tables.

    I overlayed the pre-release versionsDo you mean you installed in the same directory?
    Don't do that.
    There's a system directory (sqldeveloper\sqldeveloper\system) which holds settings and everything, which very well might be corrupted to be used for a newer release.
    Try deleting it, it will be regenerated at next startup. Or even better: re-install in another directory all together...
    K.

  • Dynamic SQL Joining between tables and Primary keys being configured within master tables

    Team , Thanks for your help in advance !
    I'm looking out to code a dynamic SQL which should refer Master tables for table names and Primary keys and then Join for insertion into target tables .
    EG:
    INSERT INTO HUB.dbo.lp_order
    SELECT *
    FROM del.dbo.lp_order t1
    where not exists ( select *
    from hub.dbo.lp_order tw
    where t1.order_id = t2.order_id )
    SET @rows = @@ROWCOUNT
    PRINT 'Table: lp_order; Inserted Records: '+ Cast(@rows AS VARCHAR)
    -- Please note Databse names are going to remain the same but table names and join conditions on keys
    -- should vary for each table(s) being configured in master tables
    Sample of Master configuration tables with table info and PK Info :
    Table Info         
    Table_info_ID    Table_Name    
    1        lp_order    
    7        lp__transition_record    
    Table_PK_Info        
    Table_PK_Info_ID    Table_info_ID    PK_Column_Name
    2                1    order_id
    8                7    transition_record_id
    There can be more than one join condition for each table
    Thanks you !
    Rajkumar Yelugu

    Hi Rajkumar,
    It is glad to hear that you figured the question out by yourself.
    There's a flaw with your while loop in your sample code, just in case you hadn't noticed that, please see below.
    --In this case, it goes to infinite loop
    DECLARE @T TABLE(ID INT)
    INSERT INTO @T VALUES(1),(3),(2)
    DECLARE @ID INT
    SELECT @ID = MIN(ID) FROM @T
    WHILE @ID IS NOT NULL
    PRINT @ID
    SELECT @ID =ID FROM @T WHERE ID > @ID
    So a cursor would be the appropriate option in your case, please reference below.
    DECLARE @Table_Info TABLE
    Table_info_ID INT,
    Table_Name VARCHAR(99)
    INSERT INTO @Table_Info VALUES(1,'lp_order'),(7,'lp__transition_record');
    DECLARE @Table_PK_Info TABLE
    Table_PK_Info_ID INT,
    Table_info_ID INT,
    PK_Column_Name VARCHAR(99)
    INSERT INTO @Table_PK_Info VALUES(2,1,'order_id'),(8,7,'transition_record_id'),(3,1,'order_id2')
    DECLARE @SQL NVarchar(MAX),
    @ID INT,
    @Table_Name VARCHAR(20),
    @whereCondition VARCHAR(99)
    DECLARE cur_Tabel_Info CURSOR
    FOR SELECT Table_info_ID,Table_Name FROM @Table_Info
    OPEN cur_Tabel_Info
    FETCH NEXT FROM cur_Tabel_Info
    INTO @ID, @Table_Name
    WHILE @@FETCH_STATUS = 0
    BEGIN
    SELECT @whereCondition =ISNULL(@whereCondition+' AND ','') +'t1.'+PK_Column_Name+'='+'t2.'+PK_Column_Name FROM @Table_PK_Info WHERE Table_info_ID=@ID
    SET @SQL = 'INSERT INTO hub.dbo.'+@Table_Name+'
    SELECT * FROM del.dbo.'+@Table_Name+' AS T1
    WHERE NOT EXISTS (
    SELECT *
    FROM hub.dbo.'+@Table_Name+' AS T2
    WHERE '+@whereCondition+')'
    SELECT @SQL
    --EXEC(@SQL)
    SET @whereCondition = NULL
    FETCH NEXT FROM cur_Tabel_Info
    INTO @ID, @Table_Name
    END
    Supposing you had noticed and fixed the flaw, your answer sharing is always welcome.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Join between tables

    what is wrong :
    SELECT viser02~sdaufnr
       FROM (viser02  INNER JOIN vbak
                   ON vbakvbeln = viser02sdaufnr
                   AND vbakposnr = viser02posnr
                   INNER JOIN vbap
                   ON vbapvbeln = viser02sdaufnr
                   AND vbapposnr = viser02posnr)
        where vbak~auart = 'WV'
        and ( vbap~sobkz <> 'V'
              OR vbap~sobkz <> 'W' ).

    Hi,
    Write the join as follows
    DATA: BEGIN OF ITAB_AUFNR OCCURS 0,
            SDAUFNR LIKE VISER02-SDAUFNR,
          END OF ITAB_AUFNR.
    SELECT viser02~sdaufnr
      INTO TABLE ITAB_AUFNR
      FROM viser02
    INNER JOIN vbak
        ON vbakvbeln = viser02sdaufnr
    INNER JOIN vbap
        ON vbapvbeln = viser02sdaufnr
       AND vbapposnr = viser02posnr
    where vbak~auart = 'WV'
      and ( vbapsobkz <> 'V' OR vbapsobkz <> 'W' ).
    The problem with your join is in VBAK there will not be any item field(POSNR) and you also didn't specify the into clause.
    As a best practice do not use negative conditions in where cluases, they will consume more time. There will be two options to eliminate this.
    1. Populate ranges table with all the allowed values for the SOBKZ field and use it in where clause.
    OR
    2. Populate ranges table with the not required values with the sign option 'E' (Exclude).
    If you need any further help let me know.
    Thanks
    Giridhar

  • Multiple joins between tables

    Not sure that the title best describes this.
    I've got two tables which I'll simplify here
    t1 - building (BuildingCode, Reception, Porter, Manager)
    A, 1, 3, 8
    B, 2, 4, 9
    C, 1, 4, 7
    t2 - staff (ID, Name, Extn)
    1, Dave, 3302
    2, Chris, 3994
    3, Claire, 3033
    8, Simon, 3255
    and i'd like to get a table out that looks like
    A, Dave, 3302, Claire, 3033, Simon, 3255
    B, Chris, 3994 etc.
    select b.buildingCode, s.Name, s.Extn
    from building b, staff s
    where s.ID = b.Reception
    would give me one set of details - how can i get all 3?
    Do I need to do 3 queries - where s.ID = b.Reception, where
    s.ID = b.Porter and where s.ID = b.Manager and then join the 3
    tables together or is there a more direct route?
    Many thanks
    Michael

    Now that I've had a chance to try the code I found that to
    use the results on the page I needed aliases in the select part as
    well - final code is
    select t1.BuildingCode, r.Name as rname, r.Extn as rextn,
    p.Name as pname, p.Extn as pextn, m.Name as mname, m.Extn as mextn
    from t1, t2 r, t2 p, t2 m
    where t1.Reception = r.ID
    and t1.Porter = p.ID
    and t1.Manager = m.ID

  • How to define join in physical layer between cube and relational table

    Hi
    I have a aggregated data in essbase cube. I want to supplement the information in the cube with data from relational source.
    I read article http://community.altiusconsulting.com/blogs/altiustechblog/archive/2008/10/24/are-essbase-and-oracle-bi-enterprise-edition-obiee-a-match-made-in-heaven.aspx which describes how to do it.
    From this article I gather that I have to define a complex join between the cube imported from essbase to my relational table in physical layer.
    But when I use Join Manager I am only able to define jooin between tables from relation source but not with the imported cube.
    In My case I am trying to join risk dimension in the cube based on risk_type_code (Gen3 member) with risk_type_code in relation table dt_risk_type.
    How can I create this join?
    Regards
    Dhwaj

    Hi
    This has worked the BI server has joined the member from the oracle database to cube. So Now for risk type id defined in the cube I can view the risk type code and risk type name from the relational db.
    But now if I want to find aggregated risk amount against a risk type id it brings back nothing. If I remove the join in the logical model then I get correct values. Is there a way by which I can combine phsical cube with relational model and still get the aggregated values in the cube?
    I have changed the column risk amount to be sum in place of aggr_external both in logical and phsical model.
    Regards,
    Dhwaj

  • How To Find joins between siebel tables

    Hi Experts,
    I am new in siebel and i am working on BI reports.
    I need to write queries to fetch data from sibel database.
    Any idea how do we find joins between table in siebel. Is there any user guide??
    Cheers,
    Andy

    Hi Andy,
    We can find Joins in Object Explorer. Expand the Business Component Object in Object Explorer and you can find Join. In Siebel generally we use only Equi Joins. ROW_ID of parent table will be stored in PAR_ROW_ID of child table. ROW_ID and PAR_ROW_ID are the columns of the table. Most of the tables have these two columns.
    For Example: Take two tables S_CONTACT AND S_CONTACT_X, the ROW_ID of S_CONTACT will be stored in PAR_ROW_ID of S_CONTACT_X table.
    If you want to join these two tables the query will be like
    "SELECT * FROM S_CONTACT CON, S_CONTACT_X CONX WHERE CON.ROW_ID = CONX.PAR_ROW_ID"
    This query will return all the records from S_CONTACT_X which matches S_CONTACT table.
    Thanks & Regards,
    Vinodhkumar

  • Relationship between Table BKPF and RBKP

    Hello Developers,
    I need to fetch value of field BKTXT  from table BKPF and this value need to insert in internal table i_tab.
    in the below situation:
    select bebeln bebelp bwerks ausnam alifnr abelnr
             abldat abudat
             caedat cekgrp cbukrs cekorg
             dbanfn dbnfpo dnetpr dafnam
      into corresponding fields of table i_tab
      from rbkp as a join rseg as b on abelnr = bbelnr
                     join ekko as c on bebeln = cebeln
                     join ekpo as d on cebeln = debeln
                                          and bebelp = debelp
      where a~budat in s_date
        and b~werks in s_werks
        and c~bstyp = c_f
        and c~ekorg in s_ekorg
        and a~bukrs in s_bukrs.
    Can any one suggest how to relate table BKPF with other table like RBKP.
    Thanks in advance.
    Regards
    Sundeep

    Hi,
    perform the following steps:-
    1.   Go to transaction SQVI
    2.   Create a View
    3.   Enter title
    4.   Choose the Data source as Table Join
    5.   Go to insert table and add table as per your requirement.
    and hereafter you can find relation between any two tables...
    Rgds/Abhi

  • Join between Oracle and non-Oracle Database

    We are working at a project with the follow architecture:
    - 5 Databases (3 Oracle, 1 Sybase and 1 DB2);
    - Session Bean like Session Facade Pattern;
    - Entity Bean (BMP);
    - OC4J (Oracle Container for J2EE);
    The case is that we cannot make join between tables of different bases, for example, join with one table of Oracle and one other of DB2, therefore the customer does not possess tool midleware for this.
    The idea that appeared was: we make a query in table XXX of Oracle and return a HashTable with its respective VO�s and Keys (PKs from the first query that will serve of base for the second query), later we have access the DB2 that one second collection would return, to inside make join of the application.
    The problem is that with this solution, we will have fall in the performance. And we do not know if it is the best form.
    Do you have any idea???
    Thanks,
    Eric Sander

    Hi,
    If you have different databases then the join has to be done in the VM (either by the appserver or by you).
    If you want to do it yourself, I would try the following:
    -write one DAO per business object (at least one per database)
    -this DAO contains the specifics of its database
    -return a hashtable of keys and VOs from one DAO (as you say you do?)
    -in the other DAO, add a method "joinWith ( Hashtable foreignKeys )" that will return the join's result
    -implement the method along these lines:
    1. retrieve the candidate rows from the second DAO's tables (1 query execution)
    2. put the keys in a new Hashtable, say "candidateKeys" (meaning 1 iteration over all results)
    3. iterate over all elements of foreignKeys (1 iteration)
    4. for each element, check if a key exists in "candidateKeys" (1 hash lookup, very fast)
    5. add any such row to the result
    This is called a hash join (Oracle does it internally if you do a join).
    It is the fastest algorithm to do joins.
    Best,
    Guy
    http://www.atomikos.com - JTA transaction manager

  • Join multiple tables across separate databases

    I needed to perform a join on multiple tables in two separate databases. I am using Sybase ASE 12.5 and jConnect 5.5 JDBC driver.
    Table A is in DB1 and Table B is in DB2. Both DB1 and DB2 reside on the same database server.
    I have set up JNDI bound datasources DS1 for DB1 and DS2 for DB2.
    If the queries involved single tables or multiple tables within the same database, it is simple. But I am not seeing any way where I can perform a join between Tables A and B, which reside in separate databases. The datasources DS1 and DS2 are associated with DB1 and DB2 respectively, so I am not sure if there is anything like performing joins using two data sources.
    One alternative I am facing is using a stored procedure in one database refer the table in the other database, for the join. But I may not be allowed to modify the database; currently, I am allowed to perform READ-ONLY queries.
    So I am looking for any and all options. Please advice.
    Thanks!

    Two choices..
    One find the syntax in DB2 that allows you to do what you want in there. That would often be somelike...
    select a.myfield
    from database1.table1 a, database2.table2 b
    where a.id = b.id
    Obviously the database itself must support this. If it doesn't then you have choice two.
    You extract the data from database1 using java for table1.
    You extract the data from database2 using java for table2.
    You write java code that merges the data from both sources.

  • Outer join between logical tables

    Hello,
    This question is likely to be asked many times, but I failed to find the proper thread in the forum.
    Assume there are 2 logical tables "Fact" and "Dim".
    "Fact" has 1 LTS which consists of physical tables F, FX1, FX2 which are inner joined.
    "Dim" has 1 LTS which consists of physical tables D, DX1, DX2 which are inner joined.
    F and D tables are also joined together on physical layer.
    I define left outer join between "Fact" and "Dim" on logical layer.
    I create a request in Answers, querying columns from "Fact" and "Dim" which map to physical tables F and D only.
    I expect OBIEE to build SQL query which uses F and D tables only, outer joined.
    Instead of that all the physical tables used for logical tables "Fact" and "Dim" are joined together in a form like:
    SELECT F.col, D.col
    FROM (F inner join FX1 inner join FX2) left outer join (D inner join DX1 inner join DX2)
    Is there any way to avoid this behavior or build data model in different way?
    Thank you!

    Hi Alex,
    In BI Applications you never have a null in a facts foreign key to the dimension. Instead there is always a zero row wi record inserted with 'Unspecified' in all the columns. When the fact table is populated in the ETL, if the fact record doesn't have a corresponding dimension record the WID is poulated with zero.
    This removes the problems with outer joins and helps considerably with performance.
    This could be one practice you take from BI Apps and put into your own ETL's and data model.
    Regards
    Robin

  • Abap query, join between same tables

    Hi,
    I have an Abap Query (SQ01), I need to create a join between the same table (ESLL-ESLL) to obtain the services from a PO. The join is with the packno from ESLL to subpackno from ESLL (the same table). But I don't know how I can do that with Abap Query. Because the Infoset doesn't allow inserting the table two times.
    Somebody can help me.
    Thanks.
    Victoria

    Hi:
    I was able to create a query to retrieve the service lines entries using tables ESSR (Header) (service entry sheet number as input parameter), linked to package number to view ML_ESLL and then from the view the sup-package number linked to ESLL. That way I was able to retrieve all the service lines information from table ESLL only using SQ02 and SQ01, no ABAP.
    I Hope this help.
    Juan
    PS: I know the post is old but may be there are people out there with no ABAP access who needs to create reports for Service Entry Sheets lines. All the join conditions are.
    Table             Table
    ESSR            EKKO
    ESSR            ML_ESLL
    ML_ESLL      ESLL
    ESLL             ESLH
    Edited by: Juan Marino on Jan 23, 2012 10:53 PM

  • How to provide joins between oracle tables and sql server tables

    Hi,
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server.
    how to provide joins between oracle tables and sql server tables ? Any help on this
    Regards,
    Malli

    user10675696 wrote:
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server. Bad idea most times. Heterogeneous joins do not exactly scale and performance can be severely degraded by network speed and b/w availability. And there is nothing you can do in the application and database layers to address performance issue at the network level in this case - your code's performance is simply at the mercy of network performance. With a single glaring fact - network performance is continually degrading. All the time. Always. Until it is upgraded. When the performance degradation starts all over again.
    If the tables are not small (few 1000 rows each) and row volumes static, I would not consider doing a heterogeneous join. Instead I would rather go for a materialised view on the Oracle side, use a proper table and index structure, and do a local database join.

Maybe you are looking for

  • URGENT: Consuming Portlets in Site Studio Design.

    Hi... I am quite new to oracle technologies and have to create a full fledged secure B2B web portal (web center application) using various web center technologies like Wiki, Discussions etc and also integrate and manage content through it. The portal

  • Challenge & Response error messages in OAM

    Hi, I want to change the challenge response error messages in OAM. I am not able to locate the file which is responsible for the error messages (e.g old response is not correct) .. Can anyone update on this.. Thanks inadvance.. Regards, Srikanth

  • Trouble Completing Apple ID

    Hey community I got this used iPhone 4 from a friend and since I've practically never owned an iPhone, I had to create a new account in order to access the iTunes and App store. However, the phone takes me through the payment method part of the proce

  • Invalid Eclipse platform version - BPEL Designer

    Hello, when I try to install the BPEL designer, I get a popup "Invalid Eclipse platform version", "The version of the Eclipse platform installed at C:\Java\eclipse must be at least 3.0 (release)". I have Eclipse 3.0.1. Thank you.

  • Configuring Problem in Oracle Application Express  3.0  Print Server

    hi all, Configuring for my Oracle Application Express Print Server in apex 3.0 I have used apache foa and made all steps in the documentation http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html the prin