SAP SQL EXPR SEARCHED CASE ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_SQLEXP - Complex CASE
This example demonstrates complex case distinctions in SQL expressions.

ABAP_SOURCE_CODE
DEMO CL_DEMO_SQL_EXPR_SEARCHED_CASE

ABAP_DESCRIPTION
In a list of columns specified after SELECT, CASE is used to make a complex case distinction for the content of two columns. The result is a string taken from a host variable. Using the alias name defined after AS, the result is assigned to the identically named column in an internal table declared inline, results. GROUP BY is used to group this table by the results column.