Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

SAP ABAP: Using Elementary data type and reference type with keyword VALUE

I am using below to create an initial value like: DATA(l_value) = VALUE char4( ).

However I try to create a concrete using VALUE like: DATA(l_value) = VALUE char4( 'AAA' ). I get below error message:

The type "C" is not a structure.


1 Answer
SAP Expert

It is not possible. Check this link for details:

ABAP Documentation

The correct way for using “VALUE” with elementary data type is by assigning initial value and you should use NEW operator to assign initial value.

DATA(l_value) = NEW char4( 'AAA' ).

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.