SAP REFX Conditions – BW Conditions DSO and One Time Conditions

Data from the standard REFX exctractor 0REFX_1 can be loaded into a DSO with keys related to the RE Object (Object ID, Company Code, Building, Rental Space…) the condition Type and a validity date (ex:0DATEFROM). The condition amounts are provided with cumulative Key Figures (see 0COND_CHG) in relation to time.

This works fine for normal condition type  that can have a start date, an end date and in some cases 1 or more dates where the value of the condition changes.


Condition start 01.01.2013 value 100. Condition change on 1.1.2014 value 80. Condition end on 31.21.2014. This results in 3 0REFX_1 records as follow:
VALUEVALIDFROM = 01.01.2013 COND_CHG = 100
VALUEVALIDFROM = 01.01.2014 COND_CHG = -20
VALUEVALIDFROM = 31.12.2014 COND_CHG = -80

There is however one problem with this configuration when a contract contains multiple one-time conditions related to the same condition type whose respective start and end dates are adjacent. 


One-Time Condition start 01.01.2013 value 100. Condition ends on 31.12..2013.
Second One-Time  Condition start 01.01.2014 value 80. Condition ends on 31.12..2014.

This results in 4 0REFX_1 records as follow:
VALUEVALIDFROM = 01.01.2013 COND_CHG = 100
VALUEVALIDFROM = 01.01.2014 COND_CHG = -100
VALUEVALIDFROM = 01.01.2015 COND_CHG = -80

You see that here there are 2 records on the 1.1.2014.  If the transformation rule is set to overwrite, one record will be lost.

What can be done in BW: Make sure that 2 distinct 0REFX_1 records with similar keys do not have the same valid from date. to do this. Locate  possible cases by identifiying the one time condition record and then shift the valid from date by 1 day in the past (and make sure no more overlaps exists any more).

However it is not easy to identify one time conditions in the standard extractor 0REFX_1

To do this you need field UNIQUECOND. This field is available in the extract structure REIS_CONDITION_TRAN and the FM that is executed by the extractor will fill this field. However the field is set to not visible in ROOSFIELD, thus it is not visible in the extraction. A field in an extract structure is set to invisible when field ROOSFIELD-SELECTION equals ‘A’. This can be changed directly in the table by creating and running a small ABAP program. This change is not transportable, you will need to do this in acceptance and production too, and then transport the extractor after having removed the ‘Hide’ flag in RSA6 for the now visible UNIQUECOND field.


REPORT  zorefx_1_roosfield_uniquecond.
DATA: ls_roosfield TYPE roosfield.

  INTO ls_roosfield
  WHERE oltpsource = '0REFX_1'
    AND objvers = 'A'
    AND field = 'UNIQUECOND'.

IF sy-subrc = 0.
  ls_roosfield-selection = ''.
  MODIFY roosfield FROM ls_roosfield.

See also note 931669 – BW conditions: Validity of one-time conditions

Leave a Reply