‎2009 Apr 30 7:49 AM
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..
‎2009 Apr 30 7:52 AM
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.
‎2009 Apr 30 7:57 AM
‎2009 Apr 30 8:05 AM
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.
‎2009 Apr 30 8:21 AM
‎2009 Apr 30 8:26 AM
‎2009 Apr 30 8:45 AM
Hi,
for fetches with BUKRS and BELNR you should use Table BKPF first.
Regards
Walter Habich
‎2009 Apr 30 8:55 AM
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...
‎2009 Apr 30 8:58 AM
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.
‎2009 Apr 30 9:01 AM
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
‎2009 Apr 30 9:11 AM
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.....
‎2009 Apr 30 9:16 AM
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
‎2009 Apr 30 9:20 AM
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....
‎2009 Apr 30 9:22 AM
Hello,
I will suggest have "Fiscal Year" in the selection-screen as well. It will reduce the "selection" times as well )
BR,
Suhas
‎2009 May 12 12:33 PM
‎2009 May 12 2:43 PM
>
> I am creating a data fix program for BSID database table, where my selection screen parameter are
A data fix program for BSID??
Rob