Examples 02 - Elementary Types

<< Click to Display Table of Contents >>

Navigation:  All About ABAP Technique > English > ABAP Tutorial > Examples >

Examples 02 - Elementary Types

Objective

Creating Report

Result

Source Code

Transaction Code

SE38 - ABAP Editor

Tables

 

Support

 

 

Creating Report

1.Create New Program,

Program Name        : YEXAMPLES_02

Title                : Elementary Types

2.Declare Global Variable

*----------------------------------------------------------------------*

*GLOBAL VARIABLE DECRALATION

*----------------------------------------------------------------------*

DATA :  a TYPE i,

        b TYPE i,

        c TYPE p DECIMALS 2.

 

DATA :  d LIKE c.           " Elementary Data Type (Local)

 

3.Create Main Program

*======================================================================*

*MAIN PROGRAM

*Execute after Input Screen

*======================================================================*

START-OF-SELECTION.

  a = 10.

  b = 100.

  c = a / b.

  d = c.

  WRITE : / 'Hitung : ', a, '/', b, '=', d.

 

4.Activated and run

5.Finished

 

 

Result

Input Selection

None.

Output

abap_tutorial0001

 

 

Source Code