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: 

BSEG Table

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

What was it that Casey Stengel said???

Rob

5 REPLIES 5

former_member183994
Active Participant
0 Kudos

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.

Former Member
0 Kudos

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

former_member184551
Contributor
0 Kudos

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

Former Member
0 Kudos

What was it that Casey Stengel said???

Rob

0 Kudos

While I appreciate the nice blue star, I don't see how this solves anything.

Rob