Inner join command is not supporting pooled table

Hi Forum,
I'm new to abap. I tried passing fields of two tables into a single table using inner join command. But one of the tables is a pooled table so the command "inner join" is not supporting that. How to pass the fields in those two tables into a single table? Kindly help me out.
Rgrds,
Mahathi

Hi ....
U can't perform JOIN with Pooled or Cluster tables
trying to join A018 and KONP .... here A018 is Pooled table... Look at below threads...
Re: abap query join A018/KONP
Can't perform join table
Hope it will solve your problem..
<b>Reward points if useful.</b>
Thanks & Regards
ilesh 24x7

Similar Messages

  • Inner join command

    Hi Forum,
    How to use Inner join command?
    Please explain with an example.
    Thanks,
    Mahathi

    Inner Join and Outer Join
    The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join. With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. With an outer join, records are also selected for which there is no entry in some of the tables used in the view.
    The set of hits determined by an inner join can therefore be a subset of the hits determined with an outer join.
    Database views implement an inner join. The database therefore only provides those records for which there is an entry in all the tables used in the view. Help views and maintenance views, however, implement an outer join.
    Specifying Database Tables
    The FROM clause determines the database tables from which the data specified in the SELECT clause is read. You can specify either a single table or more than one table, linked using inner or outer joins. The names of database tables may be specified statically or dynamically, and you can use alias names. You can also use the FROM clause to bypass the SAP buffer and restrict the number of lines to be read from the database.
    "Database table" can equally mean an ABAP Dictionary view. A view links two or more database tables in the ABAP Dictionary, providing a static join that is available systemwide. You can specify the name of a view wherever the name of a database table may occur in the FROM clause.
    The FROM clause has two parts - one for specifying database tables, and one for other additions:
    SELECT... FROM <tables> <options>...
    In <tables>, you specify the names of database tables and define joins. <options> allows you to specify further additions that control the database access.
    Specifying Database Tables Statically
    To specify the name of a database table statically, use the following:
    SELECT... FROM <dbtab> [AS <alias>] <options> . ..
    The database table <dbtab> must exist in the ABAP Dictionary. The AS addition allows you to specify an alternative name <alias> that you can then use in the SELECT; FROM, WHERE, and GROUP BY clauses. This can eliminate ambiguity when you use more than one database table, especially when you use a single database table more than once in a join. Once you have defined an alias, you may no longer use the real name of the database table
    Specifying Database Tables Dynamically
    To specify the name of a database table dynamically, use the following:
    SELECT... FROM (<name>) <options> . ..
    The field <name> must contain the name of a database table in the ABAP Dictionary. The table name must be written in uppercase. When you specify the name of a database table dynamically, you cannot use an empty INTO clause to read all of the columns into the work area <dbtab>. It is also not possible to use alternative table names.
    Specifying Two or More Database Tables as an Inner Join
    In a relational database, you normally need to read data simultaneously from more than one database table into an application program. You can read from more than one table in a single SELECT statement, such that the data in the tables all has to meet the same conditions, using the following join expression:
    SELECT...
      FROM <tab> [INNER] JOIN <dbtab> [AS <alias>] ON <cond> <options>
    where <dbtab> is a single database table and <tab> is either a table or another join expression. The database tables can be specified statically or dynamically as described above. You may also use aliases. You can enclose each join expression in parentheses. The INNER addition is optional.
    A join expression links each line of <tab> with the lines in <dbtab> that meet the condition <cond>. This means that there is always one or more lines from the right-hand table that is linked to each line from the left-hand table by the join. If <dbtab> does not contain any lines that meet the condition <cond>, the line from <tab> is not included in the selection.
    The syntax of the <cond> condition is like that of the WHERE clause, although individual comparisons can only be linked using AND. Furthermore, each comparison must contain a column from the right-hand table <dbtab>. It does not matter on which side of the comparison it occurs. For the column names in the comparison, you can use the same names that occur in the SELECT clause, to differentiate columns from different database tables that have the same names.
    The comparisons in the condition <cond> can appear in the WHERE clause instead of the ON clause, since both clauses are applied equally to the temporary table containing all of the lines resulting from the join. However, each join must contain at least one comparison in the condition <cond>.
    Specifying Two or More Database Tables as a Left Outer Join
    In an inner join, a line from the left-hand database table or join is only included in the selection if there is one or more lines in the right-hand database table that meet the ON condition <cond>. The left outer join, on the other hand, reads lines from the left-hand database table or join even if there is no corresponding line in the right-hand table.
    SELECT...
      FROM <tab> LEFT [OUTER] JOIN <dbtab> [AS <alias>] ON <cond>
           <options>
    <tab> and <dbtab> are subject to the same rules and conditions as in an inner join. The OUTER addition is optional. The tables are linked in the same way as the inner join with the one exception that all lines selected from <tab> are included in the final selection. If <dbtab> does not contain any lines that meet the condition <cond>, the system includes a single line in the selection whose columns from <dbtab> are filled with null values.
    In the left outer join, more restrictions apply to the condition <cond> than in the inner join. In addition to the above restrictions:
    EQ or = is the only permitted relational operator.
    There must be at least one comparison between columns from <tab> and <dbtab>.
    The WHERE clause may not contain any comparisons with columns from <dbtab>. All comparisons using columns from <dbtab> must appear in the condition <cond>.
    Client Handling
    As already mentioned, you can switch off the automatic client handling in Open SQL statements using a special addition. In the SELECT statement, the addition comes after the options in the FROM clause:
    SELECT... FROM <tables> CLIENT SPECIFIED. ..
    If you use this addition, you can then address the client fields in the individual clauses of the SELECT statement.
    Disabling Data Buffering
    If buffering is allowed for a table in the ABAP Dictionary, the SELECT statement always reads the data from the buffer in the database interface of the current application server. To read data directly from the database table instead of from the buffer, use the following:
    SELECT... FROM <tables> BYPASSING BUFFER. ..
    This addition guarantees that the data you read is the most up to date. However, as a rule, only data that does not change frequently should be buffered, and using the buffer where appropriate improves performance. You should therefore only use this option where really necessary.
    Restricting the Number of Lines
    To restrict the absolute number of lines included in the selection, use the following:
    SELECT... FROM <tables> UP TO <n> ROWS. ..
    If <n> is a positive integer, the system reads a maximum of <n> lines. If <n> is zero, the system reads all lines that meet the selection criteria. If you use the ORDER BY clause as well, the system reads all lines belonging to the selection, sorts them, and then places the first <n> lines in the selection set.
    Examples
    Specifying a database table statically:
    REPORT demo_select_static_database.
    DATA wa TYPE scarr.
    SELECT *
      INTO wa
      FROM scarr UP TO 4 ROWS.
      WRITE: / wa-carrid, wa-carrname.
    ENDSELECT.
    The output is:
    The system reads four lines from the database table SCARR.
    Specifying a database table dynamically:
    REPORT demo_select_dynamic_database.
    DATA wa TYPE scarr.
    DATA name(10) TYPE c VALUE 'SCARR'.
    SELECT  *
      INTO  wa
      FROM  (name) CLIENT SPECIFIED
      WHERE mandt = '000'.
      WRITE: / wa-carrid, wa-carrname.
    ENDSELECT.
    A condition for the MANDT field is allowed, since the example uses the CLIENT SPECIFIED option. If NAME had contained the value ‘scarr’ instead of ‘SCARR’, a runtime error would have occurred.
    Inner join:
    REPORT demo_select_inner_join.
    DATA: BEGIN OF wa,
            carrid TYPE spfli-carrid,
            connid TYPE spfli-connid,
            fldate TYPE sflight-fldate,
            bookid TYPE sbook-bookid,
          END OF wa,
          itab LIKE SORTED TABLE OF wa
                    WITH UNIQUE KEY carrid connid fldate bookid.
    SELECT  pcarrid pconnid ffldate bbookid
      INTO  CORRESPONDING FIELDS OF TABLE itab
      FROM  ( ( spfli AS p
                INNER JOIN sflight AS f ON pcarrid = fcarrid AND
                                           pconnid = fconnid    )
                INNER JOIN sbook   AS b ON bcarrid = fcarrid AND
                                           bconnid = fconnid AND
                                           bfldate = ffldate     )
      WHERE p~cityfrom = 'FRANKFURT' AND
            p~cityto   = 'NEW YORK'  AND
            fseatsmax > fseatsocc.
    LOOP AT itab INTO wa.
      AT NEW fldate.
        WRITE: / wa-carrid, wa-connid, wa-fldate.
    ENDAT.
      WRITE / wa-bookid.
    ENDLOOP.
    This example links the columns CARRID, CONNID, FLDATE, and BOOKID of the table SPFLI, SFLIGHT, and SBOOK, and creates a list of booking numbers for all flights from Frankfurt to New York that are not fully booked. An alias name is assigned to each table.
    Left outer join:
    REPORT demo_select_left_outer_join.
    DATA: BEGIN OF wa,
            carrid   TYPE scarr-carrid,
            carrname TYPE scarr-carrname,
            connid   TYPE spfli-connid,
          END OF wa,
          itab LIKE SORTED TABLE OF wa
                    WITH NON-UNIQUE KEY carrid.
    SELECT scarrid scarrname p~connid
      INTO CORRESPONDING FIELDS OF TABLE itab
      FROM scarr AS s
           LEFT OUTER JOIN spfli AS p ON scarrid   =  pcarrid AND
                                         p~cityfrom = 'FRANKFURT'.
    LOOP AT itab INTO wa.
      WRITE: / wa-carrid, wa-carrname, wa-connid.
    ENDLOOP.
    The output might look like this:
    The example links the columns CARRID, CARRNAME, and CONNID of the tables SCARR and SPFLI using the condition in the left outer join that the airline must fly from Frankfurt. All other airlines have a null value in the CONNID column in the selection.
    If the left outer join is replaced with an inner join, the list looks like this:
    Only lines that fulfill the ON condition are included in the selection.

  • Inner join query used with 7 Database tables

    HI All,
    In a report they used the Inner join Query with 6 Data base table..now there is a performance issue with at query.
    its taking so much of time to trigger that query. Please help how to avoid that performance issue for that.
    In that 2 database tables containing lakhs of records..
    According to my knowledge it can be avoided by using secondary indexs for those 2 database tables..
    and by replacing the Inner join Query with FOR ALL ENTRIES statement.
    i want how to use the logic by using FORALL ENTRIES statement for this..
    So, please give you proper suggestion to avoid this issue..
    Thanking you.
    Moderator message: Please Read before Posting in the Performance and Tuning Forum
    Edited by: Thomas Zloch on Oct 16, 2011 10:27 PM

    Hi,
    And what do you mean with "they used"? If "SAP used" then yo will need to ask a SAP for note
    FOR ALL ENTRIES is quite good described in help. Please search forum also.
    Without query it won't be possible to tell how it can be optimized, however you can try to use SE30/SAT and ST05. Maybe it will help you.
    BR
    Marcin Cholewczuk

  • Why Segment shrink is not supported for tables with function-based indexes

    As we all know , Segment shrink is not supported for tables with function-based indexes.
    But i'm very confused .
    Why Segment shrink is not supported for tables with function-based indexes ?? what's its essential?

    Creating a function based index creates a hidden virtual column (you'll see it if you query user_tab_cols) and once you index a virtual column you can no longer shrink the table:orcl> create table t1(c1 number,c2 as (c1 * 2)) segment creation immediate;
    Table created.
    orcl> alter table t1 enable row movement;
    Table altered.
    orcl>
    orcl> alter table t1 shrink space;
    Table altered.
    orcl> create index i2 on t1(c2);
    Index created.
    orcl> alter table t1 shrink space;
    alter table t1 shrink space
    ERROR at line 1:
    ORA-10631: SHRINK clause should not be specified for this object
    orcl>so the issue is not with function based indexes per se, it is a level beneath that. Perhaps because the virtual column has no physical existance, when the row is moved there is no reason for Oracle to realize that an index needs updating? I haven't attempted to reverse engineer this, I would be interested to know if anyone else has.

  • MS Access Update Inner Join command conversion

    I have code in a Microsoft Access Database View, that I'm trying to convert to Oracle. I tried using Oracle SQL Developer's Migration tool and it basically skipped this command.
    Update Table1 INNER JOIN Table2 On Table1.COL1 = Table2.COL2 SET Table1.COL3 = 1;
    I've tried a number of things including selecting all the rows with something like
    select * from Table1 o inner join Table2 t on o.COL1 = t.COL2
    and then trying to somehow hook it to an update command where the command gets the above results and does a Table1.COL3 = 1 on all of those rows.
    However I can't get the syntax correct.
    Can someone please help?
    Thanks,
    Jeff
    BTW: The code is in a MS Access view but probably belongs in a stored procedure. It also uses a Access-only Boolean instead of 1, which may be part of the reason the command conversion failed.

    maybe this?
    Update Table1
       set Table1.COL3 = 1
    Where Table1.col1 in (select table2.col2 from table2);
    or
    Update Table1
       set Table1.COL3 = 1
    Where exists (select 'x'
                     from table2
                    where table2.col2 = table1.col1);note: untested.

  • Inner Join or Merge in a single Table?

    I have a Single table with
    City            date               type     vlCC       vlVV       
        key
    London    24-01-2014        CC       blue                         key1
    London    25-01-2014        VV                    yellow         key4
    London    24-01-2014        VV                    green          key2
    Lisbon     24-01-2014        CC       green                     
     key5
    Lisbon     24-01-2014        VV                     red           
     key6
    London    25-01-2014        CC       black                        key3
    My first approach was a inner join but hanged here.
    SELECT distinct p.city, p.date, p.type FROM Cities AS P INNER JOIN Cities AS P2
    ON P.City = P2.City AND P.Date = P2.Date   AND P.type <> P2.type and P.Date > GETDATE() order by   p.city, p.date,  p.type
    My wanted output is
    London     24-01-2014       blue        green      key1      key2
    Lisbon      24-01-2014        green      red          key5      key6
    London     25-01-2014       black       yellow     key3      key4
    (ordered by   p.city, p.date,  p.type)
    It means I want to "merge" the rows by city and date and order it like that (city,date )
    Thanks

    I have included solutions posted earlier (make them all work) and they can return what you need. 
    It seems the solution Latheesh provided with Max(Case...) works faster  by viewing their execution plan with this sample data.
    Thanks for everyone's input. I have combined all queries in one script now:
    Create Table Test(City varchar(50),date Date, type Char(2), vlCC varchar(100),vlVV varchar(100),[key] Varchar(10))
    Insert into Test Values
    ('London','01/24/2014','CC','blue','','key1'),
    ('London','01-25-2014','VV','','yellow','key4'),
    ('London','01-24-2014','VV','','green','key2'),
    ('Lisbon','01-24-2014','CC','green','','key5'),
    ('Lisbon','01-24-2014','VV','','red','key6'),
    ('London','01-25-2014','CC','black','','key3')
    ,('Lisbon','01-26-2014','cc','','violet','key7'),
    ('London','01-27-2014','vv','yellow','','key8')
    --Latheesh
    Select City,date,vLcc,vLcc, ccKey, vvKey FROM (
    Select City,date
    ,MAX (vlCC) as vLcc
    ,MAX (vlVV) as vLvv
    ,MAX(Case when type = 'cc' then [Key] else null end) ccKey
    ,MAX(Case when type = 'vv' then [Key] else null end) vvKey
    From Test
    Group by City,date) t
    WHERE ccKey+vvKey IS Not NULL
    Order by Date, City DESC
    --Visakh16
    Select * from (SELECT COALESCE(t1.city,t2.city) AS city,
    COALESCE(t1.date,t2.date) AS date,
    t1.vlCC,
    t2.vlVV,
    t1.[key] as key1,
    t2.[key] as key2
    FROM Test t1
    FULL JOIN Test t2
    On t2.city = t1.city
    AND t2.date = t1.date
    AND t2.type = 'vv'
    AND t1.type = 'cc') t
    WHERE key1+key2 IS Not NULL
    Order by Date, City DESC
    --eralper
    ; with cte as (
    select *, rn = ROW_NUMBER() over (partition by city, date order by type) from test
    SELECT * FROM (
    select distinct
    city,
    date,
    max(vlCC) over (partition by city, date) as vlCC,
    max(vlVV) over (partition by city, date) as vlVV,
    key1 = max(case when rn = 1 then [key] else null end) over (partition by city, date),
    key2 = max(case when rn = 2 then [key] else null end) over (partition by city, date)
    from cte) t
    WHERE key1+key2 is not null
    --Jayakumaur
    ;with cte
    as
    select City,Date,max(vlCC) vlCC,max(vlVV) vlVV
    From test
    group by city,date
    ,cte1
    as
    select city,date,[key]
    from test
    select city,date,vlCC,vlVV,[1] as keya,[2] as keyb
    from
    select c.* ,a.[key],row_number() over(partition by c.city,c.date order by [key]) rn
    from cte c
    inner join cte1 a on c.city=a.city and c.date=a.date
    ) tab
    PIVOT
    max([key]) for rn in([1],[2])
    ) pvt
    WHERE [1] +[2] IS Not NULL
    Order by Date, City DESC
    Drop table Test

  • Error in inner join when i am using 3 tables to join..

    hi,
    why error is giving when i am joining 3 tables ..
    tables : lfa1,lfb1,lfm1.
    types : begin of ty_lfa1,
              lifnr type lfa1-lifnr,
             name1 type lfa1-name1,
             bukrs type lfb1-bukrs,
               erdat type lfm1-erdat,
            end of ty_lfa1.
    data :   i_lfa1 type ty_lfa1 occurs 1.
    select a~lifnr
           a~name1
           b~bukrs
           m~erdat
    into table i_lfa1
           from ((lfa1 as a inner join lfb1 as b on alifnr = blifnr) inner join lfm1 as m on alifnr = mlifnr).
    error : The table name "((LFA1 AS A INNER JOIN LFB1 AS B ON ALIFNR = BLIFNR)          
    INNER JOIN LFM1 AS M ON ALIFNR = MLIFNR)" is too long . unique.          
    unique. unique. unique. unique. unique.          
    plz help me ...why it is showing..
    thanks & regards ,
    kalyan

    Hi Kalyan,
      Do it this way: In your code just give the space between (  & (  & lfa1 and also at the end ~lifnr )
    select a~lifnr
    a~name1
    b~bukrs
    m~erdat
    into table i_lfa1
    from ( ( lfa1 as a inner join lfb1 as b on a~lifnr eq b~lifnr ) " maintain a space bwteen ( and field
    inner join lfm1 as m on a~lifnr eq m~lifnr ).
    or
    select a~lifnr
    a~name1
    b~bukrs
    m~erdat
    into table i_lfa1
    from lfa1 as a inner join lfb1 as b
      on a~lifnr eq b~lifnr
         inner join lfm1 as m
      on a~lifnr eq m~lifnr.
    With luck,
    Pritam.
    Edited by: Pritam Ghosh on Jan 13, 2009 2:31 PM

  • HotSync Exchange synchronization aborted, Protocol Error: The requested command is not supported (4019)

    null
    Post relates to: Treo 755p (Verizon)

    What application are you trying to install? Or what application did you just install?
    Post relates to: None

  • Inner Join of 3 tables is correct or not?

    Hi Guys ,
                 I have a requirement where i have to join 3 tables i  dont know whether the inner Join which i wrote for 3 tables is correct or not.I am not getting any Syntax error but whether the logci below which i wrote gets all the records or not.
    The Requirement is
    "c.     Select the BOL Number entered in the screen and query the table LIKP with the BOL number in the field LIKP-BOLNR.  Gather the list of ALL delivery documents (LIKP-VBELN) that is outputted.
    d.     Query the list of the delivery documents obtained into the table VBFA in the field VBFA- VBELV.  From the output that is displayed, select the Follow-On Document Field (VBFA-VBELN) for that item whose Subsequent Document Category (VBFA- VBTYP_N) is R and the Movement Type (VBFA- BWART) is 641.  Get the Follow-On document number for each of the above Delivery Document number.
    e.     Query the table EKBE with the Follow On document obtained above in the field Material Document (EKBE- BELNR).  Perform this activity for each of the follow on document obtained above.  Get the resultant Purchase Order (EKBE-EBELN) and Item Number (EKBE-EBELP) from the query.  After querying will all the Follow-On Documents, get the unique list of PO number and Item Number.
    The logic which i wrote is
                    Begin of t_PoolSTO_out,
                  BOLNR type LIKP-BOLNR,
                  EBELN type EKBE-EBELN,
                  EBELP type EKBE-EBELP,
                  VBELN type LIKP-VBELN,
                  VBELNV type VBFA-VBELN,
             End of t_PoolSTO_out.
          Data: i_PoolSTO type Standard table of t_PoolSTO_out.
      Select
            a~BOLNR
            c~EBELN
            c~EBELP
            a~VBELN
            b~VBELN
            from LIKP as a
            Inner Join VBFA as b on aVBELN = bVBELV
            Inner Join EKBE as c on bVBELN = cBELNR
            into Table i_PoolSTO
            Where a~BOLNR in S_LBLNE and
                  b~VBTYP_N = 'R' and
                  b~BWART = '641'.
              My doubt is whether the logic works or not i Mean does i getall the rrecords based on the requirement.?
                      If not please tell any alternative logic?
    Thanks,
    Gopi Anne.

    Hi Gopi,
    Your code is Good.
    But try to avoid Inner join with more number of Tables ...because this is a performance issue..
    try to use..
    select (primary key fields mainly,other fields) from LIKP into itab where bolnr in p_bolnr(paramater).
    next try to use for all entries option..
    select (primary key fields mainly,other fields) from VBFA for all entries in itab where (give the condition)....
    simillarly do for the other select ....ok this will try to reduce the performance issue....
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • Please tell me the  Three table INNER JOIN Sql statement

    Hi experts,
      I got requirement like by using INNER JOIN i have to write the code in MY program i.e using 3 tables VBAK VBAP and VBUK.And the common field is VBELN .SO please give the  INNER JOIN SQL statement for above three tables...
    vbak-vbeln,erdat
    vbap-vbeln,posnr
    vbuk-vbeln,RFSTK
    Thanks in Advance

    hi guglani  please see my total code b.caus DATA is not extracting...once see the code  correct error.
    DATA:V_VBELN TYPE VBAK-VBELN.      "VBAK,VBAP AND VBUK
    SELECT-OPTIONS SORDER FOR V_VBELN.
    TYPES:BEGIN OF T_VBAK,
         VBELN TYPE VBELN_VA,
         ERDAT TYPE ERDAT,
      END OF T_VBAK.
    TYPES:BEGIN OF T_VBAP,
           VBELN TYPE VBELN_VA,
            POSNR TYPE POSNR_VA,
      END OF T_VBAP.
    TYPES:BEGIN OF T_VBUK,
        VBELN TYPE VBELN,
      RFSTK TYPE RFSTK,
      END OF T_VBUK.
    TYPES:BEGIN OF FS,
       VBELN TYPE VBELN_VA,
         ERDAT TYPE ERDAT,
    POSNR TYPE POSNR_VA,
      RFSTK TYPE RFSTK,
      END OF FS.
    DATA:WA1 TYPE T_VBAK,
         WA2 TYPE T_VBAP,
         WA3 TYPE T_VBUK,
         WA TYPE FS.
    DATA:ITAB1 TYPE TABLE OF T_VBAK,
          ITAB2 TYPE TABLE OF T_VBAP,
          ITAB3 TYPE TABLE OF T_VBUK,
          ITAB TYPE TABLE OF FS.
    select a~vbeln a~erdat b~posnr c~rfstk
           from vbak as a inner join vbAP as b on a~vbeln = b~vbeln
                          inner join vbuk as c on a~vbeln = c~vbeln
    into table itab
    where A~vbeln eq SORDER.
    IF NOT ITAB IS INITIAL.
      SORT ITAB BY VBELN.
    ENDIF.
    LOOP AT ITAB INTO WA.
       WRITE:/ WA-VBELN,WA-ERDAT,WA-rfstk.
       ENDLOOP.
       CLEAR WA.
       REFRESH ITAB.

  • Inner join-select -primary key in table issue

    Hi ,
            Iam using FEBKO(header) and FEBEP(item) in inner join  select .But the datas fetching by this selct in not correct.The analysis is the is no common primary fields in the both table.
    Question 1-> Can i use inner join without common primary key in the both tables, weather it possible to make a select without common primary key in both table. Please kindly let me know.
    Question 2-> What is the other possible way to give the selct for both table(better performance)
    Regards,
    Veera

    Hi,
    When you use INNER JOIN in this case, link your tables based on KUKEY and ESNUM fields, bcoz there can be many items under a single header. So this will work for you, even from the performance point of view.
    Hope this is helpful to you. If you need further information, revert back.
    Reward all the helpful answers.
    Regards
    Nagaraj T

  • Joining transparent and pool tables.

    Friends,
    I Had to join 7 tables in which 6 are the transparent tables 1 is the pool table. I had declared 3 internal tables one for data from 6  transparent table(JOIN) second for data from pool table third for combining and saving data from both tables into single table. I had written following cide. But its giving errors. I am unable to locate where i made the mistake.
    Also is it possible to join two INTERNAL tables?
    TABLES: EKKO,EKPO,MAKT,LFA1,MSEG,EKET,KONV.
    TYPES: BEGIN OF TAB1,
    BUKRS TYPE EKKO-BUKRS,
    EKORG TYPE EKKO-EKORG,
    BSART TYPE EKKO-BSART,
    LIFNR TYPE EKKO-LIFNR,
    KNUMV TYPE EKKO-KNUMV,
    MATNR TYPE EKPO-MATNR,
    MATKL TYPE EKPO-MATKL,
    WERKS TYPE EKPO-WERKS,
    MENGE TYPE EKPO-MENGE,
    KO_PRCTR TYPE EKPO-KO_PRCTR,
    EINDT TYPE EKET-EINDT,
    MAKTX TYPE MAKT-MAKTX,
    NAME1 TYPE LFA1-NAME1,
      end of TAB1.
      DATA: ITAB1 type table of TAB1,
            WA1 like line of ITAB1.
      TYPES:begin of TAB2,
        KNUMV TYPE KONV-KNUMV,
      KSCHL TYPE KONV-KSCHL,
    KBETR TYPE KONV-KBETR,
    END OF TAB2.
      DATA:ITAB2 type table of TAB2,
            WA2 like line of ITAB2.
    TYPES : BEGIN OF TAB4,
    BUKRS TYPE EKKO-BUKRS,
    EKORG TYPE EKKO-EKORG,
    BSART TYPE EKKO-BSART,
    LIFNR TYPE EKKO-LIFNR,
    MATNR TYPE EKPO-MATNR,
    MATKL TYPE EKPO-MATKL,
    WERKS TYPE EKPO-WERKS,
    MENGE TYPE EKPO-MENGE,
    KO_PRCTR TYPE EKPO-KO_PRCTR,
    EINDT TYPE EKET-EINDT,
    MAKTX TYPE MAKT-MAKTX,
    NAME1 TYPE LFA1-NAME1,
    KSCHL TYPE KONV-KSCHL,
    KBETR TYPE KONV-KBETR,
    END OF TAB4.
    DATA: ITAB4 type table of TAB4,
          WA4 LIKE ITAB4.
    *select a1-bukrs a1 ekorg a1-bsart a1-lifnr b1-matnr b1-matkl b1-werks b1-menge b1-ko_prctr
    c1-eindt d1-maktx e1-name1 f1-menge into corresponding fields of table ITAB up to 50 rows
    from(((((( ekko as a1 INNER JOIN ekpo as b1 on a1ebeln = b1ebeln) inner join eket as c1 on
    a1ebeln = c1ebeln and b1ebelp = c1ebelp) inner join makt as d1 on b1matnr = d1matnr) inner join LFA1 as e1
    on a1lifnr = e1lifnr) inner join mseg as f1 on a1lifnr = f1lifnr and a1ebeln = f1ebeln and b1matnr = f1matnr
    and b1werks = f1werks and b1ebelp = f1ebelp) inner join konv as g1 on a1knumv = g1knumv) .
    select a1bukrs a1ekorg a1bsart a1lifnr b1matnr b1matkl b1werks b1menge b1~ko_prctr
      c1eindt d1maktx e1name1 f1menge into corresponding fields of table ITAB1
      from ((((( ekko as a1 INNER JOIN ekpo as b1 on a1ebeln = b1ebeln) inner join eket as c1 on
      a1ebeln = c1ebeln and b1ebelp = c1ebelp) inner join makt as d1 on b1matnr = d1matnr)
      inner join LFA1 as e1 on a1lifnr = e1lifnr) inner join mseg as f1 on a1lifnr = f1lifnr and a1ebeln = f1ebeln and b1matnr = f1matnr
      and b1werks = f1werks and b1ebelp = f1ebelp).
    *select * from ITAB1 into WA1.
    select KSCHL KBETR KNUMV into  TABLE ITAB2
    from KONV for all entries in ITAB1 where ITAB1-KNUMV  = KNUMV~KNUMV .
      select abukrs aekorg absart alifnr amatnr amatkl awerks amenge ako_prctr aeindt
        amaktx aname1 a~menge
        bkschl bkbetr into corresponding fields of table ITAB4
        from ( ITAB1 as a INNER JOIN ITAB2 as b on aKNUMV = bKNUMV ).
    LOOP AT ITAB4 INTO WA_ITAB.
    WRITE : / WA_ITAB-BUKRS,WA_ITAB-MATNR,WA_ITAB-EINDT,WA_ITAB-MAKTX ,WA_ITAB-NAME1 ,WA_ITAB-KSCHL,
    WA_ITAB-KBETR,WA_ITAB-MENGE.
    ENDLOOP.

    You have too many parentheses in your JOIN condiiton. Your FAE condition is incorrect. And no, you cannot do a JOIN on internal tables.
    Please do an F1 on SELECT.
    Rob

  • Inner join inside a internal table loop

    Hello to all,
    I have this internal table in which i have selected some records for particular coulms. For  the rest of the colums i need to join 3 tables for the data. I had in mind, of looping the internal table and then having a inner join query and  modifying the internal table(all inside the loop) Just wanted to know, whether its a qood practice performance wise ? IF not, what are the alternatives ..
    Thanks,
    Shehryar Dahar

    shehryar,
      say You have internal table ITAB.Already some columns are updated in internal table.say A,B,C,D.
    To fill rest of the columns(E,F,G) you need inter join.
    write the inner join of the table for all entries of itab where A eq itab-A.
    LOOP ITAB.
        READ TABLE ITAB1  WITH KEY X = ITAB-X.
       IF SY-SUBRC EQ 0.
         move  ITAB record to I_FINAL.
         move itab1 records to i_final.
        append i_final.
       clear i_final.
      ENDIF. 
    ENDLOOP.
    Don't forget to reward if useful...

  • WbAdmin Delete Backup command not supported in 8.1 Pro x64

    Hello
    I've searched for how to delete specific backups that I've created using the elevated Power Shell command "wbAdmin start backup -backupTarget:E: -include:C: -allCritical -quiet" but I've run into a roadblock.
    The problem is that none
    of the "wbadmin delete xxx" commands are actually supported in Win8.1 Pro 64-bit (6.3, Build 9600). If I type "wbadmin delete /?", I get:
    ---- Commands Supported ----
    DELETE CATALOG                     -- Deletes the backup catalog.
    DELETE SYSTEMSTATEBACKUP  -- Deletes one or more system state backups.
    DELETE BACKUP                       -- Deletes one or more backups.
    However, when I try to use ANY delete command (for example, to delete a specific backup version that was identified using "Wbadmin get versions"), I get this error:
    PS C:\WINDOWS\system32> wbadmin delete backup -version:06/26/2014-07:29
    wbadmin 1.0 - Backup command-line tool
    (C) Copyright 2013 Microsoft Corporation. All rights reserved.
    Warning:  The DELETE BACKUP command is not supported in this version of Windows.
    The operation ended before completion.
    The same thing happens if I use -deleteOldest, with or without the -backupTarget switch.
    Does anyone know why the Delete command is not available on 8.1? Is there a patch, workaround or alternate method of deleting specific backup images?

    Yolanda, thank you for confirming the issue and for pointing me to a solution. I really appreciate it!
    I have looked at the cmdlet reference page tried to use the commands but it appears that they do not work on my system. For example:
    PS C:\WINDOWS\system32> remove-wbcatalog
    remove-wbcatalog : The term 'remove-wbcatalog' is not recognized as the name of a cmdlet, function, script file, or
    operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
    again.
    At line:1 char:1
    + remove-wbcatalog
    + ~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (remove-wbcatalog:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    Also, if I type the help command listed on the reference page, get-help -module windowsserverbackup, the only reponse is a blank command prompt. Do I need to install the windowsserverbackup functionality separately? It does not seem
    to be built-in.

  • How to use inner joins for 4 0r 5 tables

    Hai Experts,
    plz check my code, n plz help to inner join all the tables
    TYPES : BEGIN OF ITAB,
           EBELN TYPE EKKO-EBELN,            "P.O.NUMBER
           AEDAT TYPE EKKO-AEDAT,            "DATE
           BPRME TYPE EKPO-BPRME,            "UNIT PRICE
           MENGE TYPE EKPO-MENGE,            "Purchase order quantity
           WERKS TYPE EKPO-WERKS,            "PLANT
           BRTWR TYPE EKPO-BRTWR,            "Gross order value in PO
           STRAS TYPE LFA1-STRAS,            "House number and street
           LIFNR TYPE LFA1-LIFNR,            "VENDOR NO
           NAME1 TYPE LFA1-NAME1,            "V NAME
           ORT01 TYPE LFA1-ORT01,            "CITY
           LAND1 TYPE LFA1-LAND1,            "LAND
           PSTLZ TYPE LFA1-PSTLZ,             "POSTAL CODE
           MAKTX TYPE MAKT-MAKTX,            "DESCRIPTION
    END OF ITAB.
    <b>and i got stucked here:</b>
    <u></u>
    SELECT EKKO~EBELN
             EKKO~AEDAT
             EKPO~BPRME
             EKPO~MENGE
             EKPO~WERKS
             EKPO~BRTWR
             LFA1~LIFNR
             LFA1~STRAS
             LFA1~NAME1
             LFA1~ORT01
             LFA1~LAND1
             LFA1~PSTLZ
             MAKT~MAKTX
             INTO TABLE ITAB
             FROM EKKO
             INNER JOIN EKPO LFA1 T001W MAKT
             ON EKKOEBELN = EKPOEBELN
                EKKO~EBELN
             WHERE EKKO~EBELN IN S_EBELN.

    hi Rajesh,
    you have to join the tables one by one:
    SELECT ekko~ebeln
                 ekko~aedat
                 ekpo~bprme
                 ekpo~menge
                 ekpo~werks
                 ekpo~brtwr
                 lfa1~lifnr
                 lfa1~stras
                 lfa1~name1
                 lfa1~ort01
                 lfa1~land1
                 lfa1~pstlz
                 makt~maktx
    INTO TABLE itab
    FROM ekko AS ekko
    INNER JOIN ekpo AS ekpo
    ON ekkoebeln EQ ekpoebeln
    INNER JOIN lfa1 AS lfa1
    ON ekkolifnr EQ lfa1lifnr
    INNER JOIN t001w AS t001w
    ON ekpowerks EQ t001wwerks
    INNER JOIN makt AS makt
    ON ekpomatnr EQ MAKTmatnr
    WHERE ekko~ebeln IN s_ebeln.
    This is the complete SELECT. BUT! The performance will be much better if you take out T001W and MAKT from the INNER JOIN. Do select on these tables in separate steps and merge the internal tables afterwards.
    hope this helps
    ec

Maybe you are looking for

  • File not getting created in a different server

    My requirement. I have written a code in the BI system and now need to write an empty file (say a.done)in a directory /interfaces of PI system. I wrote using open data set and close data set however the file (a.done) is not getting created in the PI

  • Resize a Digital Signature

    Is it possible to resize a digital signature after it has been placed in the document?

  • Is There a way I can make a free password protected website with iWeb?

    Hi! I've been thinking to myself, "I want to make a free website". But I want it passcode protected and free. I am a mac kind of person so is there a way I can make a free passcode protected website with iWeb? I knwo you use to be able to do it with

  • EBS - 12  XMLP (5.6.3)  cannot use CLOBS  ?????

    Hello: I am being told by Metalink Support the following: " Bi Publisher 5.6.3 (10.1.3.2.0) does not have native support for CLOB. This comes in BI Publisher Enterprise 10.1.3.3.0. There are no plans at this time to upgrade EBS to higher versions of

  • BAPI/FM to Create Projects from Templates

    Is there any BAPI/FM that can create Operative Project Structures referring the Standard WBS including all objects i.e, WBS,N/W,Activities,Milestone of standard project? If not, what could be the work around? Regards Sreenivas