0

I am getting below error while run the query with SQ01

enter image description here

I don't know where the problem came from. I just have 3 fields in selection

enter image description here

enter image description here

And just two fields in output

enter image description here

Below my SELECTION-SCREEN code in the infoset

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.

Thanks for your support

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
hammerman
  • 23
  • 1
  • 5

3 Answers3

0

It seems you exceeded the old ABAP Editor limitation of 72 chars with this statement which is 84:

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

Try declare this line that way:

DATA: v_codi TYPE zrsd_vin_stdflow-codiceoper.

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

This way it should go, the declaration part probably should go into DATA event.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
0

recently i facing this same issue and for me the solutions was review the code and look for some comma (,) when we set the option Fixed Point Arithmetic in the Global Properties can't fill constants variables with comma.

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
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48