Entering content frame

Function documentation Variable Selection Change in Background Processing. Locate the document in its SAP Library structure

Use

You might want to periodically load data from the source system into the SAP Business Information Warehouse and, in doing so, need to periodically change selection field contents (for example, date fields). If so, choose one of the following selections in the Type (Variable Changing of Selections with Background Processing) entry column from the Data Selection tab page.

The variables are not replaced by concrete values until a request is made.

Type

Data request

Description

0

Yesterday

(12am – 12am)

1

Last week

(Monday-Sunday)

2

Last month

(1. (First day - last day of previous month)

3

Last quarter

(1. (First day - last day of previous quarter)

4

Last year

(01. (January 1 – Dec 31 of previous year)

5

User time selection

See below

6

ABAP routines

See below

7

Variables

See below

Functions

Time selections with the help of the 0 to 4 types

Note

The 0-4 types only refer to date fields of the data type DATS.

User time selection

Type 5 gives you a free selection of all fields.

If you select this variable type for a field, confirm the selection, and then choose Detail for Type, an additional dialog box appears. In this dialog box you can freely restrict the values of the fields and determine the from-value for the next period and the type of period. If you have confirmed these entries, you can enter the number of periods until the repeat.

Example

Enter the following selection values for an InfoPackage for variable type 5:

Selection value

Entry

From value

1997001

To value

1997002

Next period from value

1997003

Period Indicator (type indicator for period)

1

Number of Periods Until Repeat

12

 

The first data is requested for the time span Jan. 1997 (1997001) up to and including Feb. 1997 (1997002). The second data request, meaning the second period, takes place for the time span March 1997 (1997003) up to and including April 1997 (1997004). After the twelfth run, the system starts counting from 1998001.

Such a period is only sensible if period type 1 (year/period-like) has been selected.

Example

Selection value

Entry

From value

10

To value

18

Next period from value

20

Period Indicator (type indicator for period)

0

Number of Periods Until Repeat

5

 

The first data of the InfoPackage is requested from value 10 to 18. The second data request encompasses the values 20 - 28. As period type 0 has been selected, the request is carried out with ongoing values (30-38; 40-48; 50-58; 60-68). After the fifth period, meaning after values 60-68 have been requested, the scheduler starts over again with the values 10-18.

Selections using an ABAP routine

You can even create an ABAP program that restricts the InfoObject data or field data to be requested. Do this by selecting type 6, confirming your selection, and then choose Detail for Type. A screen appears in which you can enter a name for the ABAP routine. After entering the name you get to the editor and can enter your own coding. The ABAP routine has access to all selection fields and is the last to be processed in the runtime.

Note

When determining the data selection by routines, the single value selection and intervals were automatically set for l_t_range-option = "EQ" and l_t_range-sign always = 'I'. As of SAP BW 3.0, you have to explicitly specify these two fields in the routine. Note that the meaningfulness of the field contents is not checked.

Selections by a variable

Variables are placeholders for values and are not replaced by concrete values until a data request is made. You can also use a Structure linkVariable for selections when requesting data for an InfoObject, if you choose type 7, confirm the selection, and then choose Detail for Type.

Note

The way the selections are filled at runtime depends on the Structure linkProcessing Type for the Variables. For the time selections, you cannot use any variables that use a replacement path or require manual entry.

The system does not check for data type and length when selecting the variables. If necessary, errors are not recognized until the data request run time. However, you can display the selections for a particular variable by choosing Check This graphic is explained in the accompanying text. The system displays the selections in a table that would be determined with a data request. An error occurs, terminating the process, if the variable is not suitable to determine the selection conditions.

Leaving content frame