Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *&---------------------------------------------------------------------*
- *& Report ZUT_LIST_VARIANT_VALUES
- *&---------------------------------------------------------------------*
- *& Selektionen und Parameter mehrerer Varianten / Reports auflisten
- *&---------------------------------------------------------------------*
- report zut_list_variant_values.
- tables: varid.
- * ----------------------------------------------------------------------
- * ZSPARAMS and ZSPARAMS_TAB are defined as a DDIC type in our system
- * To make the report self-contained, I include them here as local types
- * ----------------------------------------------------------------------
- types:
- begin of zsparams,
- report type repid,
- variant type variant.
- include type rsparams.
- types:
- end of zsparams,
- zsparams_tab type standard table of zsparams
- with non-unique default key.
- * ----------------------------------------------------------------------
- select-options:
- s_report for varid-report,
- s_varid for varid-variant.
- start-of-selection.
- perform start.
- form start.
- if s_report[] is initial and
- s_varid[] is initial.
- message 'Bitte die Selektion einschränken' type 'I'.
- return.
- endif.
- data: lt_params type zsparams_tab.
- perform select changing lt_params.
- perform display changing lt_params.
- endform.
- form select changing ct_params type zsparams_tab.
- data: lt_values type rsparams_tt,
- ls_variant type zsparams.
- select report, variant from varid into @ls_variant
- where report in @s_report
- and variant in @s_varid.
- call function 'RS_VARIANT_VALUES_TECH_DATA'
- exporting
- report = ls_variant-report
- variant = ls_variant-variant
- tables
- variant_values = lt_values
- exceptions
- variant_non_existent = 1
- variant_obsolete = 2
- others = 3.
- check sy-subrc eq 0.
- loop at lt_values into ls_variant-params.
- append ls_variant to ct_params.
- endloop.
- endselect.
- endform.
- form display changing ct_params type zsparams_tab.
- call function 'REUSE_ALV_GRID_DISPLAY'
- exporting
- i_structure_name = 'ZSPARAMS'
- tables
- t_outtab = ct_params
- exceptions
- program_error = 1
- others = 2.
- if sy-subrc <> 0.
- message 'Fehler beim Aufruf des ALV Grid' type 'I'.
- endif.
- endform.
Add Comment
Please, Sign In to add comment