Sei sulla pagina 1di 8

Customer Exits: Enhancement RSR00001.

Dependencies for Variables of Type Customer Exit Locate the document in its SAP Library structure Use: The variable exit may not be executed or false data may be selected when executing a query that contains variables with the replacement path Customer Exit, filled dependently of the entry-ready variables. As a preemptive measure, you can control the dependencies with the parameter I_STEP. Features : The enhancement RSR00001 (BW: Enhancements for Global Variables in Reporting) is called up several times during execution of the report. Here, the parameter I_STEP specifies when the enhancement is called. The following values are valid for I_STEP: I_STEP = 1 : Call takes place directly before variable entry

Comments: This step can be used for Default Values I_STEP = 2

Call takes place directly after variable entry. This step is only started up when the same variable is not input ready and could not be filled at I_STEP=1. I_STEP = 3

In this call, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again. I_STEP = 0

The enhancement is not called from the variable screen. The call can come from the authorization check or from the Monitor. Values of other Variables When calling the enhancement RSR00001 (BW: Enhancements for Global Variables in Reporting), the system transfers the currently available values of the other variables in table I_T_VAR_RANGE. The table type is RRS0_T_VAR_RANGE and the row type RRS0_S_VAR_RANGE references to the structure RRRANGEEXIT.

This structure has the following fields: Field Description VNAM Variable name IOBJNM InfoObject name SIGN (I)ncluding [ [ or (E)xcluding [ [ OPT Operators: EQ =, BT [ [, LE [[, LT [, GE [[, GT [, CP and so on. LOW Characteristic value HIGH Upper limit characteristic value for intervals/the node-InfoObject for hierarchy nodes. Activities A variable that is to be filled dependently of an entry-ready variable must never be filled in step I_STEP=1. Now you are at a position prior to the variable entry. Values have not yet been entered for the input-ready variables. You can insert the following statements to force the variable to be executed with I_STEP=2 and not I_STEP=1. CASE I_VNAM. IF I_STEP <> 2. RAISE no_processing. ENDIF. End of Content Area

Customer Exit for Reporting Variables: Requirement: When ever used executes the report, report should have default values like Month to Date. i.e low value should be first date of the current month and high value should be current date. Enhancement: RSR00001

*&---------------------------------------------------------------------* *& Include ZXRSRU01 *&---------------------------------------------------------------------* DATA: L_S_RANGE TYPE RSR_s_RANGESID. DATA : RATE TYPE /BIC/OIZTRATE. DATA : TEST TYPE /BIC/OIZTRATE. * DATA DECLARAION FOR VARIAVLE 'VAR_DATE_EXIT' DATA: ZDATE TYPE SY-DATUM.

* END OF DECLARATION. DATA: DATE1 TYPE SY-DATUM.

CASE I_VNAM.

WHEN 'ZUEXIT'. IF I_STEP = 1. DATE1 = SY-DATUM. "20080314 DATE1+6(2) = '01'. "20080301 L_S_RANGE-LOW = DATE1. L_S_RANGE-HIGH = SY-DATUM. L_S_RANGE-SIGN = 'I'. L_S_RANGE-OPT = 'BT'. APPEND L_S_RANGE TO E_T_RANGE. endif. When 'VAR_DATE_EXIT'. IF I_STEP = 1. ZDATE = SY-DATUM. " YYYYMMDD ZDATE+6(2) = '01'. L_S_RANGE-LOW = ZDATE. L_S_RANGE-HIGH = SY-DATUM. L_S_RANGE-SIGN = 'I'. L_S_RANGE-OPT = 'BT'. APPEND L_S_RANGE TO E_T_RANGE. ENDIF.

* WHEN 'CUST1'. * * * * WHEN WHEN TEST WHEN 'VHR_VARAIBLE'. 'VAR_GEN'. = RATE - 100. OTHERS.

ENDCASE.

Potrebbero piacerti anche