Symptom
- You are using Custom Logic app
- You are getting undefined error messages along the code but there is no long description.
- Fields after SELECT statement are highlighted
- Structure after WHERE clause is highlighted
- Variables after INTO clause are highlighted
Environment
SAP S/4HANA Cloud 2308
Reproducing the Issue
1. Go to Custom Logic app
2. Open Code Editor for an implementation
You can see several fields and variables highlighted.
Cause
With SAP S/4HANA Cloud 2308 the highlighter was updated to include more ABAP statements.
The highlighted errors in the ABAP statements are a false finding from the ABAP syntax highlighter that is implemented in the frontend and can safely be ignored.
It is only a real error if the line number is highlighted and an error message is shown when you hover over the code.
Resolution
The error messages without a long description can be safely ignored.
A fix will be provided with release 2402.
For more information, please check
- SAP S/4HANA Cloud, Public Edition, 2-System Landscape – Upgrade & Maintenance Schedule
- SAP S/4HANA Cloud, Public Edition, 3-System Landscape – Upgrade & Maintenance Schedule
The issue can occur when specifying the select field list using commas in between column names(SQL like) because the code misinterprets the comma.
e.g. SELECT SINGLE language, languageisocode FROM i_language INTO ( @DATA(lv_langu), @DATA(lv_iso) ).
A possibility to get rid of the error messages can be defining a structure and assigning the different variables afterwards:
DATA:
BEGIN OF ls_lang,
language TYPE spras,
languageisocode TYPE laiso,
END OF ls_lang.
SELECT SINGLE FROM i_language FIELDS * INTO CORRESPONDING FIELDS OF @ls_lang.
DATA(lv_langu) = ls_lang-language.
DATA(lv_iso) = ls_lang-languageisocode.
The above code will be highlighted correctly, allowed in ABAP for Key Users and semantically the same as the original statement.
It implies significant refactoring of the original statement.
Keywords
KBA , BC-SRV-APS-EXT-BL , Custom Business Logic , Problem