Performance tuning on BKPF and BSEG for my code.

Please provide alternative code for the following code so that processing is fast.
my select queries are as follows. It take a lot of time and system gets loaded when it is scheduled.
select BUKRS
           BELNR
           GJAHR
           BLART
           BLDAT
           BUDAT
           TCODE
           XBLNR
           STBLG
           WAERS
           KURSF
           AWKEY
           STGRD
    into CORRESPONDING FIELDS OF TABLE
IT_BKP   from bkpf where bukrs =   p_bukrs
                                          and   gjahr in s_gjahr
                                          AND BLART NE 'SA'
                          and   budat in s_date.
select BELNR
         KOART
         SHKZG
         MWSKZ
         DMBTR
         KTOSL
         SGTXT
         VBELN
         HKONT
         KUNNR
         MATNR
         MENGE
  FROM BSEG INTO  CORRESPONDING FIELDS OF TABLE it_bseg
                                    for all entries in it_bkpf
                                     where bukrs = it_bkpf-bukrs
                                     and   belnr = it_bkpf-belnr
                                     and   gjahr = it_bkpf-gjahr
                                     and   MWSKZ in s_MWSKZ .  
Please help.

Hi,
   Declare internal table same fields as the you are selecting from table and
  remove corresponding fields of and also check ur t_bkpf table is not initial
  before using for all enteries.
  foe e.g.
select BUKRS
BELNR
GJAHR
BLART
BLDAT
BUDAT
TCODE
XBLNR
STBLG
WAERS
KURSF
AWKEY
STGRD
into TABLE
IT_BKP from bkpf where bukrs = p_bukrs
and gjahr in s_gjahr
AND BLART NE 'SA'
and budat in s_date.
IF IT_BKPF[] IN NOT INITIAL.
select BELNR
KOART
SHKZG
MWSKZ
DMBTR
KTOSL
SGTXT
VBELN
HKONT
KUNNR
MATNR
MENGE
FROM BSEG INTO TABLE it_bseg
for all entries in it_bkpf
where bukrs = it_bkpf-bukrs
and belnr = it_bkpf-belnr
and gjahr = it_bkpf-gjahr
and MWSKZ in s_MWSKZ .
ENDIF.
  reward if useful.

Similar Messages

  • How to use BKPF and BSEG without using  inner join

    Hi,
    can anybody plz tell me the logic about how to complete the report without inner joining bkpf and bseg.Is this report can be really be made by using only bseg,bkpf ?
    *selection-criteria .
    BKPF-USNAM
    BKPF-CPUDT
    BKPF-BUDAT
    BKPF-GJAHR
    BKPF-BUKRS
    BKPF-BELNR
    BSEG-SAKNR
    BSEG-LIFNR
    BSEG-KUNNR
    BSEG-ZUONR
    BSEG-SGTXT
    Output fields required.
    BKPF-BUKRS
    BKPF-BELNR
    BKPF-GJAHR
    BKPF-MONAT
    BKPF-BLART
    BKPF-CPUDT
    BKPF-BLDAT
    BKPF-BUDAT
    BKPF-USNAM
    BKPF-XBLNR
    BKPF-STBLG
    BKPF-BKTXT
    BKPF-WAERS
    BKPF-KURSF
    BSEG-BUZEI
    BSEG-BSCHL
    BSEG-KOART
    BSEG-UMSKZ
    BSEG-SHKZG
    BSEG-MWSKZ
    BSEG-PSWBT
    BSEG-PSWSL
    BSEG-DMBTR
    BSEG-SAKNR
    BSEG-HKONT
    BSEG-KOSTL
    BSEG-KUNNR
    BSEG-VBELN
    BSEG-LIFNR
    BSEG-ANLN1
    BSEG-ANLN2
    BSEG-AUFNR
    BSEG-MATNR
    BSEG-MENGE
    BSEG-MEINS
    BSEG-ZUONR
    BSEG-SGTXT
    Thanks,
    Rahman
    Moderator Message: Please search before posting your question. Thread locked.
    Edited by: Suhas Saha on Jan 31, 2012 3:07 PM

    Quick question - what's preventing your from using built-in functions?
    I suggest mapping your Time Dim to a standard Time Dim and work with it - you'll save a lot more time. You'd even need this table if you wanted to work around Todate/AGO.
    It is possible to model this functionality w/o functions, but it'll be time consuming task, similar to using Time Series Wizard in Siebel Analytics. You'll need to build aliases and views along with some complex joins (such as TIME.KEY=TIME.KEY-365), introduce a bunch of variables to control. Also, you might not get much flexibility in terms of years. For each year, you'd need an alias table. (TIME_DIM_PY).

  • How to create view on bkpf and bseg?

    friends,
      can we create views on bkpf and bseg if yes wht are the steps...please note it down n send me..regards essam ([email protected])

    Hi,
    Use standard views...
    View name                      Short text
    BKPF_AEDAT                     BW FI: BKPF Extraction Using AEDAT
    BKPF_BSAD                      BW FI: BSAD Extraction Using CPUDT
    BKPF_BSAD_AEDAT                BW FI: BSAD Extraction using AEDAT
    BKPF_BSAK                      BW FI: BSAK Extraction Using CPUDT
    BKPF_BSAK_AEDAT                BW FI: BSAK Extraction using AEDAT
    BKPF_BSID                      BW FI: BSID Extraction Using CPUDT
    BKPF_BSID_AEDAT                BW FI: BSID Extraction using AEDAT
    BKPF_BSIK                      BW FI: BSIK Extraction Using CPUDT
    BKPF_BSIK_AEDAT                BW FI: BSIK Extraction using AEDAT
    CRMV_BKPF_BEBD                 FI Documents Relevant for Feedback to CRM
    V_EWU_BKPF                     Update View for Parallel Processing on BKPF
    V_VBSEGK
    V_VBSEGS
    Regards,
    Omkar.

  • How to join anla anlc bkpf and bseg in sap

    any can u tel me how to join the anla anlc bkpf and bseg tables in sap.if any body having asset report send me plz

    Moderator message - Welcome to SCN
    But please search for answers here before posting and do not ask the forum to do your work for you.
    Thread locked.
    Please read [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement], How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Rob

  • Query with tables of BKPF and BSEG and Structures COBL, RF05A

    hi experts,
              I want to create query with the tables of BKPF and BSEG and  Structures COBL, RF05A
    How can i proceed?
    Please give me complete points
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:52 PM

    check the common fields and required fields and the write SELECT query useing Inner Joins or For all entries
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:52 PM

  • Performance tuning in BPEL and ESB

    Hi,
    Any one can tell me how to do Performance tuning in BPEL and ESB.
    How to create WEB SERVICES in BPEL

    Hi',
    Performance tuning in BPEL and ESB.
    ***This is very big topic I can give you 2 points here
    In BPEL we should avoid the use of duplicate variable, the best way to do this is, when ever we are creating a new variable
    we need to ask can we reuse variable from inside the process, example when creating the input/output variable in Invoke activity
    we need to check if we can use some existing variable instead of creating new.
    All the DB related operation should be performed in 1 single composite.
    How to create WEB SERVICES in BPEL
    Not sure what you want to ask here, as BPEL is itself a webservice.
    -Yatan

  • How to join BKPF and BSEG

    Hi Experts,
    how to join BKPF and BSEG
    Thanks
    nagini

    Hi,
    BKPF is Transparent table but BSEG is cluster table.  We can't create views by joining cluster tables.
    hope it helps...
    regards,
    Raju

  • Performance tuning: lite sessions and local ServletContext

    I have been doing some research on iPlanet performance tuning. In our
    current production environment (iAS6.0 SP1B, iWS4.1 SP2 on Solaris), since
    we don't use clustering there should be a couple of performance improvements
    we can make immediately:
    1. Use lite sessions (<session-impl>lite</session-impl> in ias-web.xml) - I
    believe that if you use lite sessions, the session data is stored in the kjs
    process space as opposed to the kxs process space. This, of course, means
    that if a kjs dies the user's on it will lose their session information but
    it will provide a performance improvement by reducing kxs/kjs communication.
    2. Use local ServletContexts (<distributable>false</distributable> in
    web.xml) - This should cause the ServletContext to only be stored in the
    originating JVM. So again, if a kjs dies, the user will lose their
    ServletContext but again we will get a performance improvement by reducing
    kxs/kjs communcation.
    What I want to understand is how our load balancing configuration will
    effect our production environment if we use this configuration. Right now
    we use sticky load balancing on all our servlets but we don't have our JSPs
    registered and therefore sticky load balancing cannot always be trusted to
    return users to the iAS they came from. We make up for this by using
    hardware load balancing that keeps the majority of our users sticky.
    However, using lite sessions and local ServletContexts will require that a
    user not only stick to an iAS, but to a specific kjs as well. Using sticky
    load balancing would ensure that, but since we also rely on our hardware
    load balancers, could they create a problem? If a user gets sent back to
    the iAS they came from by our hardware load balancers, will the kxs process
    be smart enough to return them to the kjs they came from? If so, then I
    think that means that we can safely switch to lite sessions and local
    ServletContexts, but if not, I think many users will lose their sessions.
    Thanks,
    Linc

    Please follow thru this link for your answers
    http://developer.iplanet.com/viewsource/char_tuningias/index.jsp
    Thanks
    Shital Patel
    Lincoln wrote:
    I have been doing some research on iPlanet performance tuning. In our
    current production environment (iAS6.0 SP1B, iWS4.1 SP2 on Solaris), since
    we don't use clustering there should be a couple of performance improvements
    we can make immediately:
    1. Use lite sessions (<session-impl>lite</session-impl> in ias-web.xml) - I
    believe that if you use lite sessions, the session data is stored in the kjs
    process space as opposed to the kxs process space. This, of course, means
    that if a kjs dies the user's on it will lose their session information but
    it will provide a performance improvement by reducing kxs/kjs communication.
    2. Use local ServletContexts (<distributable>false</distributable> in
    web.xml) - This should cause the ServletContext to only be stored in the
    originating JVM. So again, if a kjs dies, the user will lose their
    ServletContext but again we will get a performance improvement by reducing
    kxs/kjs communcation.
    What I want to understand is how our load balancing configuration will
    effect our production environment if we use this configuration. Right now
    we use sticky load balancing on all our servlets but we don't have our JSPs
    registered and therefore sticky load balancing cannot always be trusted to
    return users to the iAS they came from. We make up for this by using
    hardware load balancing that keeps the majority of our users sticky.
    However, using lite sessions and local ServletContexts will require that a
    user not only stick to an iAS, but to a specific kjs as well. Using sticky
    load balancing would ensure that, but since we also rely on our hardware
    load balancers, could they create a problem? If a user gets sent back to
    the iAS they came from by our hardware load balancers, will the kxs process
    be smart enough to return them to the kjs they came from? If so, then I
    think that means that we can safely switch to lite sessions and local
    ServletContexts, but if not, I think many users will lose their sessions.
    Thanks,
    Linc

  • Performance issue:Show id and Description for same dimension member

    Hi,
    I am connecting a cube to another reporting system and i need to show the id of member resulting of a query.My first thought was to use this kind of code (bellow) however when i do the same thing with many dimension (many cross join ),it slow down a lot
    my query.So how can i have in the same DImension member showing a description and id ? I also have a lot of statement,so i can't have just two columns in the dimension or i will need to duplication the mdx and i could drop down the performance.
    So i am trying to get as a result
    Dim1 | Dim2| Dim3| Measure
    1 50
    32 25.2
    and also be able to get
    Dim1                            |   Dim2                                  |  Dim3  
                                |                Measure
    NameElement1Dim1 NameElement50Dim2
    NameElement32Dim3 25.2
    Thanks in advance
    with MEMBER [Measures].[IdElement] as 
    <element>.currentmember.properties("KEY")
    select
    CROSSJOIN({[Measures].[IdElement]},{[METRIC].[Description].[All]}),
    CROSSJOIN({[Measures].[value]},{<listmetricmdx>})
    } on columns,
    <pointofview>
    <element_and_function>
    <TimeBreakdown>
    } on rows
    <list_filter_clause>
    ) as list
    where ((ElementName is null AND IdElement=0) OR (ElementName is not null))
    <list_condition_metric>
    but i have multiple 

    Hi Vincent,
    In your query, you use CrossJoin in it. Crossjoin function will cause the performance issue if there are a lot of properties that need to be displayed. If you cross-join medium-sized or large-sized sets (e.g., sets that contain more than 100 items each),
    you can end up with a result set that contains many thousands of items—enough to seriously impair performance. For the detail information, please see:
    http://sqlmag.com/data-access/cross-join-performance
    In your MDX query, ensure only retrieval the required data. Here are some useful links for your reference.
    Configure memory setting:
    http://social.msdn.microsoft.com/Forums/en/sqlanalysisservices/thread/bf70ca19-5845-403f-a85f-eac77c4495e6
    Performance Tuning:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=3be0488d-e7aa-4078-a050-ae39912d2e43&displaylang=en
    http://www.packtpub.com/article/query-performance-tuning-microsoft-analysis-services-part2
    Regards,
    Charlie Liao
    TechNet Community Support

  • Table and fields for " Batch Code Date " and "Shelf Life days".

    Hi All,
    What is the field for " Batch Code Date " and "Shelf Life days".
    And in which table are they present.
    Thanks & Regards,
    Ahmed.

    Check the table
    MCHA  Batches
    Field VFDAT  Shelf Life Expiration or Best-Before Date

  • HT202731 How do I find pairing code for Magic trackpad.  Running bootcamp to enable windows and asking for pairing code...

    I'm running Bootcamp on my iMAC.  It finds the magic trackpad but asks for pairing code.  I've looked on the trackpad and in the paperwork that comes in box - no pairing code.  How do I find this so that I can use the device with my iMAC.  Help appreciated.  Many thanks

    I'm running Bootcamp on my iMAC.  It finds the magic trackpad but asks for pairing code.  I've looked on the trackpad and in the paperwork that comes in box - no pairing code.  How do I find this so that I can use the device with my iMAC.  Help appreciated.  Many thanks

  • Is it possible to have different rendering for RI and Myfaces for same code

    Iam facing with a peculiar problem. I developed custom component using JSF technology. There is a different rendering when I used RI and Myfaces for the same code base. How to overcome such a problem. Please reply.
    Thanks in advance

    Hi, it is normal, the rendered classes for the standard component have been implemented differently, so you have some differences. Normally, they should follow the SUN requirement but every one can code that following its own interpretation.
    Your component is based on which standard component?

  • Performance issue in BI due to direct query on BKPF and BSEG tables

    Hi,
    We had a requirement that FI document number fieldshould be extracted in BI.
    Following code was written which has the correct logic but performance is bad.
    It fetched just 100 records in more than 4-5 hrs.
    The reason is there was a direct qury written on BSEG and BKPF tables(without WHERE clause).
    Is there any way to improve this code like adding GJAHR field  in where clause? I dont want to change the logic.
    Following is the code:
    WHEN '0CO_OM_CCA_9'." Data Source
        TYPES:BEGIN OF ty_bkpf,
        belnr TYPE bkpf-belnr,
        xblnr TYPE bkpf-xblnr,
        bktxt TYPE bkpf-bktxt,
        awkey TYPE bkpf-awkey,
        bukrs TYPE bkpf-bukrs,
        gjahr TYPE bkpf-gjahr,
        AWTYP TYPE bkpf-AWTYP,
        END OF ty_bkpf.
        TYPES : BEGIN OF ty_bseg1,
        lifnr TYPE bseg-lifnr,
        belnr TYPE bseg-belnr,
        bukrs TYPE bseg-bukrs,
        gjahr TYPE bseg-gjahr,
        END OF ty_bseg1.
        DATA: it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
        wa_bkpf TYPE ty_bkpf,
        it_bseg1 TYPE STANDARD TABLE OF ty_bseg1,
        wa_bseg1 TYPE ty_bseg1,
        l_s_icctrcsta1 TYPE icctrcsta1.
        "Extract structure for Datasoure 0co_om_cca_9.
        DATA: l_awkey TYPE bkpf-awkey.
        DATA: l_gjahr1 TYPE gjahr.
        DATA: len TYPE i,
        l_cnt TYPE i.
        l_cnt = 10.
        tables : covp.
        data : ref_no(20).
        SELECT lifnr
        belnr
        bukrs
        gjahr
        FROM bseg
        INTO TABLE it_bseg1.
        DELETE ADJACENT DUPLICATES FROM it_bseg1 COMPARING belnr gjahr .
        SELECT belnr
        xblnr
        bktxt
        awkey
        bukrs
        gjahr
        AWTYP
        FROM bkpf
        INTO TABLE it_bkpf.
        IF sy-subrc EQ 0.
          CLEAR: l_s_icctrcsta1,
          wa_bkpf,
          l_awkey,
          wa_bseg1.
          LOOP AT c_t_data INTO l_s_icctrcsta1.
            MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
          select single AWORG AWTYP INTO CORRESPONDING FIELDS OF COVP FROM COVP
          WHERE belnr = l_s_icctrcsta1-belnr.
          if sy-subrc = 0.
              if COVP-AWORG is initial.
           concatenate l_s_icctrcsta1-refbn '%' into ref_no.
                  READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
                  l_s_icctrcsta1-refbn
                  awtyp = COVP-AWTYP
                  gjahr = l_gjahr1.
            IF sy-subrc EQ 0.
              MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
              MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
              MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
              MODIFY c_t_data FROM l_s_icctrcsta1.
              READ TABLE it_bseg1 INTO wa_bseg1
              WITH KEY
              belnr = wa_bkpf-belnr
              bukrs = wa_bkpf-bukrs
              gjahr = wa_bkpf-gjahr.
              IF sy-subrc EQ 0.
                MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
                MODIFY c_t_data FROM l_s_icctrcsta1.
                CLEAR: l_s_icctrcsta1,
                wa_bseg1,
                l_gjahr1.
              ENDIF.
            ENDIF.
                ELSE. " IF AWORG IS NOT BLANK -
                concatenate l_s_icctrcsta1-refbn COVP-AWORG into ref_no.
                READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(20) =
                ref_no
                awtyp = COVP-AWTYP
                gjahr = l_gjahr1.
            IF sy-subrc EQ 0.
              MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
              MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
              MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
              MODIFY c_t_data FROM l_s_icctrcsta1.
              READ TABLE it_bseg1 INTO wa_bseg1
              WITH KEY
              belnr = wa_bkpf-belnr
              bukrs = wa_bkpf-bukrs
              gjahr = wa_bkpf-gjahr.
              IF sy-subrc EQ 0.
                MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
                MODIFY c_t_data FROM l_s_icctrcsta1.
                CLEAR: l_s_icctrcsta1,
                wa_bseg1,
                l_gjahr1.
              ENDIF.
            ENDIF.
               endif.
          endif.
            CLEAR: l_s_icctrcsta1.
            CLEAR: COVP, REF_NO.
          ENDLOOP.
        ENDIF.

    Hello Amruta,
    I was just looking at your coding:
    LOOP AT c_t_data INTO l_s_icctrcsta1.
    MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
    select single AWORG AWTYP INTO CORRESPONDING FIELDS OF COVP FROM COVP
    WHERE belnr = l_s_icctrcsta1-belnr.
    if sy-subrc = 0.
    if COVP-AWORG is initial.
    concatenate l_s_icctrcsta1-refbn '%' into ref_no.
    READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
    l_s_icctrcsta1-refbn
    awtyp = COVP-AWTYP
    gjahr = l_gjahr1.
    Here you are interested in those BKPF records that are related to the contents of c_t_data internal table.
    I guess that this table does not contain millions of entries. Am I right?
    If yes, the the first step would be to pre-select COVP entries:
    select BELNR AWORG AWTYP into lt_covp from COVP
    for all entries in c_t_data
    where belnr = c_t_data-belnr.
    sort lt_covp by belnr.
    Once having this data ready, you build an internal table for BKPF selection:
    LOOP AT c_t_data INTO l_s_icctrcsta1.
      clear ls_bkpf_sel.
      ls_bkpf_sel-awkey(10) = l_s_icctrcsta1-refbn.
      read table lt_covp with key belnr = l_s_icctrcsta1-belnr binary search.
      if sy-subrc = 0.
        ls_bkpf_sel-awtyp = lt_covp-awtyp.
      endif.
      ls_bkpf_sel-gjahr = l_s_icctrcsta1-fiscper(4).
      insert ls_bkpf_sel into table lt_bkpf_sel.
    ENDLOOP.
    Now you have all necessary info to read BKPF:
    SELECT
    belnr
    xblnr
    bktxt
    awkey
    bukrs
    gjahr
    AWTYP
    FROM bkpf
    INTO TABLE it_bkpf
    for all entries in lt_bkpf_sel
    WHERE
      awkey = lt_bkpf_sel-awkey and
      awtyp = lt_bkpf_sel-awtype and
      gjahr = lt_bkpf_sel-gjahr.
    Then you can access BSEG with the bukrs, belnr and gjahr from the selected BKPF entries. This will be fast.
    Moreover I would even try to make a join on DB level. But first try this solution.
    Regards,
      Yuri

  • LOGICAL DATABASE BRF   FOR ...  BKPF AND BSEG

    Hi friends  ,
    i want the change the input criteria  ( select option) in my program , i am using the LDB  "BRF"  ..it gives me standard selection screen  .. but i want to add the GSBER   field in the input  condition  ..
    How can i cahge the selection  criteria in standard LDB ..How can i do that ..
    Ialso want to convert select option in  output to  parameter ...
    Plz suggest..

    Dude LDB gives me one extra selection  parameter   but i need not that parameter ...
    Is ther any way by which i remove that  selection parameter and add up my new paramere ...
    The same thing  i done in pnp LDB  but i am unable to do  same in brf LDB. 
    Beaus in PNP there is "HR report  category "  BY which i cam made  >>>>

  • Selecting from BKPF and BSEG

    Hi all,
    Can someone help me optimize the performance of this code as i don't know how else to select from BSEG as i cannot use a join coz its a cluster table. I need to find a way to improve the perfomance.Any help would be much appreciated.
    SELECT belnr gjahr bukrs budat stblg awkey blart
             FROM bkpf INTO CORRESPONDING FIELDS OF TABLE t_bkpf
             WHERE belnr IN s_belnr and
                   gjahr = p_gjahr  and
                   bukrs = p_bukrs.
      LOOP AT t_bkpf.
          SELECT belnr gjahr buzei ebeln ebelp
               wrbtr fipos geber fistl fkber
               augbl augdt shkzg
        INTO CORRESPONDING FIELDS OF table t_bseg
        FROM bseg
        WHERE belnr = t_bkpf-belnr
        AND   gjahr = t_bkpf-gjahr
        AND   bukrs = t_bkpf-bukrs.
    Thanks alot
    seema

    Hi Seema,
    You have to avoid the database retrival inside the loop.You can use for all entries.
    This is taken from a link.
    Some of the SAP tables are not transparant, but pooled or clustered. Be aware of this !
    There are a lot of limitations on how such tables can be accessed. You can not include such
    tables in database views and join constructs. The FI-GL table BSEG, which is one of our
    biggest PR1 tables, is an example of a clustered table. At the database-level, there is no table
    called BSEG, but instead RFBLG is being used for the BSEG data. Most of the fields known
    in BSEG are not known in the database table RFBLG, but are compressed in a VARDATA
    field of RFBLG. So tests in the WHERE clause of SELECTs agains BSEG are not used by
    the database (e.g. lifnr = vendor account number, hkont = G/L account, kostl = cost center).
    As a consequence, these tests are done after the facts similar to using the CHECK statement,
    and as already said in tip 1, CHECK statements are worse than tests in the WHERE-clause.
    Check this link also.
    How to Read BSEG Efficiently
    you'll never select table bkpf alone.
    alternatives:
    1) select with header information from bkpf
    2) use secondary index tables
    Re: Tuning cluster table selection
    3) use logical data base e.g.: BRF
    Hope this helps.If so,reward points.Otherwise, get back.

Maybe you are looking for