Вы находитесь на странице: 1из 5

Package Size in ABAP

27/08/2013

BOSE Corporation Vidhi Jogeshwar SAP ABAP

vidhi.jogeshwar@tcs.com

Confidentiality Statement Include the confidentiality statement within the box provided. This has to be legally approved Confidentiality and Non-Disclosure Notice The information contained in this document is confidential and proprietary to TATA Consultancy Services. This information may not be disclosed, duplicated or used for any other purposes. The information contained in this document may not be released in whole or in part outside TCS for any purpose without the express written permission of TATA Consultancy Services.

Tata Code of Conduct We, in our dealings, are self-regulated by a Code of Conduct as enshrined in the Tata Code of Conduct. We request your support in helping us adhere to the Code in letter and spirit. We request that any violation or potential violation of the Code by any person be promptly brought to the notice of the Local Ethics Counselor or the Principal Ethics Counselor or the CEO of TCS. All communication received in this regard will be treated and kept as confidential.

Table of Content 1. 1.1 1.2 1.3 1.4 2. Package size in SAP ABAP .................................................................................................. 4 Requirement:................................................................................................................... 4 Input: ............................................................................................................................... 4 Output: ............................................................................................................................ 4 Solution: .......................................................................................................................... 4 How to use package size: .................................................................................................... 4

1.

Package size in SAP ABAP

If the Business requirement is to work with heavy tables like BKPF and BSEG to fetch Billions of data records, then there comes the limitation of storing the data into internal table. Consider the below case:

1.1 Requirement:
Once in my project I got the requirement to create the monthly gross sales report for each state.

1.2 Input:
Input being G/L account, company code, fiscal year, fiscal period and posting date.

1.3 Output:
The output will be the file created on application server contains G/L Account, State, Fiscal Year, Fiscal Month and Taxable sales, Exempt Sales, Returns and Gross Sales.

1.4 Solution:
In the above case, either the data needs to be fetched from primary table BKPF based on fiscal year or based on posting dates. In both the cases for single company code and single fiscal year number of records in BKPF are more than 1Billion. In this case if I use common select statement I only end up with short dump stating problem with internal table storage. In order to avoid it and complete the requirement I used package size as a tool to get my work done.

2.

How to use package size:

It works like Select and End Select loop. So, say if I give package size as 50000 then data will be selected in the chunks of 50000 during every select. No need to worry about the data part all data will be processed properly. When select is executed subsequent times it picks new set of data. Considering the above example, check following steps to use package size: Check if the fiscal year of posting date is not initial; and then only go for data selection. Format for the select query with package size is Select <*/ field1 field2.. fieldn> From <table name> BKPF PACKAGE SIZE <P variable/constant integer type> Into table <Internal Table Name> Where <Selection parameters>.

Do data processing Then use ENDSELECT statement.

Thank You

Contact For more information, contact gsl.cdsfiodg@tcs.com (Email Id of ISU)

About Tata Consultancy Services (TCS) Tata Consultancy Services is an IT services, consulting and business solutions organization that delivers real results to global business, ensuring a level of certainty no other firm can match. TCS offers a consulting-led, integrated portfolio of IT and IT-enabled infrastructure, engineering and assurance services. This is delivered through its unique Global Network Delivery ModelTM, recognized as the benchmark of excellence in software development. A part of the Tata Group, Indias largest industrial conglomerate, TCS has a global footprint and is listed on the National Stock Exchange and Bombay Stock Exchange in India. For more information, visit us at www.tcs.com.

IT Services Business Solutions Outsourcing


All content / information present here is the exclusive property of Tata Consultancy Services Limited (TCS). The content / information contained here is correct at the time of publishing. No material from here may be copied, modified, reproduced, republished, uploaded, transmitted, posted or distributed in any form without prior written permission from TCS. Unauthorized use of the content / information appearing here may violate copyright, trademark and other applicable laws, and could result in criminal or civil penalties. Copyright 2011 Tata Consultancy Services Limited

Вам также может понравиться