问题标签 [webi]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3412 浏览

sql - How does one handle exceptions in date casting in SAP's HANA?

QUESTION SUMMARY:

What is the proper way within HANA SQL or HANA Studio in a view (Calculation, attribute or Analytic) to handle invalid data when attempting to cast to a date so a user can filter the data?

In SAP's table KONM the field KSTBM is a datatype of decimal(15,3). This field right or wrong, stores a date value in YYYYMMDDHHM.MSS format. (I'm a user not a designer of the system. Why anyone stores a date in a decimal field instead of a oh a date/time field is beyond the purview of this question.)

So valid values such as:

  • 201703290 (yep 2017 valid year 03 a valid month and 29 a valid day in that month for that year.)
  • 201703301.130 (yep 2017 valid year 03 a valid month and 30 a valid day in that month for that year along with 11:30 being a valid time)

exist and can easily be cast using a to_timestamp or daydate or similar function.

Unfortunately a few bad entries have been made into this table resulting in data that is unable to be cast to a date time such as:

  • 201702290 (Invalid day Feb didn't have 29 days in 2017)
  • 201713500 (Invalid Month 12 months not 13)
  • 201712312.400 (Invalid hour 00:00:00-23:59:59 there is no 24)
  • 201712310.060 (Invalid Minute 00:60 would be 01:00)
  • 201712310.090 (Invalid Minute 00:90 would be 01:30)

When using to_Timestamp or daydate functions on such invalid records the following error is presented:

SAP DBTech JDBC: [2048]: column store error: search table error: [6860] invalid date, time or timestamp value;

or

[303]: invalid DATE, TIME or TIMESTAMP value:

I agree those are invalid dates... and thus I know why the error is thrown.

While I would love to fix the root cause and then correct the bad data; that isn't presently an option. Different teams, different resources different priorities. So it's on their list of things to do but I have users who need the WEBI reports; and since the bad data exists... I still have to handle it.

What I'm trying to do is create a Calculated_view in HANA Studio which can handle these erroneous dates successfully. But I've not been able to find a try catch or other type of exception handling which would allow me to basically set these dates to NULL so the user still gets the other relevant data and are able to see they have some bad data in the system that the could correct.

As it stands since this error is thrown, no records are able to be returned from the universe when the WEBI report is run. I've found a few options that involve creating a date/time table with all possible times.... (I hope you can see why I don't want to do that) or creating a function (but it lacks specific directions; I'm afterall a new user to HANA and Universes and WEBI which is why the question exists)

Here's an example that could be run in HANA Studio:

Change isBad to 0 and it works; change isBad to 1 and you see the error.

Question Aspects:

  1. How can I get this query to run without error regardless of isBad being 1 or 0?
  2. Is there a method/manner to include/not include the bad data (perhaps set all bad data to NULL in the result and null data can then be included/excluded as a user's option?
  3. is there a way in a view to identify these bad records in a calculated column so we don't try and convert them if invalid and do try when valid?
  4. Is my approach simply wrong and I need to retrain my Oracle/MS SQL/MySQL brain to think differently? Other languages I'd handle exceptions, or try catch or use isdate() to check for valid before attempting to cast... I just don't see those options here (but I'm new and perhaps simply unable to use the help very well yet)

Thanks for reading my long drawn out question. Hopefully I've provided sufficient details.

I'm trying to avoid:

0 投票
0 回答
112 浏览

sap - 我使用 WebI 报告过滤器得到错误的数据

我在交叉表中创建了 webi 报告结果,当我尝试只获取总交易量超过 50 的客户(如客户 222)时,所有小于 50 的数据都没有显示,例如:客户(222)做了两个动作 1- 2018 年 3 月 25 日,金额为 209 GB,2- 2018 年 3 月 29 日,金额为 14 GB,两者之和为 (223),当我尝试时,我需要获得所有在所有日子里进行超过 50 次操作的客户通过添加过滤器,不会显示 2018 年 3 月 29 日的动作,只有 2018 年 3 月 25 日的动作是我得到的。

0 投票
1 回答
6444 浏览

object - Business Objects/Webi 中的 If 和语句

我在 Business Objects 4.2 中使用 Web Intelligence,并尝试使用以下 IF/AND 语句创建一个新变量,但似乎无法正确处理:

=If([Safeguarding Ind]=1 And [Form Complete Ind] <> 1 then 1 else 0)

错误消息:第 54 位的“Then”中缺少运算符或右括号。(IES 10067)

0 投票
3 回答
176 浏览

sql - 在 sql 中编写查询并在 Webi 报告中实现它

我正在尝试在 sql 中执行查询以仅获取与多个描述相关联的代理记录

示例:表名:AGENT

AGENCY_ID 101 有 ABC 和 XYZ 描述。从表中,我只想从重叠机构中提取记录

在上述情况下,我只想拉:

我还尝试在业务对象 webi 报告查询过滤器中执行此操作。

请建议我解决我的问题。

提前致谢!

0 投票
2 回答
688 浏览

max - 如何从 Business Objects Web Intelligence 中的表中获取最大值

我正在使用 Business Objects 4.2 (Web Intelligence)

我有一个与医院病房相关的 MAX 和 MIN 值的表格,您可以在下面的链接中看到:

最大/最小

在这种情况下,最大病房是RVH A&E Dept,最小病房是病房 1

我需要能够以以下格式动态显示 Max 和 Min 病房,但不太确定如何去做:

报告显示

0 投票
1 回答
1052 浏览

sap - 修复合并后#DATASYNC 不会消失

我有一个包含 4 个查询的报告。我在报告中使用了其中两个。我将其中两个合并到一个报告中,报告运行良好。但是,如果合并中的任何内容发生更改(例如,将另一个维度添加到合并或取消合并),则报告仅显示#Datasync。

如果我按原样修复合并,报告显示#Datasync。这怎么可能?

所以澄清一下:

  1. 报告工作。
  2. 合并中所做的更改:报告因#DATASYNC 而失败
  3. 合并恢复原样:报告 因#DATASYNC 而失败。报告需要完全重建
0 投票
3 回答
512 浏览

javascript - Javascript 浏览器缩放对象

我正在尝试编写一个 Javascript 函数,该函数在SAP WEBI中的按钮单击事件上运行,这使浏览器缩放到 80%

我正在尝试使用在标准网站的情况下有效的代码(它不使用浏览器缩放,但实际上放大了按钮所在的元素,但是在 webi 的情况下它实际上什么都不做)

脚本:

HTML:

关于如何使浏览器在 SAP WEBI 中缩放回 80% 的任何帮助?

0 投票
0 回答
1323 浏览

sap - 比较 Business Objects 中的两列

我需要比较来自两个查询的两列并将结果放入第三列。

第 1 列是主 ID 号列表所在的主表(查询 1)。

另一个查询(查询 2)上的第 2 列是我要与第 1 列进行比较的 ID 号,如果第 2 列(查询 2)上存在相同的 ID,则在第 3 列返回“是”结果而不删除存在的行没有结果。

我可以使用以下简单公式设法让报告过滤第一列以匹配第 2 列上的列表。

=if[dimension1]=[dimesnion2]Then "Yes" else " "

我需要所有数据在查询 1 中保持未过滤状态,并且Yes在第 3 列中只保留一个或一个空白。

谢谢

0 投票
1 回答
27 浏览

business-objects - 从对象/字符串中提取字符组

我有一个很长的字符串,其中包含日期和时间。如何从中提取日期部分和时间部分?

这是字符串:0:2019010309130000:0.000000:126:0

我只需要提取日期和时间,如下所示:

日期 - 20190103 时间 - 0913 并将其格式化为 09:13

0 投票
1 回答
142 浏览

date - WEBI BO 如果值匹配,则基于今天显示第二天(日期名称)

嗨所以我有一个只有 2 列的预订日期的表格......国家和预订每个国家只能在一天预订。周一至周五,第二列中表示“日”。是否可以根据今天计算下一个时段是什么:(基于表中的日期)但如果今天是星期一并且时段是星期一,它将显示下星期一的日期等....

所以基本上今天(星期三)我需要一个计算来检查下一个可用预订是什么并显示日期:所以如果文件中的下一个是星期四,我需要它显示 14/03/2019 如果文件中是星期三我会需要它在下周显示,因为今天太晚了,所以 20/03/2019