`

I_T_VAR_RANGE

    博客分类:
  • BW
阅读更多
About Variable:
1.Variable 是和InfoObject绑定的,可用于任何含有该IO的query中。
2.Variable有以下几种类型:
•Characteristic:用于限制Char。
•Text:用于在报表动态显示文本。
•Hierarchy:用于限制Hierarchy。
•Hieararchy Node:用于限制Hierarchy Node。
•Formula: 可以在公式中使用变量,让用户输入一个数,读取某个Char.的属性(例如Prduct的price属性)等来用于计算。
Offset的应用:设置偏移量
SAP BI Content内置了很多标准变量。当其无法满足需求时,有时仅仅需要设置下偏移量就可以满足需求了。
例如系统已经有了当前月份的变量,通过偏移就可以获得上N个月和下N个月的变量,无需增强。

定义Customer Exit Variables(BW 3.x ,BI7 类似)
客户出口变量可以通过程序来处理变量逻辑。定义过程如下:
1.在query designer中,右键单击要建立变量的characteristic,选择New variable.
2.设置为customer exit类型
3.进入CMOD,修改:Enhancement   Exp  RSR00001 BI: Enhancements for Global Variables in Reporting-->Function exit    EXIT_SAPLRRS0_001-->INCLUDE ZXRSRU01 。该Function Module 将在query运行时被调用多次。
3-1:调用前,系统将其他变量的当前值保存在内表 I_T_VAR_RANGE中。The table type is RRS0_T_VAR_RANGE, and row type RRS0_S_VAR_RANGE references 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
Characteristic value of upper limit for intervals or node InfoObject for hierarchy nodes


3-2:每次调用时,系统会传递参数值给Function Module。其中,比较重要的参数如下:

I_STEP 标识了该调用发生的时机:

• I_STEP = 1: Call is made directly before variable entry.
•I_STEP = 2: Call is made directly after variable entry. This step is only executed if the same variable is not input-ready and could not be filled for I_STEP = 1.
•I_STEP = 3: In this call, you can check the values of the variables. When an exception (RAISE) is triggered, the variable screen appears again. I_STEP = 2 is then also called again.
• I_STEP = 0: The enhancement is not called from the variable screen. The call can originate from the authorization check or from the monitor.
I_VNAM标识了当前要处理的变量。

3-3:完成变量的处理之后,应将变量的值写入E_T_RANGE。

Sample Code:
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: L_S_VAR_RANGE TYPE RRRANGEEXIT.
CASE I_VNAM. 
     WHEN 'CUMMONTH'.
        IF I_STEP = 2. "after the popup
            READ TABLE I_T_VAR_RANGE INTO L_S_VAR_RANGE WITH KEY VNAM = 'MONTH'.
            IF SY-SUBRC = 0.
                    CLEAR L_S_RANGE.
                    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)."low value, for example, 200601
                    L_S_RANGE-LOW+4(2) = '01'.
                    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
                    L_S_RANGE-SIGN = 'I'.
                    L_S_RANGE-OPT = 'BT'.
                   APPEND L_S_RANGE TO E_T_RANGE.
                ENDIF.
        ENDIF.
ENDCASE.
 

查看SAP Exit变量
SAP Exit变量为我们编写customer exit变量提供了很好的参考。
1. SE16 查看表 RSZGLOBV 可以得到系统全部变量的列表,选择process type=SAP Exit,即可获得所有的SAP Exit变量列表
2. SE37 查看 RREX_VARIABLE_EXIT 或RSVAREXIT_ * 可以找到SAP Exit变量的代码
分享到:
评论

相关推荐

    Asymptotic behaviour for S-estimators in random design linear model with long range dependent errors

    误差项为长程相依的随机设计线性模型S-估计的渐近性质,林正炎,李德柜,对于线性模型Y_i=X_i^T\beta_0+\varepsilon_i,其中{X_i} 是d维长程相依高斯过程或i.i.d.随机变量,{\varepsilon_i}是长程相依高斯过程,我们...

    BobBuilder_app

    Embedded: You can use RaptorDB inside your application as you would any other DLL, and you don't need to install services or run external programs. NoSQL: A grass roots movement to replace relational...

    matlab在遗传算法中的应用

    for i=1:VarNum Children1(Points(2*i-1):Points(2*i))=Parent2(Points(2*i-1):Points(2*i)); Children2(Points(2*i-1):Points(2*i))=Parent1(Points(2*i-1):Points(2*i)); end %变异操作 function [NewPop]=...

    GENESIS 2000 DFM PE

    The DFM Programming Environment is one of the many unique concepts of the Genesis 2000 system. Unlike any existing tool, the DFM Programming Environment (DFMPE) enables any user with elementary ...

    js使用小技巧

    获得时间所代表的微秒 var n1 = new Date("2004-10-10".replace(/-/g, "/")).getTime() 窗口是否关闭 win.closed checkbox扁平 ; clip:rect(5px 15px 15px 5px)"&gt; 获取选中内容 document.selection....

    表单验证Validator v1.0(CHM) 下载

    ErrorMessage : ["以下原因导致提交失败:\t\t\t\t"], Validate : function(theForm, mode){ var obj = theForm || event.srcElement; var count = obj.elements.length; this.ErrorMessage.length = 1; this....

    php.ini-development

    If PHP can't find an expected ; directive because it is not set or is mistyped, a default value will be used. ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the...

    Swifter-Swift 开发者必备 Tips (第四版).zip

    weak var target: T? let action: (T) -&gt; () -&gt; () func performAction() -&gt; () { if let t = target { action(t)() } } } enum ControlEvent { case TouchUpInside case ValueChanged // ... } ...

    找质数代码matlab-rosetta-euler:罗塞塔·欧拉

    找质数代码matlab 罗塞塔石碑: var ...range ( max ) . filter ( x =&gt; x % 3 === 0 || x % 5 === 0 ) ) ; } var t = tape ( "Problem 1" , test =&gt; { test . equal ( euler1 ( 10 ) , 23 ) ; test .

    Bochs - The cross platform IA-32 (x86) emulator

    - Introduced range read/write physical watchpoints - Allow reloading of segment registers from internal debugger - Improved verbose physical memory access tracing - BIOS - Fix MTRR configuration ...

    Sakemail

    But have one problem, if you send as attach a file &gt; 20 Kb, it doesn‘t work (I don‘t know why, maybe a problem of sockets). Developed with a version 2.0b of WSockets and D3.0.9.3.1b- Changed the ...

    parse-copyright:将版权声明解析为版权对象数组

    解析版权 将版权声明解析为版权对象数组。 使用安装 npm i parse-copyright --save 用法 var parse = require ( 'parse-copyright' ) ; parse ( 'abc\nCopyright (c) 2013-2015, Jon Schlinkert....npm i -d && npm t

    JavaScript权威指南

    Part I: Core JavaScript Chapter 2. Lexical Structure Section 2.1. Character Set Section 2.2. Case Sensitivity Section 2.3. Whitespace and Line Breaks Section 2.4. Optional Semicolons ...

    (重要)AIX command 使用总结.txt

    instfix -i|grep ML //获取硬件信息 prtconf ****** 创建文件系统四部曲 ************************************************ &lt;1&gt; mklv -y lvinformix -c 2 rootvg 64 //在卷组rootvg上创建逻辑卷lvinformix, 大小为...

    jsp分页插件--PageBean(java源码)

    &lt;c:forEach var="i" begin="1" end="${totalPage}"&gt; ${i}" ${currentPage == i}"&gt; selected &gt;第${i}页 输入页码:${currentPage}" id="jumpPageBox" size="3"&gt; 跳转" onclick="jumpPage...

    WPTools.v6.29.1.Pro

    specify the fieldname in the format string, i.e. "f:name=RTF" to save or load the contents of the field "name". + There is an overloaded LoadFromString which expects a WideString as parameter (Delphi...

    VclZip pro v3.10.1

    Use this with care as this is still somewhat experimental and I'm not sure how useful it is yet. You must make all changes within the buffer sent in to you. Treat the entire file as a stream. Byte ...

    2009 达内Unix学习笔记

    mv [-f] [-i] f1 ... fn d1 mv [-f] [-i] d1 d2 mv 源文件名 目标文件名 若目标文件名还没有,则是源文件重命名为目标文件;若目标文件已存在,则源文件覆盖目标文件。 mv 源文件名 目标目录 移动文件 mv 源目录...

Global site tag (gtag.js) - Google Analytics