Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
Purpose

To simply the process of updating time variables dynamically, thus use for broadcasting reports.

An attempt is made to create a process unlike standard solution which was available in 3.5 for updating time variables using TVARVC table.

Background information

  • Starting from version BI 7.0, standard solution for handling BEx time variants was not supported
  • SAP BEx variants  are saved in table RSRPARAMETRIZA
  • The variant values are saved in the field CONTENT of table RSRPARAMETRIZA in xml format
  • Functionality extended to have user specific variants along with global variants
  • The technical name of variant (Only Key field) is unique throughout the system

Prerequisites

Entries in TVARVC table and update program scheduled daily.  You can refer to OSS notes 557314 for creating entries in TVARVC table.

Advantages

  • You can map all the variables available in TVARVC table to BEx variables
  • Creating customer exits variables can be avoided
  • Increases the flexibility of the workbook or query (with input ready variable) to use for adhoc analysis (Flexibility to change the values at runtime)

List of time variables in TVARVC table

Current month 01.2014 :

Step by step procedure for implementation

Create a custom table “ZRSRPARAMETRIZA“ with below fields

Field

Data element

Data type

Length

Short Description

PARAMNM

RSRVARI

CHAR

30

Variant

VNAM

RSZVNAM

CHAR

30

Name (ID) of a Report Variable

DATA_PROV

ZDATA_PROV

CHAR

30

Data Provider

NAME

RVARI_VNAM

CHAR

30

ABAP: Name of Variant Variable

OWNER

RSOWNER

CHAR

12

Owner (Person Responsible)

TSTPNM

RSTSTPNM

CHAR

12

Last changed by

TIMESTMP

RSTIMESTMP

DEC

15

UTC Time Stamp in Short Form (YYYYMMDDhhmmss)

SIGN

TVARV_SIGN

CHAR

1

ABAP: ID: I/E (include/exclude values)

OPTI

TVARV_OPTI

CHAR

2

ABAP: Sel. option (EQ/BT/CP/...)

LOW

TVARV_VAL

CHAR

45

ABAP/4: Sel. value (LOW or HIGH value, external format)

HIGH

TVARV_VAL

CHAR

45

ABAP/4: Sel. value (LOW or HIGH value, external format)

Above table is used to store the entries of Time variables of BEx variants required to updated.

Create a program Z_DTV_BI* and assign transaction code ZVARBI

The program reads from standard table RSRPARAMETRIZA and lists the variables of selected variant

The TVARVC variable can be mapped to time variable from the list

Create a program ZUPDRSRPARAMETRIZA* and assign transaction code ZVARPRGBI

The above program should be scheduled daily so that it updates standard table RSRPARAMETRIZA table for the records available in custom Z table.

*The programs are attached to the document.

The flow and features

Creation of entry in custom table:

The variant is read from RSRPARAMETRIZA

Displayed in the ALV GRID

Select the time variable and assign variable from TVARVC table

Save the entry

The entry is saved in ZRSRPARAMETRIZA

Standard table is updated with values of picked variable from TVARVC table

Modification of entry in custom table:

The variant is read from RSRPARAMETRIZA

If the entry is available in ZPARAMETRIZA table then corresponding TVARVC table value is picked

Displayed in the ALV GRID (Highlighted)

Select the time variable and change variable from TVARVC table

Save the entry

The entry is updated in ZRSRPARAMETRIZA table

Standard table is updated with values of picked variable from TVARVC table

Deletion of entry in custom table:

The variant is read from RSRPARAMETRIZA

If the entry is available in ZPARAMETRIZA table the corresponding TVARVC table value is picked

Displayed in the ALV GRID

Select the required record and delete

The record is deleted from ZPARAMETRIZA table

Step by step process

BEx variant creation :

Here the variant is saved with month 2013 for Cal. Year/Month variable.

As you can observe from the screen shot, options to save variant as user specific.

Note :  The user specific variants cannot be updated with this process, since no technical name would available.

Execute the T code :

Enter the variant created :

List of variables of selected for variant :

Select the record of time variable to hook with variable from TVARVC using F4 function.

We have selected, single value (MMYYYY), actual month -0.

Re-run the transaction for confirming the entry, the record is highlighted:

Select the variant at selection screen, the udpated value can be seen:

Here you can see tha variant have overwritten the value 12.2013 with new value 01.2014.

Maintenance

Below listed two programs must be executed to update the corresponding values in table.

Update program for TVARVC

Update program for RSRPARAMETRIZA  - ZUPDRSRPARAMETRIZA

Variants for broadcasting

With above solution the udpated time variables can be used for broadcasting.

Suggestions and Comments are appreciated

7 Comments
Labels in this area