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.

Webdynpro tips & tricks

SAP web dynpro is still in use and is a good way for ABAP devevloper to create web screens for end users.

Tips and tricks for basis

Transactions:

  • SICF: activation or de-activation of web dynpro services (see blog for all SICF tips and tricks)
  • SICF_SESSIONS: Enable HTTP security session management at backend(ABAP) system
  • SMGW: gateway monitor
  • SMICM: HTTPs settings

General:

SAP help documentation on WebDynpro can be found here (very extensive).

Unified rendering

Web dynpro uses the unified rendering framework. This needs regular patching. See this blog for more information.

SCOV coverage analyzer

The SAP coverage analyze can be used in testing custom code to make sure all testing covers all code and all branches.

The coverage analyzer has quite an in-depth analysis capability that is meant for non-productive systems. Don’t run it on productive systems.

Starting the coverage analyzer

On your test system start transaction SCOV and go to the on/off section in the Administration branch:

When switched on it will take at least 1 hour before the first results are visible.

Analyzing the results

During the testing you can view the test coverage results in the Display/Details section. Select there the Z* for all the custom code (you might need to increase the Maximum Number of Objects in the Settings tab):

Wait for the result list and sort by Coverage:

Double clicking on one of the lines gives the coverage per program:

If you select any line you jump to the code lines:

In this case (yellow one), you can see that the normal flow is done, but the exceptions are not reached yet. If the exceptions are important for your business scenario, you know you have to create and fire a test case. Once done, the coverage should increase.

Overall view

In the overall view you can see trend analysis over time:

To refresh the analysis or to set up first time push the Update Analysis button in the middle section (it is a bit hidden).

References

Standard SAP reference for Coverage analyzer: link.

OSS notes: