Anda di halaman 1dari 7

Seri belajar SAP: Bahasa

pemrograman ABAP sebagai


dasar SAP ERP

Yayan Irianto
Penerbit : TBA

Seri belajar SAP: Bahasa ABAP sebagai dasar SAP ERP

Daftar Isi
Daftar Isi ..................................................................................................................................................................... 2
Kata pengantar........................................................................................................................................................... 6
Sejarah dan evolusi SAP ABAP ............................................................................................................................... 7
BAB-1 Aliran data di dalam program ABAP................................................................................................................ 9
1.1 Sistem arsitektur sistem SAP ERP dan arsitektur program ABAP .................................................................... 9
BAB-2 ABAP workbench dan dasar pemrograman ABAP ........................................................................................ 13
2.1 Logon ke sistem SAP Netweaver .................................................................................................................... 13
2.2 ABAP Repository dan Object Navigator ......................................................................................................... 14
2.3 Alat bantu pencarian repository object (Search Tools) .................................................................................. 16
2.4 Penggunaan SAP Application Hierarchy......................................................................................................... 17
2.5 Bekerja dengan ABAP Workbench ................................................................................................................. 19
2.5.1 Navigation area ....................................................................................................................................... 21
2.5.2 ABAP Editor ............................................................................................................................................. 22
2.5.3 Menu area ............................................................................................................................................... 23
2.5.4 Tools area ................................................................................................................................................ 23
BAB-3 Pengorganisasian dan pengembangan aplikasi di sistem SAP ...................................................................... 25
3.1 Sistem Landscape SAP ERP............................................................................................................................. 25
3.2 Pengorganisasian pengembangan ABAP ....................................................................................................... 26
3.3 Latihan 1: Membuat package ........................................................................................................................ 28
3.4 Latihan 2: Membuat program ABAP Hello World .......................................................................................... 33
3.5 Latihan 3: Membuat ABAP program yang lebih lengkap ............................................................................... 37
BAB-4 Teknik pemrograman ABAP .......................................................................................................................... 42
4.1 Pengantar teknik pemrograman ABAP dengan modularisasi kode program ................................................ 42
4.2 Modularisasi program secara local (local program modularization) ............................................................. 43
4.2 Modularasisai program secara global (Global program modularization) ...................................................... 44
4.3 Data encapsulation ........................................................................................................................................ 44
4.4 Data transport, parameter dan interface ...................................................................................................... 45
4.5 Penggunaan subroutine ................................................................................................................................. 46
4.6 Struktur subroutine........................................................................................................................................ 48
Halaman |2

Yayan Irianto

Seri belajar SAP: Bahasa ABAP sebagai dasar SAP ERP

4.7 Local dan global data object .......................................................................................................................... 49


4.8 Memanggil / menjalankan subroutine........................................................................................................... 50
4.9 Latihan 4, mengembangkan program calculator dengan subroutine ........................................................... 50
4.10 Tugas tambahan........................................................................................................................................... 57
4.11 Modularisasi program ABAP dengan Function Module ............................................................................... 57
4.11.1 Data object didalam function module .................................................................................................. 58
4.11.2 Function module interface.................................................................................................................... 59
4.11.3 Dokumentasi pada function module ..................................................................................................... 60
4.11.4 Melakukan test pada function module ................................................................................................. 62
4.11.5 Menyimpan test data function module untuk digunakan kembali ...................................................... 64
4.11.6 Memanggil function module dari program ABAP ................................................................................. 66
4.12 Latihan 5, membuat function module ......................................................................................................... 66
4.13 Latihan 6, memanggil function module........................................................................................................ 71
4.14 Latihan 7, tugas tambahan........................................................................................................................... 78
BAB-5 Pengantar Business Application Programming Interface (BAPI) ................................................................... 79
5.1 Menggunakan BAPI ........................................................................................................................................ 80
5.2 BAPI Explorer.................................................................................................................................................. 80
5.3 Memanggil BAPI dari program ABAP ............................................................................................................. 82
BAB-6 Pengantar ABAP Object................................................................................................................................. 83
6.1 Prinsip-prinsip pemrograman berorientasi object......................................................................................... 83
6.2 Enkapsulasi data, komponen public dan private ........................................................................................... 84
6.3 Multi instance didalam class .......................................................................................................................... 85
6.4 Komponen instance dan komponen static .................................................................................................... 85
6.5 Menggunakan method didalam global class ................................................................................................. 85
6.6 Testing global method dari global class ......................................................................................................... 88
6.7 Memanggil static method dari program ABAP .............................................................................................. 89
6.8 Menggunakan Exception didalam class ......................................................................................................... 90
6.8.1 Menggunakan exception cara klasik ....................................................................................................... 91
6.8.2 Menggunakan exception berdasarkan class-based exception (cara modern)........................................ 91
6.9 Men-generate instance dan memanggil instance method ............................................................................ 92
6.9 Latihan 8, membuat global class dan static method ..................................................................................... 93

Halaman |3

Yayan Irianto

Seri belajar SAP: Bahasa ABAP sebagai dasar SAP ERP

6.10 Pengantar Teknik Modularisasi menggunakan method dari local class .................................................... 103
6.10.1 Mendefinisikan Local Class ................................................................................................................. 103
6.10.2 Pengimplementasian dan penggunaan Static Method ....................................................................... 105
BAB-7 Pengenalan Complex Data Object............................................................................................................... 106
7.1 Menggunakan Structure .............................................................................................................................. 106
BAB-8 Pemodelan dan perencanaan dengan tabel transparent ........................................................................... 112
8.1 Pemodelan data ........................................................................................................................................... 112
8.2 Tabel transparent......................................................................................................................................... 116
8.3 Latihan membuat tabel transparent ............................................................................................................ 119
8.4 Latihan menggunakan data browser ........................................................................................................... 124
BAB-9 Membaca tabel database............................................................................................................................ 127
9-1 Komponen-komponent reusable (dapat digunakan kembali) untuk pengambilan data ............................ 128
9.2 Membaca record tunggal ............................................................................................................................. 129
9.2 Membaca beberapa record data menggunakan loop ................................................................................. 130
9.3 Membaca record data dengan menspesifikasikan client ............................................................................ 132
9.4 Aspek-aspek unjuk kerja terhadap akses ke database ................................................................................ 132
9.4.1 Melakukan secondary index ................................................................................................................. 133
BAB-10 Cek autorisasi (authorization check) ......................................................................................................... 134
BAB-11 User dialog ................................................................................................................................................ 134
11.1 Ciri-ciri dari screen ( dynpro ) ..................................................................................................................... 135
11.2 Urut-urutan proses screen ......................................................................................................................... 135
11.3 Screen dan tipe-tipe program .................................................................................................................... 136
11.4 Komponen screen ...................................................................................................................................... 137
11.5 Editor layout grafis (Graphic layout editor) ............................................................................................... 138
11.6 Latihan membuat aplikasi dengan user dialog .......................................................................................... 139
11.7 Latihan 11-1 Membuat aplikasi user dialog sederhana ............................................................................. 140
BAB-12 Lampiran ................................................................................................................................................... 166
12.1 Instalasi SAP Netweaver 7 test drive ......................................................................................................... 166
12.1.1 Instal Microsoft loopback adapter (kalau belum ada sebelumnya): .................................................. 166
10.1.2 Seting alamat tetap IP pada MS Loopback adapter ............................................................................ 171
12.1.3 Seting host name ................................................................................................................................ 174

Halaman |4

Yayan Irianto

Seri belajar SAP: Bahasa ABAP sebagai dasar SAP ERP

12.1.4 Instal Java SDK 1.4 ............................................................................................................................... 178


12.1.5 Instal SAP Netweaver 7 ....................................................................................................................... 180
12.1.6 Menjalankan dan mematikan SAP Instance ....................................................................................... 189
12.2 Instalasi SAP GUI (Graphical User Interface).............................................................................................. 190
12.3 Seting SAPGUI untuk akses SAP Netweaver .............................................................................................. 193
12.4 Register SAP Netweaver untuk mendapatkan License dari SAP ................................................................ 196
12.5 Instal license SAP Netweaver test drive ..................................................................................................... 198
BAB-13 Daftar pustaka ........................................................................................................................................... 200

Halaman |5

Yayan Irianto

Seri belajar SAP: Bahasa ABAP sebagai dasar SAP ERP

BAB-2 ABAP workbench dan dasar pemrograman ABAP


2.1 Logon ke sistem SAP Netweaver
Setelah anda selesai menginstal sistem SAP Netweaver (kalau belum, anda bisa langsung loncat ke BAB 12) dan membuat
system entry di saplogon (SAPGUI), coba anda logon dengan memilih system entry yg sudah anda buat dan lakukan double
click di mouse anda untuk menjalankannya, lihat gambar 2-1 dibawah ini.

Gambar 2-1 SAP Logon


Di screen berikutnya anda harus memasukkan Client, User-ID dan Password. Untuk Sistem SAP Netweaver test drive yg kita
gunakan sudah disediakan user account BCUSER dan password = minisap, masukkan data ini dan tekan tombol Enter di
keyboard anda (gambar 2-2), kalau logon berhasil maka pada screen berikutnya SAP Netweaver test drive siap digunakan.

Gambar 2-2 Logon ke system SAP Netweaver test drive

H a l a m a n | 13

Yayan Irianto

Seri belajar SAP: Bahasa ABAP sebagai dasar SAP ERP

Gambar 2-3 Screen utama SAP Netweaver test drive

2.2 ABAP Repository dan Object Navigator


ABAP repository adalah kumpulan obyek-obyek komponen ABAP didalam database, obyek-obyek tersebut adalah: Table,
data element, program, function group, function module, class, dan lain-lain. SAP mengatur database berdasasarkan satu
field didalam database yang bernama CLIENT. Data untuk business object didalam aplikasi SAP seperti material master, cost
center, sales order, equipment dan lain-lain disimpan berdasarkan CLIENT.

Gambar 2-4 ABAP Repository

H a l a m a n | 14

Yayan Irianto