Hello folks,
System Information:
NW AS 7.03 ABAP Stack 731 Level 8, ECC 606 (EHP 6) with SAP_HR 604 Level 69 and EA_HR 607 (HR-Renewal 1) Level 20
Background:
The Report RPTARQDBVIEW (part of the HCM Leave Request application) is used for a selection of ABSREQ-typed receipts from the receipt database and allows for an output of an ALV-grid list.
Requirement/Problem:
The Report's ALV-output has to be loaded with a certain Layout Variant for a particular group of users, either depending of the user's R/3 Roles or due to a specific initial Transaction Code that is used to access the report in the first place.
What I did so far / Idea for an implementation / Question:
I've searched for the terms "ALV_Grid, Layout Variant, Dynamically, List Output" and found no information sources whatsoever concerning my problem (maybe my search parameters are nonsense?). I expected or rather hoped there to be some kind of magical output-variant-thingy I can use as a standard method to achieve my requirement but haven't found one, so I've debugged the horrible vast overhead of the frame program down to cl_gui_alv_grid-> set_table_for_first_display which I can theoretically enhance and interpret some prior set memory flag to execute some custom coding and just programatically implement my requirement with this means; this does work out. However, maybe I'm just blind to a more elegant and simpler solution which I didn't find/don't know of.
Any input is appreciated, especially that with a slap to the face and a pointing to a trivial SAP-Standard approach.
Cheers, Lukas