Get Example source ABAP code based on a different SAP table
ABAP_DDIC - Built-In Dictionary Types This example demonstrates valid literal values for all built-in dictionary types>.
ABAP_SOURCE_CODE DEMO CL_DEMO_DDIC_TYPES
ABAP_DESCRIPTION The first part of the example uses the ABAP SQL statement INSERT>> to insert a value into each column of a row of the DDIC database table DEMO_DDIC_TYPES>>. The values are ABAP literals> used in a host expression>. It should be noted that the literals are assigned to the components of a temporary ABAP structure that is constructed with the VALUE>> operator. These components have the ABAP type that is mapped to the DDIC type of the respective database column. If the type of a literal does not match the this ABAP type, its value is converted according to the rules>. When the temporary structure is inserted in the database table via the database interface>, another conversion might take place from the ABAP types to the database specific types, if necessary. The second part of the example uses the ABAP SQL statement UPDATE>> to set the values of the columns of a row that was inserted with empty columns. In the UPDATE> statement, the values for most of the data types can be passed as typed literals> that are not possible in general ABAP. In the case of typed literals, no ABAP-specific type conversion takes place and the validity of the values is guaranteed by the syntax check.