Skip to end of metadata
Go to start of metadata

Author: Andrea Olivieri
Supported Releases: SAP ECC 6.0
Submitted: 20 September 2010

Code is presented in below pages:

  1. Job Steps Analysis - Get Report Name & Variant Name from periodic Scheduled Jobs
  2. Save Variant Data
  3. Variant Catalog Creation

General Flow and Pre-requisites

During a spin-off project of an Italian company in the automotive industry, the customer asked me to identify all the programs variants (of scheduled jobs) containing a defined value of company code ( i.e 'A001') in the selection screen.

In previous upgrade projects, basically for target release 4.70, I used a specific ASU tool, the restore variant tool,which allowed me to use the old variants again in the new release.

So I asked myself why should I have to implement a program from scratch if there is a standard one out there that does everything I need ?

So starting from the ASU variant restore tool, I cloned the source code of the following standard programs:

  • RASUVCAT: Creates a catalog of all variants
  • RASUVSAV: Storage of variant information

Since the goal is to identify job's variants containing the value A001 of the company code, I divided the process in the following operational steps:

  1. Get the program name and variant name from batch jobs
  2. Create Variant Catalog (For the specified program names)
  3. Save the variant Data (only parameters of type BUKRS)


Function Groups ASU2,ASU4 as well as the DDIC Tables TASUVCAT, TASUVEXT, TASUVSVD and TASUNSVO should exist in the system

How It Works

1 - Job Steps analysis (Optional)

I focused exclusively on programs scheduled as periodic jobs, so I implemented an additional ABAP program which reads the job definitions of all jobs with the following states:

  • Scheduled
  • Released
  • Finished

After that, from the related steps, gets the following information:

  • Job name,
  • Program name,
  • Variant name
  • Package.

The output is a raw list.
Copy and paste the column program name from the output list in the selection screen parameter Report(s) of the Variant Catalog Creation program. The snippet of the job steps analysis program could be found here.

2 - Variant Catalog Creation (Mandatory)

Due to performance reasons, first of all you have to create the variant catalog; it's better to restrict the selection to certain reports. is filled .

As result, after the program update run, the TASUVCAT table.

The variant catalog program works in "Delta Mode"; this means that only the variants that were not taken into account during the previous run are cataloged again. The snippet could be found here.

3 - Save Variant Data

Starting from the variant catalog, the current variant data and attributes are stored in both tables TASUVSVD and TASUVSVO.
The TASUVSVD table contains the variant data and TASUVSVO contains the technical field descriptions (TVARV variables, protected fields, and so on).
The program saves only the values of the parameters related to a data element with domain bukrs. The program checks following condition:

* Get active Data Elemnts for Domain BUKRS
select rollname from dd04l
                    into table lt_repository bypassing buffer
                    where domname eq 'BUKRS' and
                         ( refkind eq space or refkind eq 'D' )
                          and as4local eq 'A'.
sort lt_repository.
read table lt_repository with key rollname = ls_dfies-rollname transporting no fields.
check sy-subrc = 0.

The snippet could be found here.

4 - Get The results

You can get the results immediately by the transaction SE16 (table TASUVSVD)