0

使用 SQ01 运行查询时出现以下错误

在此处输入图像描述

我不知道问题出在哪里。我只有 3 个字段可供选择

在此处输入图像描述

在此处输入图像描述

输出中只有两个字段

在此处输入图像描述

在信息集中我的 SELECTION-SCREEN 代码下方

SELECTION-SCREEN: BEGIN OF BLOCK b1.
*
  SELECT-OPTIONS: S_VKORG FOR ZRSD_VIN_STDFLOW-SALES_ORG NO INTERVALS.
  SELECT-OPTIONS: S_COD_OP FOR zrsd_vin_stdflow-CODICEOPER NO INTERVALS DEFAULT 'BP*'.
  SELECTION-SCREEN SKIP.
  SELECT-OPTIONS: S_VBELN FOR zrsd_vin_stdflow-SALESORD NO INTERVALS.
*
SELECTION-SCREEN: END OF BLOCK b1.

谢谢你的支持

4

3 回答 3

0

The text of the error code AQ366 is misleading, it's talking about the selection screen but it can be anything wrong in the generated program.

The best solution to understand what's going on, by getting the actual message of the syntax error in the generated program:

  1. Start transaction code SQ01
  2. Menu Query > More functions > Display report name
  3. Copy the name of the report into the clipboard
  4. Start transaction code SE38
  5. Paste the report name
  6. Menu Program > Check > Syntax (Ctrl+F2)
  7. Based on the exact error message, apply a fix and try again

Note that if the infoset has been changed, the query may need to be regenerated to include the changes:

  1. Start transaction code SQ01
  2. Menu Query > More functions > Generate program
于 2021-08-07T14:32:10.603 回答
0

看来您超出了旧的 ABAP 编辑器限制,即 72 个字符,此语句为 84:

SELECT-OPTIONS: S_COD_OP FOR zrsd_vin_stdflow-CODICEOPER NO INTERVALS DEFAULT 'BP*'.

尝试以这种方式声明这一行:

DATA: v_codi TYPE zrsd_vin_stdflow-codiceoper.

SELECT-OPTIONS: s_cod_op FOR v_codi NO INTERVALS DEFAULT 'BP*'.

应该这样,声明部分可能应该进入DATA 事件

于 2020-11-19T16:34:23.390 回答
0

最近我遇到了同样的问题,对我来说,当我们在全局属性中设置选项定点算术不能用逗号填充常量变量时​​,解决方案是查看代码并查找一些逗号 (,)。

于 2021-08-06T18:23:26.733 回答