Skip to Content
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 :

TVARVC.jpg

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.

Selection screen.jpg

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 :

/wp-content/uploads/2014/01/2_367152.jpg

Enter the variant created :

/wp-content/uploads/2014/01/3_367153.jpg

List of variables of selected for variant :

/wp-content/uploads/2014/01/7_367160.jpg

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:

/wp-content/uploads/2014/01/5_367157.jpg

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

/wp-content/uploads/2014/01/6_367158.jpg

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

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Suman Chakravarthy K

    Hi Limbadri,

    I appreciate your sportive nature despite of commenting in other way on your blog 🙂

    Please search for How to Dynamically Update Broadcast Setting Variables in SCN search. There is a wonderful document by M. Mohamed Abdul Rahman Shafi, Suvarna Vandana

    Regards,

    Suman

    (0) 
    1. Suman Chakravarthy K

      Search this as well Variant Creation in SAP BI to Be Used in Information Broadcasting

      I am not saying yours is exactly same as these documents. But do check the above documents as well for your reference.

      (0) 
      1. Limbadri Sabbani Post author

        Hi Suman,

        Thanks again for your efforts and comments. Refereing to my comment above my focus is on making the time variables dynamic which can be used for broadcasting.

        And the with referece to links the focus was on updating the broadcast setting in table RSRD_SETT_NODE_A.

        Once again thanks for your efforts.

        LS

        (0) 
  2. Anshu Lilhori

    Hi Limbadri,

    After reading all the comments above i need to clarify few things:

    RSRD_SETT_NODE_A–This table stores the broadcasting settings and variables and we have a document to update this table dynamically.


    RSRPARAMETRIZA–This table store the variants created by users in workbook and BEx analyzer.So you have shared a program to update the variants dynamically.


    So if user runs report in the month of jan2014 and save the variant in dec.2013 then automatically variant will change to jan2014.This is what you are trying to achieve through this document.


    Correct me if my understanding on the same is wrong.


    Appreciate the efforts you have put in to create this document.


    Regards,

    AL



    (0) 
    1. Limbadri Sabbani Post author

      Hello Anshu,

      Thanks for your comments and appriciation.

      Yes you are right, that is what my understanding regarding Dynamic Time variables.

      Thanks again for thorough perusal.

      LS

      (0) 

Comments are closed.