Status of availability of BEX Query
Wally doesn’t like to be troubled, bugged or made to do work; but every morning he has the task of reporting three different set of IT users from the sales department whether their reports are ready with the latest data.
A month back he was seriously troubled when someone from the Finance department scrutinized the date of last refresh of the data, but since then things have changed and he has undergone a training himself to address trick questions from the users when no technical support is around.
Any way that’s old story- what he wanted now is a status message which will indicate whether those sales reports coming from three different cubes for those three different guys are ready with latest data or not.
The task was simple with not much coding…
Table, RSRREPDIR has two fields INFOCUBE which provides the name of the infocube, and COMPID which provides the technical name of the query.
With the list of queries which Wally wanted to check a simple code fetches the corresponding cube from RSRREPDIR.
With this cube name, we can go to table: RSSTATMANPART and find the request status: STATUS_OUT, Aggregation status: AGGRFLAG, compression flag: COMPFLAG, reporting status: REPORT and most importantly the request date: DATUM_ANF.
If this request date is for the current date (i.e sy-datum) and the request status is OK then the program would return that the corresponding report is indeed ready with the latest data.
Since Wally needed the same info to come in the dashboard I generated a XML(as discussed in the previous blogs) and gave it to him.
[nb: a little extra coding effort would have been required had the reports came from multiproviders]