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

performence Issue

Former Member
0 Likes
393

Hi all,

I am getting the latest Posting date from table MKPF .

To get the POsting date i need join the MSEG and MKPF and MARD.

I have one internal table T_MARD contains the 20000 records. I am putting the into the MSEG table key with MATNR , WERKS and LGORT by for all entries in T_MARD, But these are non key fields in MSEG table.

Once we get the data from MSEG (MBLNR,MJAHR), I am putting this data into MKPF to get the posting date. Because of this performence issue is cming . Please suggest me in this to improve the performence.

Suggest me any function module to get latest posting date by passing the MATNR WERKS LGORT

regards,

Ajay reddy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
373

Hi,

From what I understand, you need the highest posting date for a given material, plant and storage location. So instead of quering the MARD table and then MSEG, why don't you straight away query the MSEG table using the Index MSEG~M ( MATNR, WERKS, LGORT ...) and then fetch the table MKPF for all the unique entries of MSEG.

Of course, this will not reduce the number of records to be fetched, but atleast will avoid access to one table which might bring down the runtime.

regards,

Advait.

2 REPLIES 2
Read only

Former Member
0 Likes
374

Hi,

From what I understand, you need the highest posting date for a given material, plant and storage location. So instead of quering the MARD table and then MSEG, why don't you straight away query the MSEG table using the Index MSEG~M ( MATNR, WERKS, LGORT ...) and then fetch the table MKPF for all the unique entries of MSEG.

Of course, this will not reduce the number of records to be fetched, but atleast will avoid access to one table which might bring down the runtime.

regards,

Advait.

Read only

former_member189420
Active Participant
0 Likes
373

Hi,

Check by creating indexes on the MSEG table. Though it is not recommended to go for creating indexes on transaction table. But, if it could help improve the performance then why not...

Indexes improve performance in a huge way.

Regards,

Anand Patil