10-06-2008 7:39 AM
Hi Experts,
In my program I need to retrive from BSEG based on the material number as it is a cluster table it is taking lot of time . As BSEG is a combination of different tables in which table can I get the matnr number and BELNR.
10-06-2008 10:50 PM
10-06-2008 7:59 AM
Try BSIM table which is a secondary index for BSEG, as are BSID/BSAD, BSIK/BSAK, BSIS/BSAS. Since this is a transparent table, you should have no problem creating an index.
10-06-2008 11:31 AM
hi,
While writing a select statement, to access the record quickly its better to mention all the fields of a primary key.If not possible, atleast the fields mentioned in the where statement should be in order.
See in you select statement ebeln,ebelp are compared first and belnr is compared last.Compare them in the order in which they are in the table.
Even while selecting the data, gjahr matnr wrbtr is not matching with the table order.
Please change the order of the fields and check the performance.Surely it will not take time as much as before.
select belnr gjahr wrbtr sgtxt matnr ebeln ebelp prctr
from bseg into corresponding fields of table ist_bseg
for all entries in ist_mseg
where
belnr between '0002800000' and '0002899999'
and matnr = ist_mseg-matnr
and ebeln = ist_mseg-ebeln
and ebelp = ist_mseg-ebelp.
Hope this is helpful.
Regards,
Midhun Abraham
10-06-2008 10:40 PM
Hi
Usually you can get in BKPF all that you need from BSEG. A combination of BSIK/BSAK (for Vendor) and BSID/BSAD for Customers is also a good idea.
But in case you HAVE to read bseg, dont code your own select query but use a standard core FM like
GET_ALL_BSEG
SET_ALL_BSEG
READ_BSEG
Search the Function library to see documentation and how to use.
Rgds
Sameer
10-06-2008 10:50 PM
02-24-2009 4:59 PM
While I appreciate the nice blue star, I don't see how this solves anything.
Rob