Package size

hi experts,
please help in  usage of package size in select query  with where  clouses
without for all enteries
regards
prashant

Hi Prashant,
Package size option in select query is useful in multiple cases:
- When the number of records accessed by the select query for the given where clause are very large and it may slow down the performance of the program. In this case package size option is used such that data is fetched in multiple hits.
- If the program is checking for a particular record from the database table having very large number of records without knowing the actual key. In this case package size can be used such that we can check for the existence of the required record after each fetching and can be exited from loop immediately after finding the record.
Thanks,
Sankar

Similar Messages

  • Will it improve performance if PACKAGE SIZE added to a select query?

    Hi Gurus
    While doing the performance optimization I could see that in the code it is splitting the BKPF entries selected to a package of 500 and selecting from BSEG cluster table. In effect the remaining tables are also getting hit based on the no. of entries(packets) in the selected BKPF internal table.
    Cant we use the package size 500  in the select statement instead of this spliting and hiting the tables in a do loop.
    eg:-
          SELECT x  v z
            FROM bseg
            APPENDING TABLE lt_bseg
            PACKAGE SIZE 500
            FOR ALL ENTRIES IN lt_coep
            WHERE bukrs = lt_coep-bukrs
            AND   belnr = lt_coep-belnr_fi
            AND   gjahr = lt_coep-gjahr.
    When I read the keyword documentation I saw  a note in that as " If the addition PACKAGE SIZE is specified together with FOR ALL ENTRIES, it is not passed to the database system, but is applied to the result set on the application server, after all selected rows have been read"  I did not understand the meaning of this.
    So I am confused whether I can go ahead with this approach or will go along with the already used BKPF split logic and selct from BSEG and other tables in DO loop.
    Can you please help me << removed >>.
    Thanks & Regards,
    Shinimol.
    Edited by: Rob Burbank on Sep 23, 2010 9:09 AM

    Hi,
    regarding your second doubt:
    > Second doubt is on the note I saw in key word documentation. " If the addition PACKAGE SIZE is specified together with FOR ALL ENTRIES, it is not passed to the database system, but is applied to the result set on the application server, after all selected rows have been read.  "  I couldn't understnd this. When I debugged the select with F5 it was selecting 500 each  till it reaches th end.
    > So what does it mean, we can use this option or we should not use?
    the FAE does your select in pieces and collects the result in the database interface in an inermediate buffer and
    eliminates the duplicates there. AFTER this it gives you the number of rows back to your ABAP program that are specified with package size. It simply means that the package size addition has no effect on the memory consumptionfor the intermediate
    buffer in the database interface.
    Kind regards,
    Hermann

  • Issue when number of records in a DSO exceeds DTP package size

    Hi all,
    I'm having a strange problem with the package size of my DTPs.
    I move data from a DSO to another one while performing some transformations in an Export routine. The DTP has a package size of 6 million records.
    When the number of records in the first DSO exceeds the package size, some of the records seem not to be processed properly by the transformation and this forces me to choose a very large number for the package size so that the ABAP code in the transformation is processed for all the records of the source DSO.
    I can't understand why this is happening because package size is only supposed to determine the number of records to be processed in a single step and nothing else.
    Am I right?
    Thanks

    My tip would also be the summary item

  • Package Size parameter in Partner Profile

    Hello guys,
    I'd need your advice. We have 2 systems (SAP and Non-SAP) and we need to connect them by mean of HR-PDC interface (IDoc communication is supported). We can create new Partner Profile in SAP and we can add a few IDoc types as Inbound Parameters of the partner profile. Then it is possible to define maximal package size for several IDoc types. I suppose that the Non-SAP system reads the Partner Profile and the "Package Size" parameter for the particular IDoc type before it sends some IDoc to SAP system. IDoc's size is limited by the parameter.
    And now our problem. We need to insert XI between these 2 systems. XI should only forward IDocs and nothing else. How could I set up limitation of IDoc's size? Do you thing that following scenarion could be working?
    I would define Partner Profile in XI same way as in the previous case in SAP. XI is configured to process IDocs in Integration Server by means of IDoc adapter. My expectation is that the Non-SAP system would read the partner profile in XI (including "Package Size" parameter) and then it would send IDoc to XI. Then XI would process the received IDocs in IDoc adapter.
    How can be "Package Size" parameter useful for inbound IDocs?
    Best Regards,
    Zbynek

    Hello ,
                Check the blog below
    /people/michal.krawczyk2/blog/2007/12/02/xipi-sender-idoc-adapter-packaging
    Rajesh

  • Need you help !!! -- How to set PACKAGE SIZE in CURSOR?

    Dear experts:
    Does anybody know how to set the package size if you use cursor in your abap program?
    My scenario is to select all the data from MARA table in which the data volumn is very big, and then process for some specific logic. When I try to select them into one internal table or use CURSOR without package, my abap program will abort after running for around 1 hour. So I was thinking if I can use cursor and set the PACKAGE SIZE like 10,000 and process the data by batch.
    Here is my sample code:
    OPEN CURSOR: CUR_MARA_TBL FOR
    SELECT * FROM MARA.
    DO.
    FETCH NEXT CURSOR CUR_MARA_TBL INTO CORRESPONDING FIELDS OF WA_MARA_TBL.
    IF sy-subrc = 0.
    ......Detail logic......
    ENDIF.
    ENDDO.
    I would appreciate if anybody can let me know how to set the package size based on the sample code above, or any webpage/article about that.
    Any reply would be appreciated and thank you all in advance!
    Best Regards.
    Tim
    Moderator message: please study F1 help for FETCH statement.
    locked by: Thomas Zloch on Sep 8, 2010 4:10 PM

    The Spark List's layout property has the requestedRowCount and requestedMinRowCount properties.
    You can either set a new layout property on your List like this:
    <s:List>
            <s:layout>
                <s:VerticalLayout requestedMinRowCount="1" />
            </s:layout>
        </s:List>
    or reskin the List and modify the VerticalLayout in your copy of ListSkin.
    Jason

  • Report for all RAP advertisements with Package size.

    Hi,
    I have received a requirement to get the information about all the advertisements published in RAP along with package details like (Package Name/version/ and Package size).
    I have two different working reports, merging these two reports would suffice my requirements.
    Please help to merge below two reports.
    1.  
    SELECT DISTINCT p.PackageID, p.Name,p.Version, p.SourceVersion, 'Source Size (MB)' = n.SourceSize/1024
     FROM v_Package p
     LEFT JOIN
     v_PackageStatusRootSummarizer n
     ON
     p.PackageID = n.PackageID
    order by Name
    2.
    SELECT v_Advertisement.AdvertisementName,
    v_Advertisement.Comment, 
    v_Package.Name AS C062,
    ProgramName,
    v_Advertisement.SourceSite,
    CASE WHEN AssignedScheduleEnabled != 0 or
                                          (AdvertFlags & 0x720) != 0
    THEN '*'
    ELSE ''
    END AS C063,
    v_Collection.Name as C064, 
    CASE IncludeSubCollection
    WHEN 1 THEN '*'
    WHEN 0 THEN ''
    END AS C065,
    AdvertisementID
    FROM v_Advertisement 
    INNER JOIN v_Package ON v_Advertisement.PackageID = v_Package.PackageID
    INNER JOIN v_Collection ON v_Advertisement.CollectionID = v_Collection.CollectionID
    ORDER BY v_Advertisement.AdvertisementName
    The Lightning Khan

    SELECT
    p
    .PackageID,
    p.Name,p.Version,
    p.SourceVersion,
    'Source Size (MB)'
    = n.SourceSize/1024,
    v_Advertisement
    .AdvertisementName,
    v_Advertisement
    .Comment,
    p
    .Name
    AS C062,
    ProgramName
    v_Advertisement
    .SourceSite,
    CASE
    WHEN AssignedScheduleEnabled
    != 0
    or
    (AdvertFlags
    & 0x720)
    != 0
    THEN
    ELSE
    END
    AS C063, 
    v_Collection
    .Name
    as C064,
    CASE
    IncludeSubCollection
    WHEN
    1 THEN
    WHEN
    0 THEN
    END
    AS C065,
    AdvertisementID
    FROM v_Advertisement
    INNER
    JOIN v_Package p
    ON v_Advertisement.PackageID
    = p.PackageID
    INNER
    JOIN v_Collection
    ON v_Advertisement.CollectionID
    = v_Collection.CollectionID
    LEFT
    JOIN  v_PackageStatusRootSummarizer n 
    ON  p.PackageID
    = n.PackageID
    ORDER
    BY v_Advertisement.AdvertisementName
    John Marcum | Microsoft MVP - Enterprise Client Management
    My blog: System Center Admin | Twitter:
    @SCCM_Marcum | Linkedin:
    John Marcum

  • Error in select query with package size

    Hi Experts,
    I have an issue.
    SELECT * FROM (w_tab-tablename) I
    NTO CORRESPONDING FIELDS OF TABLE <lt_data> PACKAGE SIZE 10000.
    Am splitting the table for every 10000 records,for first time the select query is successful.
    But when it comes for the second 10000 records,its throwing the following dump.
    "DBIF_RSQL_INVALID_CURSOR"
    Help Appreciated

    Hi,
       There are a few instances where you get this error.
        1) If you are debugging inside select ... endselect.
        2) You have written any of the below statements inside select ... endselect.
    Please look at the dump .. you'll find the below ..
    MESSAGE (apart from MESSAGE S...)                                       
    COMMIT WORK                                                             
    ROLLBACK WORK                                                           
    BREAK-POINT                                                             
    WAIT                                                                    
    CALL FUNCTION ... DESTINATION (synchronous RFC)                         
    CALL FUNCTION ... STARTING NEW TASK                                     
    RECEIVE RESULTS                                                         
    CALL DIALOG                                                             
    CALL SELECTION-SCREEN                                                   
    CALL TRANSACTION                                                        
    CALL SCREEN, or any other statement that results in the display of a    
    new screen                                                              
    Regards,
    Srini.

  • Package size in ABAP program

    Hi
    we have requirement to pull data from OHD via data services to text file.
    data services does this by an auto generated abap program which pulls all the data of OHD at one go.
    since data volume of OHD is huge can we split the volume like defining package size we do in dtp.
    any insight on how to incorporate it in ABAP program would be of immense help.

    Hi,
    Try dividing result output/ records by characteristics in the OHD by applying filters at DTP level.
    An alternate way out could  be get all data into table and have custom developed program to load specific number of records by reading the output table in to flat file. Once those many records have been written to file, create new file and move on to writing new set of records.
    Hope that helps.
    Regards
    Mr Kapadia
    *Assigning points is the way to say thanks*

  • Maximum package size for data packages was exceeded and Process terminated

    Hello Guru,
    When i am execute the process chain i got this message Maximum package size for data packages was exceeded and Process terminated,any body help to me in this case how can i proceed.
    Thanks & Regards,
    Suresh.

    Hi,
    When the load is not getiing processed due to huge volume of data, or more number of records per data packet, Please try the below option.
    1) Reduce the IDOC size to 8000 and number of data packets per IDOC as 10. This can be done in info package settings.
    2) Run the load only to PSA.
    3) Once the load is succesfull , then push the data to targets.
    In this way you can overcome this issue.
    You can also try RSCUSTV* where * is an integer to change data load settings.
    Change Datapackage size for extraction, use Transaction RSCUSTV6.
    Change Datapackage size when upload from an R/3 system, set this value in R/3 Customizing (SBIW -> General settings -> Control parameters for data transfer).
    IN R/3, T-Code SBIW --> Genaral settings --> Maintain Control Parameters for Data Transfer (source system specific)
    Hope this helps.
    Thanks,
    JituK

  • "Maximum package size for data packages was exceded".

    Hi,
    We are getting the below error.
    "Maximum package size for data packages was exceded".
    In our scenario we are loading the data product key wise (which is a semantic key as well) to the DSO thro’ a start routine.
    The logic in the start routine is such a way that it calculates the unique product counts , product key wise. Hence we are trying to
    group  the product key thro’ semantic groups.
    Ex: In this example the product counts should be A = 1,B=2 ,C = 1
      Product Key
      Products
      A
      1000100
      B
      2000100
      C
      3000100
      B
      2000300
      C
      3000100
    For some product keys the data is so huge that we could not load the data & we are getting the error.
    Please suggest any alternate way to  handle this thro’ code or introducing any other flow.
    Regards,
    Barla

    HI
    we can solve the issue by opening the system setting of data packer size
    like below we have create 2 programs, 1 for open the system settings,2 for
    close the settings .
    1 start program
    data: z_roidocprms like table of
    roidocprms.
    data: wa like line of z_roidocprms.
    wa-slogsys = 'system_client' . wa-maxsize = '50000'. wa-statfrqu = '10'.
    wa-maxprocs = '6'. wa-maxlines = '50000'.
    insert wa into table z_roidocprms.
    Modify roidocprms from table z_roidocprms .
    2 close program
    data: z_roidocprms like table of roidocprms.
    data: wa like line of z_roidocprms.
    wa-slogsys = 'syetm_client' . wa-maxsize = '50000'. wa-statfrqu = '10'.
    wa-maxprocs = '6'. wa-maxlines = '50000'.
    insert wa into table z_roidocprms.
    modify roidocprms from table z_roidocprms .
    data load infopakage settings we have to maintain like
    below
    we have create the process chain like as below
    1 start progarm
    data load infopakage
    2 close program.
    This might fix the problem.
    Regards,
    Polu.

  • Maximum package size for data packages was exceeded?

    Hi Experts,
    I am facing this problem "Maximum package size for data packages was exceeded". When I am trying to laod. I even tried to reduce data packet and change DTP settings in EXtraction to Get All New Data Request by Request but still same error is occuring. Can u Plz focus light on this.
    Thanks,
    Krishna

    You can refer to the below OSS note:
    Note 1144332 - Consulting note: Message RSBK 250: Package size exceeded
    And other related notes: 352038, 417307
    Hope this helps.
    Murali

  • PACKAGE SIZE n in SELECT query

    Hi,
    When using PACKAGE SIZE n option with SELECT queries, how to determine the best/optimum value of n ? Especially when we use this for querying tables like EKPO, EKKO etc.
    Regards,
    Anand.

    > When using PACKAGE SIZE n option with SELECT queries, how to determine the best/optimum value of n ?
    The 'package size' option to the select specifies how many
    rows are returned in one chunk.
    According to ABAP-Doku, it is best to use it with an internal table:
    DATA: itab TYPE STANDARD TABLE OF SCARR WITH NON-UNIQUE
                     DEFAULT KEY INITIAL SIZE 10.
    FIELD-SYMBOLS: <FS> TYPE scarr.
    SELECT * INTO TABLE itab PACKAGE SIZE 20 FROM scarr.
      LOOP AT itab ASSIGNING <FS>.
        WRITE: / <FS>-carrid, <FS>-carrname.
      ENDLOOP.
    ENDSELECT.
    But, basically, your application's requirements determine
    what's the best value for n.
    If you don't want a lot of DB-access, you choose a high
    value for n. If you don't want a lot of data in memory, you adjust it to a lower value.
    You can also use the 'up to n rows' construct in the select to limit the number of rows fetched from the db.
    thomas

  • Select query with package size

    Hi ,
          i am trying to use select qurey with package size , to limt the data fetching .
    Can any one gives sqample code or idea select query using 'package size'.
    Advance Thanks,
    Regards
    veera

    Hi,
        SELECT vbeln erdat
        FROM vbak
        INTO TABLE li_vbak PACKAGE SIZE 50.
         SELECT posnr matnr meins
          FROM vbap
          INTO TABLE li_vbap
          FOR ALL ENTRIES IN li_vbak
          WHERE vbeln = li_vbak-vbeln.
    Hi i want  to select only from vbeln ,ie single selct query only using pakage size.200,blocks in data base ..How ?
    Regards
    veera

  • Package size in select query

    Hi all,
    Can any body help for how to use package size in select statemtent.
    I want to seletc record in lot of 300 form 10k records.
    And i am using 4.6c version and wnat to know this statement (package size) is there in 4.6c.
    I know it is in 6.0.

    Hi
    Package size in SELECT statements
    Package size can be used to retreive a spcific number of records at a time. This can be used if you
    for example only want tofinish  processing a limited amount of data at a time due to lack of memory.
    The exampel below  read 50 records at a time from VBAK into an internal table, and selects the
    corresponding entries from vbap into an internal table. Then the two internal tables can be
    processed, and the next 50 records from VBAk can be read. remeber to reinitialize tha tables before
    the next read.
    Note the usage of SELECT - ENDSELECT !
    REPORT  z_test                        .
    TYPES:
    BEGIN OF t_vbak,
    vbeln LIKE vbak-vbeln,
    erdat LIKE vbak-erdat,
    END OF t_vbak,
    BEGIN OF t_vbap,
    posnr  LIKE vbap-posnr,
    matnr  LIKE vbap-matnr,
    meins  LIKE vbap-meins,
    END OF t_vbap,
    BEGIN OF t_report,
    vbeln LIKE vbak-vbeln,
    erdat LIKE vbak-erdat,
    posnr  LIKE vbap-posnr,
    matnr  LIKE vbap-matnr,
    meins  LIKE vbap-meins,
    END OF t_report.
    DATA:
    li_vbak   TYPE t_vbak OCCURS 0,
    l_vbak    TYPE  t_vbak,
    li_vbap   TYPE t_vbap OCCURS 0,
    l_vbap    TYPE t_vbap,
    li_report TYPE t_report OCCURS 0,
    l_report  TYPE t_report.
    START-OF-SELECTION.
    SELECT vbeln erdat
    FROM vbak
    INTO TABLE li_vbak PACKAGE SIZE 50.
    SELECT posnr matnr meins
    FROM vbap
    INTO TABLE li_vbap
    FOR ALL ENTRIES IN li_vbak
    WHERE vbeln = li_vbak-vbeln.
    IF sy-subrc = 0.
      Now you have the two internal tables li_vbak and liÆ_vbap filled with data.
      Do something with the data - remember to reinitialize internal tables
    ENDIF.
    ENDSELECT.
    All of the  product names here are trademarks of their respective companies.  The site
    www.allsaplinks.com no way affiliated with SAP AG. We have made every effort for the content
    integrity.  Information used on this site is at your own risk.
              +
    REWARD IF USEFULL+ 

  • How to specify PACKAGE SIZE for to RFC_READ_TABLE from PyRFC?

    I'm trying to use PyRFC to extract large tables via RFC_READ_TABLE (due to an uncooperative/unsupportive basis team).
    I know that RFC_READ_TABLE supports calling it with PACKAGE SIZE since ERPConnect does it by default.
    In Python for Basis (Part 1), I learned how to specify an Open SQL where clause using the OPTIONS:
    result = connector.call('RFC_READ_TABLE',
                           QUERY_TABLE=tablename,
                           DELIMITER=delimiter,
                           OPTIONS = [{'TEXT':where_clause}])
    Is there a way, and how to specify PACKAGE SIZE in this case?
    Thanks

    Hi,
    the package size works, but you need to call the function module multiple times in a loop. Here's an excerpt of the attached script:
    recordcounter = 1          #needs to be >0 to get the while loop going
    iteration = 0              #the number of times the function module got called
    while recordcounter > 0:  #as long as the function module calll returns rows...
        tempresult = self.call('RFC_READ_TABLE',             
                                ROWSKIPS=iteration*fetchsize,  #defines the number of rows to skip
                                **parameters)
        iteration=iteration+1  #increase the iteration
        data = tempresult['DATA']    #assign the returned rows to a variable
        if len(data) > 0:      #have there been any rows?
            for row in data:      #Do something with them
        else:
            recordcounter=0    #set recordcounter to 0 to end the while loop.
    The script is far away from being perfect. It doesn't deal with RAW fields and the data types it returns are all strings. It does what I needed it to do but it may not be sufficient for what you may be trying to achieve.
    Best regards
    Lars

Maybe you are looking for

  • Double-clicking on Sender name to view full contact card

    Just upgraded to Outlook 2013 with Lync 2013, and so far I hate it.  In Outlook 2007, when I opened an email I could double-click on the sender's name and pull up its full contact card with all of the information that I had entered before, including

  • Third party process in MM

    Hi friends, i need all your help in configuring third party process in MM.please guide me by giving step by step process with t-codes. your advise is considdered more valuable. Regards, william

  • Transferring from a Mac 10.2.8 iTunes 6 to WinXP iTunes 7

    I need to transfer my Mac-formatted iPod from a Mac running OS 10.2.8 with iTunes 6 to WindowsXP with iTunes 7 as well as all my music and audiobooks from my Mac iTunes library to my PC. All of the documentation I can find says that they both have to

  • Microsoft Network Load Balancing on the SG-500

    Hello, I wanted to know if the Microsoft Network Load Balancing can also be configured on the switch SG-500? and if so, how?

  • Variables for Rollup selection

    Hello Guys, I am customizing a Rollup (FAGL21) based on table FAGLFLEXT and I want to have multiple Company code selections (single values and/or intervals). I only manage to get a single value or an interval for my selection, do you know how I can g