Posts

Showing posts with the label sap abap data types made easy

SAP ABAP - Elementary Data Types, Initial Values, Syntax & Properties.

In ABAP, we have 8 elementary data types to declare data types: CHARACTER TEXT(C): - Lenght: 1 - 65535. - Default Length: 1. - Initial Value: Blank. - Default Values for the character based data types has to be a text enclosed in single quotes. - Character fields (Type C) are l eft-justified and can be truncated or filled with blanks from the right. - Character fields can also be used as alphanumeric fields. Example: DATA: option TYPE c. DATA: name(30). DATA: subject(20) TYPE c. DATA: title(10) VALUE 'Mr.'. DATA: name(30) TYPE c VALUE 'Sachin Tendulkar '. DATA: name TYPE char30. " This statement will allow name variable to hold upto 30 characters. NUMERIC TEXT (N): - Length: 1 - 65535. - Default Length: 1. - Initial Value: '0....0'. - Numeric text variables hold unsigned positive integers. - This data type should be used for numeric fields t hat will not be calculated like Roll number , Employee number. - We can ...