Вы находитесь на странице: 1из 4

commands:

We can open maximum 6 sessioins.

/o - It creates a new session (R/3 window)

/n - It closes the existing session and control goes to the SAP Main screen (SAP
Easy Access).

Ctrl + F2 --> Syntax Check

Ctrl + F3 --> Activation (It is a process that makes an object available at


runtime)

F8 --> Exicute

Ctrl + F6 --> Rename

Ctrl + F5 --> Copy

Shift + F2 --> Delete

Creation of Executable Programs :

1. Program Name starting with 'Z' or 'Y' are user defined programs. Others are SAP
built in programs.

2. Program Types :
i. Executable Programs
ii. Include Programs
iii. Module pool
iv. Function group
v. Subroutine pool
vi. Interface pool
vii. Class pool

3. Data : It is a keyword , used to declare the variables with in the program.

4. TYPE: To refer to any data type <type> that is already "known" at this point in
the program.

5. Data Type:

Data type Initial field length Valid field length Initial value Meaning

I 4 4 0 Integer

F 8 8 0 Floating
point

P 8 1-16 0 Packed
Number

Character Types

C 1 1-65536 ' ' Text


Field
D 8 8 '00000000' Data
field ((Format: YYYYMMDD)

N 1 1-65535 '0.....0' Numeric


text field (Numeric text characters)

T 6 6 '000000' Time
field (Format: HHMMSS)

Hexadecimal Type

X 1 1-65535 X'0...0'
Hexadecimal field.

6. TypeS : We can define local data types in a program using the "TYPES" statement.

7. write statement with options


This statement used to displaying data on the screen.
Positioning WRITE Output on the list:

You can position the output of a WRITE statement on the list by making a format
specification before the field name as follows:

Syntax

WRITE AT [/][<pos>][(<len>)] <f>.

where

the slash '/' denotes a new line,


<pos> is a number or variable up to three digits long denoting the position on the
screen,
<len> is a number or variable up to three digits long denoting the output length.

Ex:

WRITE 'First line'.

WRITE 'Still first line.'

WRITE / 'Second line.'

WRITE /13 'Third line.'

Formating Options:

Option Function

LEFT-JUSTIFIED Output is left justified

CENTERED Output is centered


RIGHT-JUSTIFIED Output is right justified

***************************************************
DATA: FIELD(10) VALUE 'abcde'.

WRITE: / '|' NO-GAP, FIELD LEFT-JUSTIFIED NO-GAP, '|',


/ '|' NO-GAP, FIELD CENTERED NO-GAP, '|',
/ '|' NO-GAP, FIELD RIGHT-JUSTIFIED NO-GAP, '|'.

***************************************************

UNDER <G> Output starts directly under field <G>

******************************************************
WRITE: /3 'Name', 30 'RoomNo', 40 'Age'(002).

WRITE: / 'Peterson' UNDER 'Name',


'5.1' UNDER 'RoomNo',
'24' UNDER 'Age'.

******************************************************

NO-GAP The blank after field <f> is omitted.

*************************************************
Ex:

WRITE: 'A' NO-GAP, 'B' NO-GAP, 'C'. "Output: ABC

If NO-GAP was not specified here, the output would have been "A B C" because one
blank is always implicitly generated between consecutive output fields.

*************************************************

Data: var1 TYPE c VALUE 'K',


var2(8) TYPE c VALUE 'INFORMATION',
var3 TYPE n value '1',
var4(3) TYPE n value '123',
var5 TYPE d value '20060804',
var6 TYPE t VALUE '071045'.

WRITE: / 'Value in Var1 variable', var1,


/ 'Value in Var2 variable', var2,
/ 'Value in Var3 variable', var3,
/ 'Value in Var4 variable', var4,
/ 'Value in Var5 variable', var5,
/ 'Value in Var6 variable', var6.

*************************************************
WRITE: '000123',
/ '000123' NO-ZERO.

Output will be:


000123
123

*************************************************

Вам также может понравиться