SAP CDS ST ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS_TDL - Using a CDS Simple Type for Typing in ABAP
This example demonstrates how to use CDS simple types for declaring data objects in an ABAP class.
The following CDS simple types are used:
First name
DRTY DEMO_BT_FIRST_NAME
Last name
DRTY DEMO_BT_LAST_NAME
Assets
DRTY DEMO_BT_ASSETS
Liabilities
DRTY DEMO_BT_LIABILITIES

ABAP_SOURCE_CODE
DEMO CL_DEMO_SIMPLE_TYPE_EXEC

ABAP_DESCRIPTION
In this example, CDS simple types are used to type variables in an ABAP class.
First, variables are declared with reference to CDS simple types.
Then, actual parameters are requested.
A calculation is performed, i.e. a customer's liabilities are subtracted from their assets.
A screen output is generated.