Application Development and Automation 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: 
Read only

Performance --- BSID table

former_member212005
Active Contributor
0 Likes
1,856

Hi,

I am creating a data fix program for BSID database table, where my selection screen parameter are

BUKRS (Company Code)

BELNR (Document Number)

BLART (Document Type)

ZLSCH (Payment Method)

using these selection screen parameter I am fetching entries from database table BSID...

However its taking lot of time to fetch data....

Is there any alternative approach.....other than creating Indexes..

15 REPLIES 15
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,747

As you mentioned that you have laready tried using secondary index with the selection paramters , now it depends on the number of entries for this selection group.

May you can tyr using CURSOR with package size say 50000.

Read only

Former Member
0 Likes
1,747

Can u write ur query , how r u fetching the data.

Read only

0 Likes
1,747

SELECT bukrs

kunnr

gjahr

belnr

buzei

zfbdt

zbd1t

zlsch

zlspr

FROM bsid

INTO TABLE gt_bsid

WHERE bukrs EQ p_code "A

AND belnr IN so_belnr

AND blart IN so_blart

AND zlsch IN so_zlsch.

Read only

0 Likes
1,747

Hi Vin,

try this FM

FM_READ_BSID

Regards,

Amit

Read only

0 Likes
1,747

Sorry Amit....

Unable to find such a function module.......

Read only

former_member435013
Active Participant
0 Likes
1,747

Hi,

for fetches with BUKRS and BELNR you should use Table BKPF first.

Regards

Walter Habich

Read only

0 Likes
1,747

Walter, even if I use BKPF database table it will not solve my problem...

My requirement is that I have to fetch all the documents which are entered in the selection screen parameter and update a particular field......

Its when fetching it takes lot of time...

Read only

0 Likes
1,747

hmm...

few options you may try:

1. create secondary index if possible.

2. Create a FM and write this select in that , call this FM in background task and within teh FM use CURSORs.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,747

Hello Vin,

This is going to be a very expensive SELECT b'coz w/o the "Fiscal Year" in the selection-screen (BSID-GJAHR) you are trying to fetch all the Vendor "Open Items" from "Ad infinitum".

Is this what you want functionally? Or, can you restrict the selection by adding "Fiscal Year" in the selection-screen?

Plz revert back.

BR,

Suhas

Read only

0 Likes
1,747

Suhas.....

I tried the select statement by adding 'Fiscal year'....however the performance is more or less the same...

Alternatively....when I select data using KUNNR...the result is very fast.....

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,747

Hello,

If i were in your position i will like to have the following params as MANDATORY in the selestion-screen:

Comp. Code: BSID-BUKRS,

Customer: BSID-KUNNR,

Fiscal Year: BSID-GJAHR.

Rest other fields are "good to have" & can be used based on your funstionality.

BR,

Suhas

Read only

0 Likes
1,747

Suhas,

I have already suggested the Business to replace the selection screen parameter (BELNR) with KUNNR....So that everything goes smoothly....

Thanks for the Reply....

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,747

Hello,

I will suggest have "Fiscal Year" in the selection-screen as well. It will reduce the "selection" times as well )

BR,

Suhas

Read only

former_member212005
Active Contributor
0 Likes
1,747

The Selection Screen parameter has been changed! hurray

Read only

Former Member
0 Likes
1,747

>

> I am creating a data fix program for BSID database table, where my selection screen parameter are

A data fix program for BSID??

Rob