After the event handling for previous
and next
(where you naturally know if the user has requested a different output), you should then produce the form according to the selection made by the user.
Check if a new selection has been made.
Fetch any PERNR
-specific data you need for generating the form, for instance, infotype data.
Generate the output form, which means call your report, ready to put in into the Document Container (that will happen in the next step).
Handle any errors coming from the report, or from the reading of the infotype data and so on.
Note
If you re-implement a Java scenario, refer to the Java implementation of your scenario on what exactly you must do, as it will be different for every scenario.
Example
Code example for checking if the user has changed the list selection or if a Previous
or Next
event has been processed (this is all evident from the comparison of the incoming CV_LEAD_INDEX
and the
class’ own GV_PREV_LEAD_INDEX
:
Syntax
IF cv_lead_index NE gv_prev_lead_index.
ME->PRODUCE_FORM(
EXPORTING
IV_ACTUAL_LINE = cv_lead_index
IMPORTING
EV_PDF_CONTENT = lv_output_content ).