Presentation is loading. Please wait.

Presentation is loading. Please wait.

Northern Arizona University College of Business

Similar presentations


Presentation on theme: "Northern Arizona University College of Business"— Presentation transcript:

1 Northern Arizona University College of Business
ABAP Basics II Northern Arizona University College of Business

2 Printing To print the program code, copy the code into Notepad and then print. To print the screens (data entry or output), capture the screen (Alt/print screen) and paste into Word. Then print from word.

3 Defining variables – Data Types
C Character ‘Whatever’ I Integer 25 P Packed Decimal 19.95 D Date ‘ ’ T Time ‘143000’

4 Data Statement Data D_num Type I value 1 . Data D_num LIKE sy-subrc .
The data type is determined dynamically at runtime from the like field .

5 Records Data Begin of Demo_Record, D_ID Type I , D_Name(30) Type C ,
End of Demo_Record .

6 Constants Constants: C_Number Type I value 1 , C_Name(20) Type C
value ‘Joe’ .

7 Write statement Write Whatever . Write ‘Whatever’ .
Write: ‘Whatever: ‘, Whatever . Write 20 Whatever . Goes to column (position) 20 .

8 Write statement Write 20(6)Whatever . Write / .
Goes to position 20, and prints for a length of 6 . Write / . Advances to the next line .

9 Text Elements Three types of Text Elements List Headings
Selection Texts Text Symbol

10 Text Elements List Headings Selection Texts Text Symbol Text Elements
GoTo Text Elements List Headings Selection Texts Text Symbol

11 Text Symbols Alternate method of defining character variables.
Number, Text, Length 001 Hi There 10 Write Text-001 .

12 Selection Texts Text identifiers for parameter fields (replaces parameter name). Must make the program ACTIVE Select REPS for the program from the worklist, and click on the continue icon

13 Selection Texts Must SAVE the program

14 System Date and Time Data: Today type D , Now type T .
Today = sy-datum . Now = sy-uzeit .

15 Formatting Write Today mm/dd/yyyy .
Write Now Using Edit Mask ‘__:__’ .

16 Alignment Write Field1 Left-Justified . Write Field2 Centered .
Write Field3 Right-Justified . Write: /20 Field1 . Write: / Field2 under Field1 .

17 No Gaps Write: Field1 No-Gap, Field2 .

18 Horizontal Lines Uline . Uline /20 . Uline /20(10) . Uline: /20(10) .

19 Line Spacing Skip . Skip 3 . Skip to line 20 .

20 Column Spacing Position 20 .

21 Character Data - Case Data: F1(6) type C value ‘abcdef’ ,
Translate F1 to Upper Case . Translate F2 to Lower Case .

22 Character Data - Split Data: F1(7) type C value ‘cba,nau’ ,
Split F1 at ‘,’ into F2 F3 .

23 Character Data - Concatenate
F1(7) type C , F2(3) type C value ‘cba’ , F3(3) type C value ‘nau’ . Concatenate F2 ‘-’ F3 into F1 .

24 Character Data - Condense
F1(7) type C value ‘cba nau’. Condense F1 No-Gaps .

25 Date & Time Fields Data: Today type D , Next_Week type D .
Next_Week = Today “days

26 Time Fields Data: Now type T , Now_Plus1 type T .
Now_Plus1 = Now “seconds

27 If Statement If A = B . Whatever = 0 . Else . Whatever = 1 . EndIf .


Download ppt "Northern Arizona University College of Business"

Similar presentations


Ads by Google