How do we join cluster table bseg?

Friends ,
i just wanna know as 2 how can we combine bseg and bkpf tables.
since bkpf is a transparent table and bseg is a cluster table.
regards
Essam
[email protected]

Hi Essam,
    REPORT  ztestport_01.
TABLES : bkpf,
         bseg.
   INTERNAL TABLE AND WORK AREA FOR THE FIELDS IN BKPF TABLE         *
DATA : BEGIN OF itab_bkpf OCCURS 0,
       bukrs LIKE bkpf-bukrs,            "Company Code.
       gjahr LIKE bkpf-gjahr,            "Fiscal Year.
       budat LIKE bkpf-budat,            "Posting Date in the Document.
       belnr LIKE bkpf-belnr,            "Accounting document number.
       blart LIKE bkpf-blart,            "Document Type.
       END OF itab_bkpf.
DATA : wa_bkpf LIKE LINE OF itab_bkpf.
   INTERNAL TABLE AND WORK AREA FOR THE FIEDLS IN BSEG TABLE         *
DATA : BEGIN OF itab_bseg_debit OCCURS 0,
       bukrs LIKE bseg-bukrs,            "Company Code.
       gjahr LIKE bseg-gjahr,            "Fiscal Year.
       belnr LIKE bseg-belnr,            "Accounting Document Number.
       buzei LIKE bseg-buzei,            "Line Item.
       hkont LIKE bseg-hkont,            "General Leadger Account.
       shkzg LIKE bseg-shkzg,            "Credit/Debit Indicator.
       wrbtr LIKE bseg-wrbtr,            "Amount in Document Currency.
       pswsl LIKE bseg-pswsl,            "Update Currency for Gen.Ledger
       dmbtr LIKE bseg-dmbtr,            "Amount in local currency.
       sgtxt LIKE bseg-sgtxt,            "Item Text.
       zuonr LIKE bseg-zuonr,            "Assignment Number.
       END OF itab_bseg_debit.
DATA : itab_bseg_credit LIKE STANDARD TABLE OF itab_bseg_debit WITH
       HEADER LINE.
                  FINAL OUTPUT INTERNAL TABLE                        *
DATA : BEGIN OF itab_output OCCURS 0,
       belnr(08)            ,
       bukrs(04)            ,
       budat LIKE bkpf-budat,
       buzei(03)            ,
       hkont(07)            ,
       blart(02)            ,
       shkzg(01)            ,
       wrbtr(08)            ,
       pswsl(05)            ,
       dmbtr(10)            ,
       sgtxt(19)            ,
       zuonr(10)            ,
END OF itab_output.
CONSTANTS : c_debit  TYPE c VALUE 'S',
            c_credit TYPE c VALUE 'H'.
                           SELECT-OPTIONS                            *
SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE text-t01.
SELECT-OPTIONS : s_bukrs FOR bkpf-bukrs.
PARAMETERS     : p_year LIKE bkpf-gjahr visible length 2.
SELECT-OPTIONS : s_budat  FOR bkpf-budat,
                 s_dbacct FOR bseg-hkont,
                 s_cracct FOR bseg-hkont,
                 s_amt    FOR bseg-dmbtr.
SELECTION-SCREEN END OF BLOCK input.
     SELECTING RECORDS FROM BKPF TABLE BASED ON THE CONDITION        *
SELECT bukrs gjahr budat belnr blart
       FROM  bkpf INTO TABLE itab_bkpf
       WHERE bukrs IN s_bukrs AND
             gjahr EQ p_year  AND
             budat IN s_budat.
    SELECTING DEBIT LINE ITEMITEMS FROM BSEG FOR THE DOCUMENT        *
                  NUMBER SELECTED FROM BKPF                          *
IF NOT itab_bkpf[] IS INITIAL.
  SELECT bukrs gjahr belnr buzei
         hkont shkzg wrbtr pswsl
         dmbtr sgtxt zuonr
         FROM bseg INTO TABLE itab_bseg_debit
         FOR ALL ENTRIES IN itab_bkpf
         WHERE bukrs EQ itab_bkpf-bukrs AND
               belnr EQ itab_bkpf-belnr AND
               gjahr EQ itab_bkpf-gjahr AND
               hkont IN s_dbacct        AND
               shkzg EQ c_debit         AND
               dmbtr IN s_amt.
    SELECTING CREDIT LINE ITEMITEMS FROM BSEG FOR THE DOCUMENT       *
                  NUMBER SELECTED FROM BKPF                          *
  SELECT bukrs gjahr belnr buzei
         hkont shkzg wrbtr pswsl
         dmbtr sgtxt zuonr
         FROM bseg INTO TABLE itab_bseg_credit
         FOR ALL ENTRIES IN itab_bkpf
         WHERE bukrs EQ itab_bkpf-bukrs AND
               belnr EQ itab_bkpf-belnr AND
               gjahr EQ itab_bkpf-gjahr AND
               hkont IN s_cracct        AND
               shkzg EQ c_credit        AND
               dmbtr IN s_amt.
ENDIF.
SORT itab_bkpf        BY bukrs gjahr belnr.
SORT itab_bseg_credit BY bukrs gjahr belnr.
                     LOOPING THE DEBIT ENTRIES                       *
LOOP AT itab_bseg_debit.
READING THE CREDIT ENTRIES WHICH MATCHES WITH HE CURRENT DOC. NUMBER *
  READ TABLE itab_bseg_credit WITH KEY
             bukrs = itab_bseg_debit-bukrs
             gjahr = itab_bseg_debit-gjahr
             belnr = itab_bseg_debit-belnr BINARY SEARCH.
  IF sy-subrc EQ 0.
*READING THE POSTING DATE AND DOCUMENT TYPE FOR THE CURRENT DOUCMENT   *
       AND APPENDING THE DEBIT AND CREDIT ENTRIES                    *
    READ TABLE itab_bkpf INTO wa_bkpf WITH KEY
               bukrs = itab_bseg_debit-bukrs
               gjahr = itab_bseg_debit-gjahr
               belnr = itab_bseg_debit-belnr BINARY SEARCH.
    itab_output-belnr = itab_bseg_debit-belnr.
    itab_output-bukrs = itab_bseg_debit-bukrs.
    itab_output-budat = wa_bkpf-budat.
    itab_output-buzei = itab_bseg_debit-buzei.
    itab_output-hkont = itab_bseg_debit-hkont.
    itab_output-blart = wa_bkpf-blart.
    itab_output-shkzg = itab_bseg_debit-shkzg.
    itab_output-wrbtr = itab_bseg_debit-wrbtr.
    itab_output-pswsl = itab_bseg_debit-pswsl.
    itab_output-dmbtr = itab_bseg_debit-dmbtr.
    itab_output-sgtxt = itab_bseg_debit-sgtxt.
    itab_output-zuonr = itab_bseg_debit-zuonr.
    APPEND itab_output.
    itab_output-belnr = itab_bseg_credit-belnr.
    itab_output-bukrs = itab_bseg_credit-bukrs.
    itab_output-budat = wa_bkpf-budat.
    itab_output-buzei = itab_bseg_credit-buzei.
    itab_output-hkont = itab_bseg_credit-hkont.
    itab_output-blart = wa_bkpf-blart.
    itab_output-shkzg = itab_bseg_credit-shkzg.
    itab_output-wrbtr = itab_bseg_credit-wrbtr.
    itab_output-pswsl = itab_bseg_credit-pswsl.
    itab_output-dmbtr = itab_bseg_credit-dmbtr.
    itab_output-sgtxt = itab_bseg_credit-sgtxt.
    itab_output-zuonr = itab_bseg_credit-zuonr.
    APPEND itab_output.
  ENDIF.
ENDLOOP.
SORT itab_output BY belnr budat shkzg.
then loop your final itab_output
and give write command to print
your fields.
<b>Regards,
Jackie.</b>
Message was edited by:
        Jackie

Similar Messages

  • How to join cluster table?

    How to join the cluster table with the transparent table?In specific ,can you pls tell me how can i join bkpf and bseg?

    Hi Aravind,
    Check this code,
    tables : bkpf,
             bseg.
       INTERNAL TABLE AND WORK AREA FOR THE FIELDS IN BKPF TABLE         *
    data : begin of itab_bkpf occurs 0,
           bukrs like bkpf-bukrs,            "Company Code.
           gjahr like bkpf-gjahr,            "Fiscal Year.
           budat like bkpf-budat,            "Posting Date in the Document.
           belnr like bkpf-belnr,            "Accounting document number.
           blart like bkpf-blart,            "Document Type.
           end of itab_bkpf.
    data : wa_bkpf like line of itab_bkpf.
       INTERNAL TABLE AND WORK AREA FOR THE FIEDLS IN BSEG TABLE         *
    data : begin of itab_bseg_debit occurs 0,
           bukrs like bseg-bukrs,            "Company Code.
           gjahr like bseg-gjahr,            "Fiscal Year.
           belnr like bseg-belnr,            "Accounting Document Number.
           buzei like bseg-buzei,            "Line Item.
           hkont like bseg-hkont,            "General Leadger Account.
           shkzg like bseg-shkzg,            "Credit/Debit Indicator.
           wrbtr like bseg-wrbtr,            "Amount in Document Currency.
           pswsl like bseg-pswsl,            "Update Currency for Gen.Ledger
           dmbtr like bseg-dmbtr,            "Amount in local currency.
           sgtxt like bseg-sgtxt,            "Item Text.
           zuonr like bseg-zuonr,            "Assignment Number.
           end of itab_bseg_debit.
    data : itab_bseg_credit like standard table of itab_bseg_debit with
           header line.
                      FINAL OUTPUT INTERNAL TABLE                        *
    data : begin of itab_output occurs 0,
           belnr(08)            ,
           bukrs(04)            ,
           budat like bkpf-budat,
           buzei(03)            ,
           hkont(07)            ,
           blart(02)            ,
           shkzg(01)            ,
           wrbtr(08)            ,
           pswsl(05)            ,
           dmbtr(10)            ,
           sgtxt(19)            ,
           zuonr(10)            ,
    end of itab_output.
    constants : c_debit  type c value 'S',
                c_credit type c value 'H'.
                               SELECT-OPTIONS                            *
    selection-screen begin of block input with frame title text-t01.
    select-options : s_bukrs for bkpf-bukrs.
    parameters     : p_year like bkpf-gjahr visible length 2.
    select-options : s_budat  for bkpf-budat,
                     s_dbacct for bseg-hkont,
                     s_cracct for bseg-hkont,
                     s_amt    for bseg-dmbtr.
    selection-screen end of block input.
         SELECTING RECORDS FROM BKPF TABLE BASED ON THE CONDITION        *
    select bukrs gjahr budat belnr blart
           from  bkpf into table itab_bkpf
           where bukrs in s_bukrs and
                 gjahr eq p_year  and
                 budat in s_budat.
        SELECTING DEBIT LINE ITEMITEMS FROM BSEG FOR THE DOCUMENT        *
                      NUMBER SELECTED FROM BKPF                          *
    if not itab_bkpf[] is initial.
      select bukrs gjahr belnr buzei
             hkont shkzg wrbtr pswsl
             dmbtr sgtxt zuonr
             from bseg into table itab_bseg_debit
             for all entries in itab_bkpf
             where bukrs eq itab_bkpf-bukrs and
                   belnr eq itab_bkpf-belnr and
                   gjahr eq itab_bkpf-gjahr and
                   hkont in s_dbacct        and
                   shkzg eq c_debit         and
                   dmbtr in s_amt.
        SELECTING CREDIT LINE ITEMITEMS FROM BSEG FOR THE DOCUMENT       *
                      NUMBER SELECTED FROM BKPF                          *
      select bukrs gjahr belnr buzei
             hkont shkzg wrbtr pswsl
             dmbtr sgtxt zuonr
             from bseg into table itab_bseg_credit
             for all entries in itab_bkpf
             where bukrs eq itab_bkpf-bukrs and
                   belnr eq itab_bkpf-belnr and
                   gjahr eq itab_bkpf-gjahr and
                   hkont in s_cracct        and
                   shkzg eq c_credit        and
                   dmbtr in s_amt.
    endif.
    sort itab_bkpf        by bukrs gjahr belnr.
    sort itab_bseg_credit by bukrs gjahr belnr.
                         LOOPING THE DEBIT ENTRIES                       *
    loop at itab_bseg_debit.
    READING THE CREDIT ENTRIES WHICH MATCHES WITH HE CURRENT DOC. NUMBER *
      read table itab_bseg_credit with key
                 bukrs = itab_bseg_debit-bukrs
                 gjahr = itab_bseg_debit-gjahr
                 belnr = itab_bseg_debit-belnr binary search.
      if sy-subrc eq 0.
    *READING THE POSTING DATE AND DOCUMENT TYPE FOR THE CURRENT DOUCMENT   *
           AND APPENDING THE DEBIT AND CREDIT ENTRIES                    *
        read table itab_bkpf into wa_bkpf with key
                   bukrs = itab_bseg_debit-bukrs
                   gjahr = itab_bseg_debit-gjahr
                   belnr = itab_bseg_debit-belnr binary search.
        itab_output-belnr = itab_bseg_debit-belnr.
        itab_output-bukrs = itab_bseg_debit-bukrs.
        itab_output-budat = wa_bkpf-budat.
        itab_output-buzei = itab_bseg_debit-buzei.
        itab_output-hkont = itab_bseg_debit-hkont.
        itab_output-blart = wa_bkpf-blart.
        itab_output-shkzg = itab_bseg_debit-shkzg.
        itab_output-wrbtr = itab_bseg_debit-wrbtr.
        itab_output-pswsl = itab_bseg_debit-pswsl.
        itab_output-dmbtr = itab_bseg_debit-dmbtr.
        itab_output-sgtxt = itab_bseg_debit-sgtxt.
        itab_output-zuonr = itab_bseg_debit-zuonr.
        append itab_output.
        itab_output-belnr = itab_bseg_credit-belnr.
        itab_output-bukrs = itab_bseg_credit-bukrs.
        itab_output-budat = wa_bkpf-budat.
        itab_output-buzei = itab_bseg_credit-buzei.
        itab_output-hkont = itab_bseg_credit-hkont.
        itab_output-blart = wa_bkpf-blart.
        itab_output-shkzg = itab_bseg_credit-shkzg.
        itab_output-wrbtr = itab_bseg_credit-wrbtr.
        itab_output-pswsl = itab_bseg_credit-pswsl.
        itab_output-dmbtr = itab_bseg_credit-dmbtr.
        itab_output-sgtxt = itab_bseg_credit-sgtxt.
        itab_output-zuonr = itab_bseg_credit-zuonr.
        append itab_output.
      endif.
    endloop.
    sort itab_output by belnr budat shkzg.
                     LOOPING OUTPUT INTERNAL TABLE                       *
    *FORMAT INTENSIFIED INPUT.
    *FORMAT INVERSE ON.
    loop at itab_output.
      format hotspot on.
      format color 5 inverse.
      write :/  sy-vline,
               000 itab_output-belnr, 12  sy-vline,
               013 itab_output-bukrs, 17  sy-vline,
               019 itab_output-budat,     sy-vline,
               034 itab_output-buzei, 40  sy-vline,
               042 itab_output-hkont,     sy-vline,
               054 itab_output-blart, 60  sy-vline,
               065 itab_output-shkzg, 70  sy-vline,
               072 itab_output-wrbtr,     sy-vline,
               085 itab_output-pswsl,     sy-vline,
               093 itab_output-dmbtr,     sy-vline,
               106 itab_output-sgtxt,     sy-vline,
                   itab_output-zuonr,     sy-vline.
      format hotspot off.
    endloop.
    uline 0(139).
    <b>Regards,
    Jackie.</b>

  • Re: join cluster table into transperant table in ABAP Queries

    Hi gurus
    How to join cluster tables into transperant tables in ABAP Queries,
    I want to join KNA1, KNB2, BSEG(cluster table)
    pls explain me
    amk

    Hi
    You can use join for KNA1 and KNB1 which will much faster
    then use for all entries of this itab to get the BSEG to improve the performance
    here you need to do some trial and error method by joining  removing the tables and also for all entries
    regards
    Shiva

  • How to 'inner join' internal table or cluster table ??

    Hi,
    when i inner join table BSEG it said is a cluster table can't be inner joined .
    i wonder how i can "inner join" bseg with a internal table such as
    data: begin of i_bseg_trans,
            bukrs like bseg-bukrs,
            gjahr like bseg-gjahr,
            belnr like bseg-belnr,
            total_runtimes like i_runtimes-total,
            already_runtimes like i_runtimes-already,
            left_runtimes like i_runtimes-left,
          end of i_bseg_trans.
    and similar things trouble me  when considering several internal tables .
    thanks for any help!!

    Hi,
    but if there's more than 2 tables,  for example
    data: begin of it_bseg occurs 0,
            bukrs like bseg-bukrs,
            else_1 type i,
         end of it_bseg.
    data: begin of t occurs 0,
            bukrs like bseg-bukrs,
          end of t.
    data: begin of r occurs 0,
            bukrs like bseg-bukrs,
            else type c,
          end of r.
    select bukrs from bkdf into table t.
    select bukrs from bkdf into corresponding fields of table it_bseg.
    select bseg~bukrs      "else_1
    from bseg      "it_bseg
      into table r
      for all entries in t
      where bseg~bukrs = t-bukrs.
          " and it_bseg-bukrs = t-bukrs.
    in the select clause i mean whether there's a method similar to the way just drop the " in my code.
    now my solution is to use another loop on it_bseg, but i think when table amount is large this is really a boring solution.

  • IUUC_REPL_CONTENT - How to apply filters and replicate for Cluster tables BSEG/CDPOS

    Hello Friends,
    I have replicated the transparent tables by applying filters in IUUC_REPL_CONTENT but I know it's different for Cluster tables.
    Does anyone replicated the BSEG or CDPOS ?
    I need some inputs on this folks.
    Thanks in advance.
    Regards
    Raja

    May be this is helpful - http://scn.sap.com/community/replication-server/blog/2014/02/25/how-to-filter-on-the-initial-load-parallelize-replication

  • Join cluster table

    Hi
    I would like to make a joint with a table cluster (bseg) but the system put an error compilation. what a solution? Thank you for answer. 
    Even the creation of a view does not make with the tables cluster.

    Hi,
      You cannot write join for cluster tables like BSEG..Instead you can use FOR ALL ENTRIES options..
    EX..
    DATA: T_BKPF TYPE STANDARD TABLE OF BKPF,
          T_BSEG TYPE STANDARD TABLE OF BSEG.
    SELECT * FROM BKPF
           INTO TABLE T_BKPF
           WHERE....
    IF NOT T_BKPF IS INITIAL.
      SELECT * FROM BSEG
             INTO TABLE T_BSEG
             FOR ALL ENTRIES IN T_BKPF
             WHERE BUKRS = T_BKPF-BUKRS
             AND   BELNR = T_BKPF-BELNR
             AND   GJAHR = T_BKPF-GJAHR..
    ENDIF.
    Thanks,
    Naren

  • Cluster table BSEG

    Hi all,
    As we all know BSEG is cluster table and it has one to many relationship with the underlying database.tables
    I just wanna know how  we can find tables that are clustered in BSEG. In general any tables that are clustered to form cluster table?
    Thanks
    Parag

    hi
    in se11, take bseg, u can see the cluster RFBLG in the Delivery and maintenance tab.
    Double click on RFBLG.
    place the cursor in RFBLG and press the button where used list (ctrlshiftf3).......select the option Tables.........this will display u the tables.
    BSEC
    BSED
    BSEG
    BSES
    BSET
    Regards
    Sajid

  • Reading Cluster Table BSEG

    Just want to know though BSEG is a cluster table but we can read it using Select or use SQL statements meant for transparent table. How is it possible?
    Kindly clarify.
    Regards
    anya

    Hi,
    there a 2 types of 'cluster' tables. The first one is a physical cluster, linking of tables sort of speak. Here you can use select statements as already described in the above answers.
    see .<a href="http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm">http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm</a>
    Another type of cluster table is the one with a fixed structure. This can be used to store data dynamically with the export statement you speak of eg. you can store an intire internal table this way or a deep structure and later on extract it again.
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3c1f358411d1829f0000e829fbfe/frameset.htm">http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3c1f358411d1829f0000e829fbfe/frameset.htm</a>

  • By passing Cluster Table BSEG ?

    What is the science of using Cluster tables? I mean why are cluster tables used for ? + HOW CAN I BY PASS CLUSTER TABLER to get the data quickly ??

    Hi,
    The famous BSEG table is a cluster table.
    It is as was correctly stated part of the Accounting Document Segment. It is part of the Pool cluster RFBLG and lives in the package: FBAS (Financial accounting 'Basis').
    You can't read a cluster table exactly the way you read a database (old speak, transparent table).
    You can use a program to read called RFPPWF05
    Note 435694: Display BSEG item by calling FB09D (modified FB09)
    Other possiblity: Other possibility: CALL DIALOG 'RF_ZEILEN_ANZEIGE', but since this is a dialog I don't think this would work.
    In any event go to FBAS Package (development class) to see your business objects, class library and functions.
    you must use keyfields bukrs , belnr, gjahr
    (so 1st select table bkpf) to select bseg.
    or use secondary index tables:
    bsas, bsis, bsik, bsak, bsid, bsad
    Cluster Table : Cluster tables are logical tables that must be assigned to a table cluster when they are defined. Cluster tables can be used to strore control data. They can also be used to store temporary data or texts, such as documentation.
    A clustered and a pooled table cannot be read from outside SAP because certain data are clustered and pooled in one field.
    One of the possible reasons is for instance that their content can be variable in length and build up. Database manipulations in Abap are limited as well.
    But pool and cluster table is a many to one relationship table. This means many pool table store in a database table which is know as table pool.
    All the pool table stored table in table pool does not need to have any foreign key relationship but in the case of cluster table it is must. And pool and cluster table is basically use to store application data.
    For pool and cluster table you can create secondary index and you can use select distinct, group for pool and cluster table. You can use native SQL statement for pool and cluster table.
    Regards,
    Raj.

  • How do I join two tables in the same database and load the result into a destination table in a SSIS package

    Hi,
    I have a query that joins two tables in the same database, the result needs to be loaded in a destination DB table.  How do I do this in SSIS package?
    thank you !
    Thank You Warmest Fanny Pied

    Please take a look at these links related to your query.
    http://stackoverflow.com/questions/5145637/querying-data-by-joining-two-tables-in-two-database-on-different-servers
    http://stackoverflow.com/questions/7037228/joining-two-tables-together-in-one-database

  • Data Retrieval from Cluster Table - BSEG

    Hi all,
    I need to retreive data related to document line items from BSEG whose CLEARING DATE (AUGDT) is greater than a user given date for TWO COMPANY CODES (say 0010/0200).
    as BSEG is a cluster table, it has huge data and taking large amt of time can anybody suggest a better way of retrieving data for the above conditions(fastly)
    Thanks in Advance,
    Lakshmi

    hi,
    use second. index tables:
    customers:  BSAD
    vendors:    BSAK
    G/L acc.:   BSAS
    sample:
      SELECT (felder) FROM  bsad into TABLE stab
             WHERE  bukrs  = bukrs
             AND    kunnr  IN kunnr
             AND    gsber IN gsber
             AND    augbl  <>  space
             AND    hkont  IN akont
             AND    augdt GT p_date.
    regards Andreas
    Message was edited by: Andreas Mann

  • How do you join two tables from different Oracle schemas using a subquery

    I am trying to join two tables from different Oracle schemas using a subquery. I can extract data from each of the tables without a problem. However, when I combine the select statements using a subquery I get the Oracle error *'ORA-00936: missing expression'*. Since each SELECT statement executes on its own without error I don't understand what is missing. The result set I am trying to get is to match up the LINE_ID from PDTABLE_12_1 in schema DD_12809 with the MAT_DESCRIPTION from table PDTABLE_201 in schema RA_12809.
    The query is as follows:
    sql = "SELECT [DD_12809].[PDTABLE_12_1].LINE_ID FROM [DD_12809].[PDTABLE_12_1] JOIN " _
    + "(SELECT [RA_12809].[PDTABLE_201].MAT_DESCRIPTION " _
    + "FROM [RA_12809].[PDTABLE_201]) AS FAB " _
    + "ON [DD_12809].[PDTABLE_12_1].PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS"
    The format of the query is copied from a SQL programming manual.
    I also tried executing the query using a straight JOIN on the two tables but got the same results. Any insight would be helpful. Thanks!
    Edited by: user11338343 on Oct 19, 2009 6:55 AM

    I believe you are receiving the error because you are trying to JOIN on a column that doesn't exist. For example you are trying to join on FAB.PIPING_MATER_CLASS but that column does not exist in the subquery.
    If you want to do a straight join without a subquery you could do the following
    SELECT  DD_12809.PDTABLE_12_1.LINE_ID
    ,       FAB.MAT_DESCRIPTION
    FROM    DD_12809.PDTABLE_12_1
    JOIN    RA_12809.PDTABLE_201    AS FAB ON DD_12809.PDTABLE_12_1.PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS  HTH!

  • How can i join the tables

    hai guys,
    can any body explain the table joining procedure step by step process.what is the necessay to join the tables
    Regards
    kiran

    Hi,
    Steps
    1. Enter t.code : SQVI
    2. Enter the name : TEST press the create button.
    3.Enter the title & Comments
    4.Select table to join
    5.Select the second icon (INSERT TABLE)
    6 enter table name : EKKO
    7.again insert table
    8.enter table name : EKPO
    Note the table you are joining should have COMMON field
    9. press green arrow button
    10. Select the  output parameters in table 1 -EKKO
    11  Select the output parameters in table 2 -EKPO
    12. select the  layout
    13 SAVE
    G.Ganesh Kumar

  • How to create a cluster table and cluster view?

    Hi,
    Can anyone guide me in creation of cluster table in general and also creation of cluster view?

    Hi,
    check this links.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f0b7446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d0/999246b2aa11d1a5700000e82deaaa/content.htm
    Regard's
    SHAIK.

  • How do i join 3 table with the 'join' query ?

    Hello,
    i want to join 3 tables -> bsis, bsad and vbrp
    the components of the query to be are ,
    - select (matnr from vbrp) sum(amount from bsad).
    - join bsis and bsad on  bsisbukrs = bsadbukrs, bsisbelnr = bsadaugbl and bsisbldat = bsadaugdt.
    - where bsisblart = 'DZ' and bsishkont = '123456'.
    - join bsad and vbrp on vbrpburks = bsadbukrs, vbrpgjahr = bsadgjahr and vbrpbelnr = bsadbelnr.
    The double join query is to be constructed out of the above components.
    Thanks,
    Shehryar Dahar

    c an example....
    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.
    Ramesh.

Maybe you are looking for

  • Crystal 2008 & SQL

    I am creating a report using Crystal Reports 2008 connecting via ODBC to a SQL database.  All of my fields are coming across correctly with exception of "Scheduled_Date", according to the Field Explorer in Crystal, it shows my field with a Field Type

  • Previews no loading, but viewing photo full screen is fine

    hi all. perhaps someone can help with a solution to my problem; when i view libary as thumbnails, some of the images only display with a dashed-grey line border, and no picture, BUT if i double click to view the image full screen - its fine! thanks f

  • G4 with OS9 and OSX - HELP!!!

    Hello, I have a G4 Powermac which has been running 10.4.11 for some time now. Since this is a dual boot machine, it has been connected to an older drum scanner for several years (this scanner ONLY works in OS9). I haven't had to boot this machine in

  • UCCX Scheduled Reports Issue

    We are having any issue with Scheduled reports.  We have added the folder C:\Program Files\Cisco CRS Historical Reports\reports to resolve a bug but now the user is getting the attached error.  Any suggestions? v\:* {behavior:url(#default#VML);} o\:*

  • Button with dropdown menu

    Hi, i am new at apex and i try to create a button with dropdown menu. any help? i dont want to use plugin but create a new one... i know that i need jquery and i have tha basic knowledge. thanks, Adven