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: 

MSEG vs MBEW

Former Member
954

Developing a report where have to read material documents for a given Valuatiuon class & business area .

For this first reading table MBEW. After getting material numbers for the given valuation class reading table MSEG for selected material nos & given Business area.

But its taking lot of time.

Is there any other way out to derive this info.

pls help.

thanks a lot.

4 REPLIES 4

Former Member
263

Hi,

It is going to take a lot of time. Users should be restricting it with some other filters (eg Material doc date) which shall give you an alternate DB selection path (MKPF onwards).

Minor improvement can be had by using performance improvement techniques (read all MBEW in an indexed itab, do a 'for all entries in' for MSEG, etc).

cheers.

Ajay

263

I suspect the time is being spend reading MSEG, there is a native index supplied by SAP and it is M - Material documents by Material it has the following fields in it

MANDT

MATNR

WERKS

LGORT

BWART

SOBKZ

your could try supplying some of these in you code for you read on MSEG.

Alternatively create a new index for your specific fields but there are drawbacks with this approach.

Regards

Dave

263

Hi,

Please see that table EKBE can help you out in your problem. From MATNR you can get MBLNR from EKBE, from that MBLNR you can access more info from MSEG that will be faster than the present one.

BR

Sandeep

263

Don't use EKBE, as EKBE is a table used for the history of Purchasing Documents only. This does not display all Material documents (MBLNR) as there are MBLNR for reasons other than purchase documents. eg: Stock movements, issues to orders, issues to projects etc...

Dave