Performance issue in PS report
I've prepared a PS report that gives the cost status of an asset(under construction). It is a WBS element.
For this, I'm selecting all the projects(PROJ) as in selection criteria.
For each project, the hierarchy(all WBS elements of the project) with an FM.
With that, PRPS -> for WBS element details.
For some WBS elements, there could be asset numbers...means the asset is the WBS element
and the asset is under construction/ activity.
For those assets, I want to find the accounts data from BSEG(or some table).
Now this works fine output-wise.
But the problem is the poor performance.
When BSEG is accessed, I only have the asset number ANLN1(apart from bukrs/gjahr, which is of no great help).
I could not find an alternate table or a table where I can find the key(using the asset number) for BSEG.
Could someone help, please?
Eric Cartman replied
this is what I remembered, but I just checked in our system and what I wrote is correct.
If you have BUKRS, GJAHR and ANLN1, then you can select from ANEP, through this select you get ANEP-BELNR and ANEP-BUZEI, with these two (plus BKPF and GJAHR) you can do a select on BSEG (which is the corresponding FI entry for the asset posting). Please note there could be more entries in ANEP for the above combinations, you need the one, where the depreciation area posts into FI (this is almost always AFABE = 01)
If you still can't find the rigth BELNR and BUZEI in ANEP, please also check ANEK (asset postings header data) as well, BELNR and BUZEI are also there.