Program variants

Program variants is a very powerful way for end users to save selection screen data that they need. And share the same input criteria with other users as well.

This blog contains technical tips and tricks for developers and system administrators on variants.

Technical hints for program variants

Function modules:

  • RS_CREATE_VARIANT
  • RS_VARIANT_DISPLAY
  • RS_VARIANT_ADMIN_DATA

Tables:

  • VARI: main variant data
  • VARIT: text for variant

The data is stored in table VARI. But this is in unreadable format. Use function module RS_VARIANT_ADMIN_DATA to read the data. Input is program name. Output is all variant detailed admin data. The data you are looking for is in output table VARIANT_INFO.

TVARV

TVARV is needed in some cases. But best to avoid. In case you still need it: table TVARV can be maintained with transaction STVARV.

Authorization

Apply note 3603592 – Enable authority-check for selection variants for all reports to enhance authorization on program variants. See also note 3170317 – Low level customizing for selection variants on how to activate this.

OSS notes

3216572 – Enable ABAP query variants within RSTRANSP (Transport Selection Variants)

2952867 – Documentation about new tools (RSVCHECK_NEW, RSVARDOC_NEW) for selection variants

  • RSVCHECK_NEW – Check selected variants. Results are displayed in an interactive work list.
  • RSVARDOC_NEW – Adjust selected variants.
  • RS_VARIANT_UPLOAD_DOWNLOAD – Transfer variants via file.
  • RS_VARIANT_CONVERSION_TYPES – Configure DDIC datatypes to be used during adjustment.
  • SVAR_VARIANTS_PARAM_OVERVIEW – Display parameters for variants with a detailed overview of the parameter values and attributes 
  • (Internal) RS_VARIANT_INSPECT – Analyze a variant regarding its consistency, comparing stored parameter properties against the current version in the corresponding report.

Known issues and solutions

Reading content from batch job variants: read this blog.

Variant SAP_PROD is protected; only user SAP can make changes: If you have the required authorization, you can remove the protection on the variant yourself explicitly by running the report RSVARENT.