MJAHR and MBLNR exist in both MKPF and MSEG but I am unable to use it. When I remove, it works fine but I need the Year as well so that I am only fetching data for the year(s) I need. Any assistance greatly appreciated. Thanks.
The SUBSELECT is designed for cluster tables, MSEG can be either transparent or cluster depending on SAP version so worth checking as the syntax would need to use SQL SUBSELECT not SQL Select. The following will return only Posting Dates specified from MKPF and pass this filter onto MSEG based on MBLNR so no requirement to add MJAHR in your select statement