Copied from another forum. Pls check the note, if it can help.
If MKPF only purpose is to check the posting date, can you consider implementing Note 1516684 - MKPF fields added to MSEG - Performance optimization so MSEG will contain a
BUDAT_MKPF (and other MKPF fields) and you are no longer required to read MKPF