Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to dispaly table contents of the table having millions of record

Former Member
0 Kudos

Hi All,

we have a requirement to create a transaction to display the table contents of a table. This table contains millions of records.

please share some lights on the way to approach this problem. We dont want to create a report program and disply the record in ALV format.

Thanks

18 REPLIES 18

Former Member
0 Kudos

Do you need to display all of the records at one time or what??

Rob

0 Kudos

No We it is not needed to dispaly all the contents in one go.

i just need pointers so that it should not have performance issue.

populating data in internal table and displayin the same in ALV format can have performance issue.

0 Kudos

Well, you haven't provided enough information:

What table?

What selection criteria?

Etc?

Rob

0 Kudos

the table name is bseg,

the user wants to display the data using company code.

0 Kudos

>

> the table name is bseg, the user wants to display the data using company code.

God Help !!

0 Kudos

Time for some user education. If you try to display all BSEG data for a company code with many documents, it will take forever. No way to get around it.

Rob

0 Kudos

Actually we have merged 5 system into one system. Now the user want us to create a transaction which will first authorize the country key and then get some fields to fetch data,as we do in se 16.

Few additional requirements are that the user from other country can not see the data of other system.

Edited by: KUNAL KISHAN on Sep 8, 2010 5:53 PM

0 Kudos

I think you sold do that by user profile...

0 Kudos

Hi KUNAL,

just one hint: Almost never a direct select from BSEG makes any sense.

The first approach is a select on one or more of the relevant secondary index tables

BSAD                           Accounting: Secondary Index for Customer
BSAK                           Accounting: Secondary Index for Vendors
BSAS                           Accounting: Secondary Index for G/L Acco
BSID                           Accounting: Secondary Index for Customers
BSIK                           Accounting: Secondary Index for Vendors

Use the keys got here to make further filtering via BKPF which has criteria like (i.e.) clearing date, posting key and account type.

Finally take the remaining keys to select some relevant fields from BSEG using for all entries clause.

To display as many lines in ALV as a user wants to see and to interpret does not really cost much time.

Regards,

Clemens

0 Kudos

>

> just one hint: Almost never a direct select from BSEG makes any sense.

That is simply incorrect.

>To display as many lines in ALV as a user wants to see and to interpret does not really cost much time.

Quite often, when creating ALV displays for large amounts of data, it takes longer for the ALV to format and display than for the SELECT.

Rob

Edited by: Rob Burbank on Sep 8, 2010 2:23 PM

0 Kudos

Using only the company code for fetch the data won't help you because the performance will be poor, you need to see if the information that you looking for is in the tables with secondary index (like Clemens say) to narrow the search because bring to the user 1 million of lines will lose it, also i think that with the user parameters you can restring the access to the information, here we use BSID(open items) and BSAD(Close items) to bring the information from BSEG.

0 Kudos

Hi,

is there any way to authorize se16 transaction?

Suppose if a user from one country try to display the values of BSEG table, he can see data only for his country.

0 Kudos

Hello Kunal,

I don't think it'll be a good idea to use authorization on SE16 directly.

You can create a parameter transaction for SE16 involving BSEG. Remeber to check "Skip Initial Screen"

DATABROWSE-TABLENAME = BSEG

You can now ask your basis team to attach your auth. objects to this transaction. You can use the Auth. Objects S_TABU_DIS (to set display only attribute) & F_BKPF* objects to restrict viewing a/c'ing docs based on comp. codes, vendors, GL a/c's etc.

BR,

Suhas

PS: I don't think there is any auth. obj which'll restrict based on Country, but you can use F_BKPF_BUK to restrcit based on CoCd.

0 Kudos

Hi Suhas,

can you please elaborate on this.

I have discussed this with authorization team. They say it is not possible.

We have the transaction SE16_BSEG and on this we want to put some authorization.

0 Kudos

Hello Kunal,

SE16_BSEG is exactly what i was telling you

Why is your basis team telling they can't add auth. objects to this tcode ? You can add any of F_BKPF* auth. objs to this trxn & restrict the display of the data.

@Mods: May be you should move this discussion to the security forums.

BR,

Suhas

0 Kudos

Hi Guys,

The issue is resloved now.

I used SAP QUERY to achieve this.

We added s_bukrs in the selection screen in the INFOSET and then AT SELECTION SCREEN on s_burks, we did the authorization.

thanks all for the inputs

Former Member
0 Kudos

Here is the blog that could solve your problem. It also has BSEG ALV report:

/people/rob.burbank/blog/2007/11/12/quickly-retrieving-fi-document-data-from-bseg

There is an index in 4.7 (BKPF~5) for BUKRS, CPUDT and BSTAT

Remember that if you only want normal documents, you can use BSTAT = SPACE and ignore the rest.

0 Kudos

>

> Here is the blog that could solve your problem. It also has BSEG ALV report:

>

> /people/rob.burbank/blog/2007/11/12/quickly-retrieving-fi-document-data-from-bseg

I must admit that this is a brilliant blog but it won't really help someone trying to SELECT a million lines from BSEG.

Rob