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变量的代码

SAP Study Notes: BW Queriy-Variables(变量)的更多相关文章

  1. Machine Learning Algorithms Study Notes(2)--Supervised Learning

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...

  2. Machine Learning Algorithms Study Notes(3)--Learning Theory

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...

  3. Machine Learning Algorithms Study Notes(1)--Introduction

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 目 录 1    Introduction    1 1.1    ...

  4. Grafana 利用Grafana Variables变量配置快速切换不同主机的图表数据展示

    用Grafana Variables变量配置快速切换不同主机的图表数据展示   by:授客 QQ:1033553122 测试环境 需求描述 操作步骤 结果展示 测试环境 influxdb-1.5.2. ...

  5. 五十九、SAP中常用预定义系统变量

    一.SAP中常用预定义系统变量 内容如下: 二.系统变量定义在结构SYST里,我们打开SE38 三.在代码编辑器输入SYST变量 四.双击SYST,来到这个系统结构,里面有很多系统变量 五.我们随便写 ...

  6. [Python Study Notes] 变量/编码/注释

    Ps:我这里选择的IDE为pycharm,个人感觉还是比较好用的. 1.变量 声明变量/赋值变量 #_*_ coding:utf-8 _*_ # author = "liu" ab ...

  7. Study notes for Clustering and K-means

    1. Clustering Analysis Clustering is the process of grouping a set of (unlabeled) data objects into ...

  8. D3 JS study notes

    如何使用d3来解析自定义格式的数据源? var psv = d3.dsvFormat("|"); // This parser can parse pipe-delimited t ...

  9. 【SAP BI】BW如何连接SQLSERVER数据库

    一.工具 源版本: SQLSERVER2008  数据库TEST 目标版本:  SAP 客户端 7.4  服务器7.5 二.在BW中建立数据库连接,并生成数据源 2.1  登录SAP BW开发机 ,输 ...

随机推荐

  1. jquery $与jQuery

    jquery的兼容 ie8 <script type="text/javascript" src="<%=path%>/js/jquery-3.1.1. ...

  2. 对扫描的pdf文件生成目录

    很多pdf文件是直接扫描生成的,于是它的内容都是一张张的图片,当然就更没有目录索引了. 有的时候想找某些内容,只能一点点的移动滚动条,非常不方便. 那么有什么方法能生成目录呢? 方法一:使用福昕pdf ...

  3. 由自定义事件到vue数据响应

    前言 除了大家经常提到的自定义事件之外,浏览器本身也支持我们自定义事件,我们常说的自定义事件一般用于项目中的一些通知机制.最近正好看到了这部分,就一起看了下自定义事件不同的实现,以及vue数据响应的基 ...

  4. jquery.pagination.js添加跳转页

    原作者github地址:https://github.com/gbirke/jquery_pagination 在这基础上加入了跳转到指定页. 修改后的jquery.pagination.js /** ...

  5. BZOJ.4319.[cerc2008]Suffix reconstruction(后缀数组 构造 贪心)

    题目链接 \(Description\) 给定SA数组,求满足SA[]的一个原字符串(每个字符为小写字母),无解输出-1. \(Solution\) 假设我们现在有suf(SA[j]),要构造suf( ...

  6. Flask启动原理,源码流程分析

    1.执行Flask的实例对象.run()方法 from flask import Flask,request,session app = Flask(__name__) app.secret_key ...

  7. Python 中的垃圾回收机制--备忘

    GC作为现代编程语言的自动内存管理机制,专注于两件事:1. 找到内存中无用的垃圾资源 2. 清除这些垃圾并把内存让出来给其他对象使用.GC彻底把程序员从资源管理的重担中解放出来,让他们有更多的时间放在 ...

  8. C# 的枚Enum

    简短的解释: enum 关键字用来声明枚举,一种包含一组被称为枚举数列表的 enum myType{ a, b, c,} int num = 1;Console.Write((myType)num); ...

  9. Codeforces Round #405 (rated, Div. 2, based on VK Cup 2017 Round 1) C. Bear and Different Names 贪心

    C. Bear and Different Names 题目连接: http://codeforces.com/contest/791/problem/C Description In the arm ...

  10. Qt 4.8.2.+VS2008静态编译

    一.下载Qt 4.8.2-opensource. 二.解压到C:\Qt\4.8.2_static 修改C:\Qt\4.8.2_static\projects.pro文件,删除demos,doc,exa ...