Can we join the transparent and pooled tables?

hi friends,
i have a doubt that is when we want to get the data from transparent and pooled tables it is not possible to join the tables.
so should we go with nested select statements or is there any way to get the data? with better performance
if i go with nested select statements it takes a lot time thats y i need a better way
for example i want the data from BKPF and BSEG based on BELNR
please send me how can we get it
regards
jagadish

hi rob
thanks for response
see the below code once
SELECT * FROM bkpf
          WHERE gjahr = p_gjahr
          AND ( monat BETWEEN lv_1st_mth AND gw_prev_monat ).
*- Selection with cost center
      IF  gw_kostl NE SPACE.
             s_kostl = s_kostl+3(10).
             SELECT * FROM bseg
                  WHERE bukrs = bkpf-bukrs
                  AND   belnr = bkpf-belnr
                  AND   gjahr = bkpf-gjahr
                  AND   kokrs = p_kokrs
                  AND   kostl IN s_kostl
                  AND   buzei = '001'
                  AND   lstar <> ' '.
             MOVE bseg-lstar TO itab2-lstar .
             MOVE bkpf-bukrs TO itab2-bukrs.
             MOVE bkpf-belnr TO itab2-belnr.
             MOVE bkpf-gjahr TO itab2-gjahr.
             MOVE bkpf-monat TO itab2-monat.
             MOVE bkpf-budat TO itab2-budat.
             MOVE bseg-kokrs TO itab2-kokrs.
             MOVE bseg-buzei TO itab2-buzei.
            MOVE bseg-wrbtr TO itab2-wrbtr.
*Changed----
             IF bseg-shkzg = 'H'.
               lv_wrbtrcd = 0 - bseg-wrbtr.
               itab2-wrbtr = lv_wrbtrcd.
             ELSEIF bseg-shkzg = 'S'.
               MOVE bseg-wrbtr TO itab2-wrbtr.
             ENDIF.
             MOVE bseg-fdwbt TO itab2-fdwbt.
             MOVE bseg-sgtxt TO itab2-sgtxt.
             MOVE bseg-kostl TO itab2-kostl.
             APPEND itab2.
             ENDSELECT.
      ELSE.
             s_kostl = p_estat+0(4).
             SELECT * FROM bseg
                  WHERE bukrs = bkpf-bukrs
                  AND   belnr = bkpf-belnr
                  AND   gjahr = bkpf-gjahr
                  AND   kokrs = p_kokrs
                  AND   kostl IN s_kostl
                  AND   buzei = '001'
                  AND   lstar <> ' '.
             IF bseg-kostl+0(4) = s_kostl.
                 MOVE bseg-lstar TO itab2-lstar.
                 MOVE bkpf-bukrs TO itab2-bukrs.
                 MOVE bkpf-belnr TO itab2-belnr.
                 MOVE bkpf-gjahr TO itab2-gjahr.
                 MOVE bkpf-monat TO itab2-monat.
                 MOVE bkpf-budat TO itab2-budat.
                 MOVE bseg-kokrs TO itab2-kokrs.
                 MOVE bseg-buzei TO itab2-buzei.
                MOVE bseg-wrbtr TO itab2-wrbtr.
*Changed----
             IF bseg-shkzg = 'H'.
               lv_wrbtrcd = 0 - bseg-wrbtr.
               itab2-wrbtr = lv_wrbtrcd.
             ELSEIF bseg-shkzg = 'S'.
               MOVE bseg-wrbtr TO itab2-wrbtr.
             ENDIF.
                 MOVE bseg-fdwbt TO itab2-fdwbt.
                 MOVE bseg-sgtxt TO itab2-sgtxt.
                 MOVE bseg-kostl TO itab2-kostl.
                 APPEND itab2.
             ENDIF.
             ENDSELECT.
      ENDIF.
      ENDSELECT.
regards
jagadish

Similar Messages

  • How can i join the header and item table to fetch the data

    hi experts,
                   i have a doubt in using inner join or for all entries, for fetching the data from the item table mseg, by taking the doc.no from mkpf. Plz sort out the difference, what happens, if i use the both statements for fetching data

    Hi,
    Both has same functionality.
    but if u are using FAE, u ahev to check for the
    ~intial condition of the source table,
    ~ duplicate entries, if any
    Inner join will fetch the data from all the join tables at once. FAE will fetch the date from a table first then use that data to fetch data from subsequent table.
    say in ur case, if u r using FAE,
    1.select from mkpf.
    2.select from mseg fae in I_MKPF.
    first try using JOIN. if it is taking lots of time, then try FAE.
    regards,
    madhu

  • Joining of cluster  and pooled tables ,transparent tables

    Hi,
    I wanted to do join between  cluster  ,pooled and transparent tables  but inner join won't allow  to join between  transparent or cluster tables or pooled tables .  The requirements are that join should take place dynamically  between transparent ,cluster ,pooled tables .I have written the Function module for joining multiple tables for transparent tables but unable to implement same for the transparent and cluster or pooled tables.How to handle the joining of tables between pooled or cluster  and transparent tables kindly provide me the answer .
    Thanks,
    jahnavi.

    Hi Jahnavi,
    My suggestion would be... if you want to retrieve the data between cluster tables and transparent tables.. its better to go for views instead of cluster tables then that would be easier for you to retrieve the data
    let us take one example BSEG its a cluster table where as there is one view VBSEGK it contains almost all the important fields needed so that u can make use of those or you can look into BSIK and BSAK tables so it better to avoid the cluster tables while retriving the data from the performance point of view

  • 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

  • Can I join the oracle and mssql database together?

    Hi,
    Did someone know how to join the table from two different platform database? I need to join oracle table with Mssql table in the select statement. Is possible to do so or any hints out there?
    Thanks
    Daron

    Hi,
    Definitly yes, Oracle and MSSQL are two different products and there are unsupported datatypes exists in MSSQL server. Except few instances, you can go ahead and join in one single query provided if you have database link.
    Cheers!!!!
    Mahesh Ragineni

  • Diff Bt Cluser and pool tables?

    HI,
    Wats the diff between the cluster and pool tables?
    Regards,
    KK

    Hi Kishore,
    Pooled and Cluster Tables
    Table pools (pools) and table clusters (clusters) are special table types in the ABAP Dictionary. The data from several different tables can be stored together in a table pool or table cluster. Tables assigned to a table pool or table cluster are referred to as pooled tables or cluster tables.
    A table pool or table cluster should be used exclusively for storing internal control information (screen sequences, program parameters, temporary data, continuous texts such as documentation). Data of commercial relevance is usually stored in transparent tables.
    Table Pools
    A table in the database in which all records from the pooled tables assigned to the table pool are stored corresponds to a table pool.
    The definition of a pool consists essentially of two key fields (Tabname and Varkey) and a long argument field (Vardata).
    Regards,
    VKreddy

  • Wat is the exact differences between clustered table and pooled table

    hi,
       can you tell me ravi...wat is the exact differences between clustered table and pooled table
    with regards//
    anilreddyg

    Hi Anil Reddy
    Pooled Tables, Table Pools, Cluster Tables, and Table Clusters
    These types of tables are not transparent in the sense that they are not legible or manageable directly using the underlying database system tools. They are managed from within the R/3 environment from the ABAP dictionary and also at runtime when they are loaded into application memory.Pool and cluster tables are logical tables. Physically, these logical tables are arranged as records of transparent tables. The pool and cluster tables are grouped together in other tables, which are of the transparent type. The tables that group together pool tables are known as table pools, or just pools; similarly, table clusters, or just
    clusters, are the tables which group cluster tables.Not all operations that can be performed over transparent tables can be executed over pool or cluster tables.
    For instance, you can manage these tables using Open SQL calls from ABAP, but not Native SQL.These tables are meant to be buffered and loaded in memory, because they are commonly used for storing internal control information and other types of data with no external (business) relevance. SAP recommends that tables of pool or cluster type be used exclusively for control information such as
    program parameters, documentation, and so on. Transaction and application data should be stored in transparent tables.
    Table Pools
    From the point of view of the underlying DBMS as from the point of view of the ABAP dictionary, a table pool is a transparent table containing a group of pooled tables which, when created, were assigned to this table pool.
    Field Type Description
    TABNAME CHAR(10) Table name
    VARKEY CHAR(n) Maximum key length n =< 110
    DATALN INT2(5) Length of the VARDATA record returned
    VARDATA RAW(m) Maximum length of the data varies according to DBMS
    Table Clusters
    Similarly to pooled tables, cluster tables are logical tables which, when created, are assigned to a table cluster. Therefore, a table cluster, or just cluster, groups together several tables of type clusters.Several logical rows from different cluster tables are brought together in a single physical record. The records
    from the cluster tables assigned to a cluster are thus stored in a single common table in the database.A cluster contains a transparent cluster key which must be located at the start of the key of all logical cluster tables to be included in the cluster. As well, a cluster contains a long field (VARDATA), which contains the
    data of the cluster tables for this key. If the data does not fit into a field, continuation records are created.
    Field Type Description
    CLKEY1 CHAR(*) First key fields
    CLKEY2 CHAR(*) Second key field
    CLKEYN CHAR(*) nth key field
    PAGENO INT2(5) Number of the next page
    TIMESTMP CHAR(14) Time stamp
    PAGELG INT2(5) Length of the VARDATA record returned
    VARDATA RAW(*) Maximum length of the data section; varies according to database system
    Working with Tables
    The dictionary includes many functions for working with tables. There are five basic operations you can perform on tables: display, create, delete, modify, copy. Please do not confuse displaying a table with displaying the table entries (table contents). In order to display a table, it must previously exist; otherwise the system will display an error message in the status bar. For the following example, the table TABNA is used. To display this table, from the main dictionary screen, enter the table name in the Object name
    input field with the radio button selected next to Tables. Then, click on the Display button at the bottom of the screen, or press the F7 function key, or, alternatively,
    select Dictionary object Display from the menu.
    In this screen, you can see table information such as
    ¨ Table type, shown next to the name of the object. In the example, it is a transparent table.
    ¨ Short text description.
    ¨ Name of the user who made the last change, and the date of the change.
    ¨ Master language.
    ¨ Table status. On the screen, you can see this table is saved and active.
    ¨ Development class. For information on development classes, refer to Chap. 6.
    Delivery class, which sets the maintenance group for the table. It controls how tables will behave during client copy procedures, upgrades, and so forth.¨
    Tab. Maint. Allowed flag, which indicates whether you can generate a screen for maintaining table entries.
    ¨Then, on the lower part of the screen, you can see the table fields with all associated characteristics such as:
    ¨ Field name.
    ¨ Key indicator. When set, this field is the primary key, or part of it.
    ¨ Data element.
    ¨ Basic data type.
    ¨ Length.
    ¨ Check table.
    ¨ Short text, describing the field.
    Additional information about the table can be displayed by selecting the corresponding functions from the menu or directly from the application toolbar, such as keys, indexes, or technical settings
    Standard table:
    The key access to a standard table uses a sequential search. The time required for an access is linearly dependent on the number of entries in the internal table.
    You should usually access a standard table with index operations.
    Sorted table:
    The table is always stored internally sorted by its key. Key access to a sorted table can therefore use a binary search. If the key is not unique, the entry with the lowest index is accessed. The time required for an access is logarithmically dependent on the number of entries in the internal table.
    Index accesses to sorted tables are also allowed. You should usually access a sorted table using its key.
    Hash table:
    The table is internally managed with a hash procedure. All the entries must have a unique key. The time required for a key access is constant, that is it does not depend on the number of entries in the internal table.
    You cannot access a hash table with an index. Accesses must use generic key operations (SORT, LOOP, etc.).
    Index table:
    The table can be a standard table or a sorted table.
    Index access is allowed to such an index table. Index tables can be used to define the type of generic parameters of a FORM (subroutine) or a function module.
    Just have a look at these links:
    http://help.sap.com/saphelp_nw04/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/74/83015785d811d295a800a0c929b3c3/frameset.htm
    Regards
    Sreeni

  • Can u create cluster and pooled tables in real time

    hi
        can u create cluster and pooled tables in real time.can u send data base tables name of above one.

    Hai Anil
    For creating cluster tables first u have to create table pool ...
    create a table and specify the fields and other tecnical settings and
    then Goto EXTRAS --> Change Table Category and selct the Pooled table and activate it...
    Then Create another table And specify the required fileds and also the settings and then
    Goto EXTRAS --> Change Table Category and selct the Cluaster table and in Delivery and
    Maintainence Properties mention the Pooled table that u created and activate it...
    Regards
    Sreeni

  • I bought yesterday my macbook pro and I want to join the FaceTime and I just can´t... It said that is not working and try it later... but since yesterday said that .. What should I do?

    I bought yesterday my macbook pro and I want to join the FaceTime and I just can´t... It said that is not working and try it later... but since yesterday said that .. What should I do?

    Here's a previous discussions that seems to have solved a similar issue in the past:
    https://discussions.apple.com/message/12209861#12209861

  • In which table can I find the name and surname  for a username ?

    Hello,
    I search the table with the master data of users. Specially I search the table where I can find the
    name, surname for a user.
    In which table can I find the name and surname  for a username ?
    Thanx in Advance

    Hello  everybody,
    thank you for the helpful informations.
    thank you very much
    with kind regards
    cetoman

  • So my brother just recently joined the army and someone has stolen his iPhone how can we help him find it ?

    So my brother just recently joined the army and someone has stolen his iPhone how can we help him find it ?

    Only if his iPhone has Find My iPhone activated before the lost and the iPhone has Internet connection (cellular or Wi-Fi)
    https://www.icloud.com/#find
    Login with his Apple ID and password to track.

  • I am trying to connect to a network but keep getting a message saying "Unable to join the network' and the only option is dismiss, what can I do?

    I am trying to connect to a network on my ipad but keep getting a message saying  " Unable to join the network" and the omly opion is dismiss.....Can anyone help me find out what is wrong please?

    Have a look at this may help
    http://www.apple.com/uk/support/ipad/wifi/
    Are you refering to a home network or some form of public
    if home network ensure your router has latest firmware and try rebooting it

  • I can not join the my home WIFI network. I have iPhone and iTouch connected as well as my windows laptop. I have trie power on rese, and network reset

    I can not join the my home WIFI network. I have iPhone and iTouch connected as well as my windows laptop. I have trie power on rese, and network reset. What do I do next?

    This is something else you can try.
    Go to Settings>WiFi>Your Network Name (tap the blue arrow)>Forget this Network. Reboot your iPad, hold down on the sleep button at the top for a couple of seconds until the red slider appears, slide to shut down. Then press the sleep button again until the Apple logo appears and let go of the button and the iPad will restart. Try to join your network again.

  • Hi there!  We just got an ipod touch 8G.  We have wireless internet, but can't join the network with the ipod touch!  Very frustrating and we have tried all of the troubleshooting suggestions on the support site.  Help!  The router is a linksys WRT120N.

    Hi everyone!  WE just got an ipod touch 8G.  We do have wireless internet, but can't join the network with the ipod touch.  Message comes up.."unable to join the network".....very frustrating!  We have tried all trouble-shooting suggestions on the site, but nothing is working.  Anyone out there got any ideas for us??  The router is a Linksys WRT120N.
    Thanks for any help any one can give!!!

    Does the iPod connect to other neworks?
    Do other devices connect to the network?
    What encryption are you using?
    How you tried changing the type of encruption? Changing to no encryption?

  • Reg : Cluster and pool tables

    Hi All,
    I think this has been asked previously.
    Have a doubt, i think this area is kind of opaque.
    This is the scenario, we have standard business suite systems now i am going to get the data into hana using SLT how do i handle cluster and pool tables. Do i bring in the declustered data?
    I am aware that we can get the data from these tables into BW on hana, not sure if that is correct.
    What are the best practice approach for these table classes.
    How have you implemented these kind of scenarios.
    Message was edited by: Tom Flanagan

    Hello,
    SLT Supports replication of non-Unicode to Unicode systems.
    Includes cluster / pool tables, etc. (writes into transparent tables in SAP HANA system).
    Regards,
    Subbu

Maybe you are looking for

  • Safari 6.1.6 keeps crashing

    Hi, I have early 2011 Macbook Pro(10.7.5). My Safari only keeps on crashing. Below is the report for the same. My chrome do not crash like that. Why Safari is so vulnerable? Please help. Process:         WebProcess [3703] Path:            /System/Lib

  • How to set up logical components for ChaRM?

    Hi, we do have the following system landscape. One DEV and two separate QA and PROD systems. DEV-> >QA1  -> PROD1 >QA2  -> PROD2 For these we want to transport parallel from DEV to QA1/QA2 and then parallel to PROD1/PROD2 via ChaRM. My questions are:

  • Copy fields when form is saved

    Very simple one, When I add a new sales quote I want the Total Value edit box to be copied to my Expected Value edit box, as the data is not added to the table yet I thought it would all be available as stings in the edit boxes, hence the following:

  • How to call static files?

    I have uploaded two documents, one MSWord and the other excel, to Shared Components / Static Files. Can someone tell me how to call these from a linked list? Thanks

  • How to (zoom in\out) on nokia e5 on images/photos

    how to (zoom in\out) on nokia e5 on images/photos ?? I cant find zoom or any key to zoom any idea ?? Solved! Go to Solution.