Parser error for SELECT statements with CASE
See original GitHub issueUpdated to 2.32.8
Statement does not exist in ABAPv740sp08(or a parser error), “SELECT” (parser_error)
SELECT mwskz AS tax_code,
CASE shkzg
WHEN 'H' THEN ABS( fwste )
WHEN 'S' THEN ABS( fwste ) * -1
END AS tax_amount_dc,
CASE shkzg
WHEN 'H' THEN ABS( hwste )
WHEN 'S' THEN ABS( hwste ) * -1
END AS tax_amount_lc,
CASE shkzg
WHEN 'H' THEN ABS( fwbas )
WHEN 'S' THEN ABS( fwbas ) * -1
END AS tax_base_amount_dc,
CASE shkzg
WHEN 'H' THEN ABS( hwbas )
WHEN 'S' THEN ABS( hwbas ) * -1
END AS tax_base_amount_lc
FROM bset
WHERE bukrs = @is_doc_key-company_code
AND gjahr = @is_doc_key-fiscal_year
AND belnr = @is_doc_key-document_number
ORDER BY tax_code
INTO CORRESPONDING FIELDS OF TABLE @lt_document_tax_data.
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
CASE statement in SQL throwing a parsing issue
When I run the below SQL and it says error parsing the query. I tried my best to figure out the error but...
Read more >Parser can not parse the correct code:{ select case ... end ...
In any case, the PL/SQL compiler resolves this collision adequately, but the parser does not. Is this some kind of problem with parsing?...
Read more >SELECT Command - Amazon Simple Storage Service
The SELECT list names the columns, functions, and expressions that you want the query to return. The list represents the output of the...
Read more >A warning occurred while parsing SQL expressions of ... - IBM
In some cases, the SQL parsing is successful, but one or more base tables or base views were not imported into the metadata...
Read more >Parser bug in INSERT .. SELECT .. ON CONFLICT clause
When the INSERT statement to which the UPSERT is attached takes its values from a SELECT statement, there is a potential parsing ambiguity....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That works, thanks!
I cannot narrow down the version all that much, the system with the example is on 740sp20. I cannot recall if that feature worked on sp05 but according to the blog you linked it looks like it did.