declaration of variables: 

DATA:  time TYPE T. 

A variable can be from the following data types:

 

Data Type

Initial

field length

Valid

field length

Initial value

Meaning

Numeric types

I

4

4

0

Integer (whole number)

F

8

8

0

Floating point number

P

8

1 - 16

0

Packed number

Character types

C

1

1 - 65535

'

    '

Text field

(alphanumeric characters)

D

8

8

'00000000'

Date field

(Format: YYYYMMDD)

N

1

1 - 65535

'0 … 0'

Numeric text field

(numeric characters)

T

6

6

'000000'

Time field

(format: HHMMSS)

Hexadecimal type

X

1

1 - 65535

X'0 … 0'

Hexadecimal field

 

declaration of constants:

CONSTANTS: pi TYPE P DECIMALS 10 VALUE '3.1415926536'.

 

declaration of parameters: 

This is when you create a parameter field onscreen. The variable is checked for the right syntax.

It's also possible to refer to a field by using "tablename-field". If that field is a date then u can select the date using a standard SAP popup.

PARAMETERS: x as checkbox.

PARAMETERS DATUM LIKE SY-DATUM DEFAULT '19931224' .  



Leave a Comment