The user experience is pretty straight forward. A dropdown with the available queries is shown. Once the user selects a query, the result for his team members is shown in the grid. From there the standard ALV functionality can be used for further processing.
Technically, in the loading of the page, the team of the logged in user is read from the database using the standard team viewer functionality, called by function module HRWPC_RFC_GET_OBJECTS. The viewID can be specified in the url parameter Q_TEAMVIEW in the calling application and is defaulted to A_DIR.
The query list is retrieved using the function module RSAQ_READ_QUERY_CATALOG. The parameters for this function module are again provided by parameters in the URL
Q_USERGROUP, defaulted to /SAPQUERY/H2
Q_WORKSPACE, defaulted to G
Once the user selects a query from the dropdown, the query is executed using function module RSAQ_QUERY_CALL and the result is passed to the ALV WDA component. The internal table with the query results contains ‘-‘ in the field names. The WDA ALV component does not support this, so the RTTS is called to the rescue.
The whole coding contains less than 500 lines of code.
So far the short summary of the coding, the complete source code of this application is available as a nugget and can be downloaded here. The nugget will install these 2 components
WDYN ZSDN_MSSQUERIES
WDYA ZSDN_MSSQUERIES
How to install the nugget can be found here
thanks for your comment. I did not explore POWL yet, but this prototype could be easily enhanced to display any kind of data which is in a flat internal table.
Thanks for sharing this, it looks quite nice/better than the standard reporting provided through webgui and Manager Desktop configuration to Manager Self Services…
I’ll surely test it soon.
Thanks again,
Martin