abaplint: Parser error for SELECT statements with CASE

Updated 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.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

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.