SAP BO笔记

人为运行BW处理链:RSPC_API_CHAIN_START


报表头如果按月份、年度展开的话,必须是数字或者日期类型,不能是文本类型且不能写成1+”月”这样的形式,否则报表会展示成“10月|11月|12月|1月|2月……9月”这样的格式。

建议:=ToNumber([日历年/月].[日历年/月 – 日历月 (键值)])


注意,如果要求年度和,使用NoFilter公式,例如:=NoFilter(Sum([当期销售金额]))+[当期折扣]


ECC中标准表字段与BW中信息对象的对应关系表:
在BW系统中,有个table,可以直接查ECC中标准表字段与BW中信息对象的对应关系,TABLE:RSOSFIELDMAP。


如何WEBI标题上放入用户输入日期:
=Left(UserResponse(“输入日期”);10)+”标题”


左连接 右连接 SQL怎么写:
select* from AA INNER JOIN BB ON AA.A_ID=BB.B_ID (公共部分)
select* from AA LEFT JOIN BB ON AA.A_ID=BB.B_ID (左连接, A为基础)
select* from AA RIGHT JOIN BB ON AA.A_ID=BB.B_ID(右连接,B为基础)
select* from BB full JOIN AA ON AA.A_ID=BB.B_ID  (全连结)


本周(自然周) weibi上如何实现:
01 输入日期 = CurrentDate()
02 上月第一天 = If ((ToNumber(FormatDate([01 输入日期];”MM”))-1)<=9) Then (ToDate(FormatDate([01 输入日期];”yyyy”)+”0″+(ToNumber(FormatDate([01 输入日期];”MM”))-1)+”01″;”yyyyMMdd”)) Else (ToDate(FormatDate([01 输入日期];”yyyy”)+(ToNumber(FormatDate([01 输入日期];”MM”))-1)+”01″;”yyyyMMdd”))
03 上月最后一天 = LastDayOfMonth([02 上月第一天])
04 系统日期-1 = If DayNumberOfMonth([01 输入日期]) = 1 Then([03 上月最后一天]) Else ToDate(FormatDate([01 输入日期];”yyyy”)+”-“+FormatDate([01 输入日期];”MM”)+”-“+(DayNumberOfMonth([01 输入日期]) -1);”yyyy-MM-dd”)
05 本月有几天 = DayNumberOfMonth([04 系统日期-1])
06 跨月的系统日期-8 = ToNumber(FormatDate(LastDayOfMonth([03 上月最后一天]);”dd”)) – 6 + [05 本月有几天]
07 不跨月的系统日期-8 =[05 本月有几天]-6
08 系统日期-1 带格式 =FormatDate([04 系统日期-1];”MM”)+”月”+ FormatDate([04 系统日期-1];”dd”)+”日”
09 系统日期-8带格式(跨月) =FormatDate([02 上月第一天];”MM”)+”月”+ [06 跨月的系统日期-8]+”日”
10 系统日期-8 带格式(不跨月) =FormatDate([04 系统日期-1];”MM”)+”月”+ [07 不跨月的系统日期-8]+”日”
11 本周 = (If [05 本月有几天]<7 Then [09 系统日期-8带格式(跨月)] Else [10 系统日期-8 带格式(不跨月)]) + “–” + [08 系统日期-1 带格式]


在WEBI中将空变为零?
=If [当前库存] = 0 Then 0 ElseIf [当前库存]+”” = “” Then 0 Else [当前库存]


BO根据用户选择的字符串”开始年月”和”结束年月”获得相关日期信息的函数:
开始年 =Substr(UserResponse(“开始年月”);5;4)
开始日期 =ToDate(Concatenation(“01/”+[开始月];”/”+[开始年]);”dd/MM/yyyy”)
开始月
=If(Substr(UserResponse(“开始年月”);1;3)=”JAN”) Then “01”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”FEB”) Then “02”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”MAR”) Then “03”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”APR”) Then “04”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”MAY”) Then “05”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”JUN”) Then “06”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”JUL”) Then “07”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”AUG”) Then “08”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”SEP”) Then “09”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”OCT”) Then “10”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”NOV”) Then “11”
ElseIf(Substr(UserResponse(“开始年月”);1;3)=”DEC”) Then “12”
结束年
=Substr(UserResponse(“结束年月”);5;4)
结束日期
=ToDate(Concatenation(“01/”+[结束月];”/”+[结束年]);”dd/MM/yyyy”)
结束月
=If(Substr(UserResponse(“结束年月”);1;3)=”JAN”) Then “01”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”FEB”) Then “02”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”MAR”) Then “03”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”APR”) Then “04”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”MAY”) Then “05”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”JUN”) Then “06”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”JUL”) Then “07”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”AUG”) Then “08”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”SEP”) Then “09”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”OCT”) Then “10”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”NOV”) Then “11”
ElseIf(Substr(UserResponse(“结束年月”);1;3)=”DEC”) Then “12”

本文作者: GavinDong

版权属于: GavinDong博客

文章链接: https://gavindong.com/1421.html

如果使用过程中遇到问题,可 **点击此处** 交流沟通。

版权所有,转载时必须以链接形式注明作者和原始出处及本声明。

(0)

相关文章

发表回复

登录后才能评论