My ABAP report creates a list of locked records and presents them as an ALV grid. For this I use the class cl_gui_alv_grid. To make the processing of the reported data records more efficient, it should be possible to jump directly from the list to transaction PA20 (infotype, start date, end date).
The list has the following structure:
- personnel number
- infotype
- start date
- end date
Is this possible?
Yes, this should be possible.
First you would need to implement an event handler for the event
double_clickofcl_gui_alv_grid. You do that by creating a local class with an event handler method:Then you need to implement the method
on_double_clickto read the clicked line from your data table using the content of the parametere_rowand then useCALL TRANSACTIONto start the transaction PA20. You can also perform some actions in the transaction PA20 before giving control to the user, like entering a personnel number or the time and then performing the "view" action. You do that by passing a table with batch-input actions using the additionUSING bdc_tabto CALL TRANSACTION. More about that in the documentation which also includes an example how to do it with a batch input table.Then you assign that event handler after you created your ALV grid: