‎2008 Nov 14 6:55 PM
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
‎2008 Nov 14 7:28 PM
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.
‎2008 Nov 14 7:28 PM
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.
‎2008 Nov 14 7:29 PM
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