Dulu, saya koding pascal, c++, delphi, VB, LISP, assembly, PL/ SQL, java, dotnet. Ndak sempat menyimpan coretan pertama saya dikancah per-debug-an dan per-running-an mereka masing-masing. Sekarang, saya koding ABAP, dan inilah coretan pertamanya.
Selamat datang di dunia ABAP, pakai sabuk pengaman dan nikmatilah pengalaman baru.
FORM f_get_i_dn.
DATA: i_dn_vbuk TYPE zvdn OCCURS 0 with header line,
i_dn_vbak TYPE zvdn OCCURS 0 with header line,
i_dn_with_hl TYPE zvdn OCCURS 0 with header line.
FIELD-SYMBOLS
REFRESH i_dn_tmp.
SELECT likp~vbeln lips~posnr likp~vkorg lips~werks likp~knump
likp~kunag likp~kunnr likp~wadat_ist lips~vtweg
lips~spart likp~erdat likp~wadat lips~matnr lips~arktx
lips~vgbel lips~vgpos lips~vrkme lips~lfimg lips~prodh
likp~route likp~vstel lips~oic_truckn
likp~ernam lips~lgort
INTO CORRESPONDING FIELDS OF TABLE i_dn_with_hl
FROM likp
INNER JOIN lips
ON lips~vbeln EQ likp~vbeln
WHERE likp~vbeln IN s_vbeln
AND likp~ernam IN s_ernam
AND likp~erdat IN s_erdat
AND likp~vstel IN s_vstel
AND likp~vkorg IN s_vkorg
AND likp~wadat IN s_wadat
AND likp~vbtyp EQ c_dlvr_typ
AND likp~route IN s_route
AND likp~kunag IN s_kunag
AND likp~kunnr IN s_kunnr
AND likp~wadat_ist IN s_wadat1
AND lips~matnr IN s_matnr
AND lips~werks IN s_werks
AND lips~lgort IN s_lgort
AND lips~vtweg IN s_vtweg
AND lips~spart IN s_spart.
i_dn_tmp[] = i_dn_with_hl[].
SORT i_dn_tmp BY vbeln vgbel.
DELETE ADJACENT DUPLICATES FROM i_dn_tmp COMPARING vbeln vgbel.
SELECT vbuk~vbeln vbuk~wbstk
INTO CORRESPONDING FIELDS OF TABLE i_dn_vbuk
FROM vbuk
FOR ALL ENTRIES IN i_dn_tmp
WHERE vbuk~vbeln EQ i_dn_tmp-vbeln
AND vbuk~wbstk IN s_wbstk.
CLEAR i_dn_with_hl-wbstk.
Modify i_dn_with_hl transporting wbstk.
LOOP AT i_dn_vbuk ASSIGNING
i_dn_with_hl-wbstk =
Modify i_dn_with_hl transporting wbstk where vbeln =
ENDLOOP.
DELETE i_dn_with_hl WHERE wbstk is INITIAL.
SELECT vbak~vgbel vbak~waerk
INTO CORRESPONDING FIELDS OF TABLE i_dn_vbak
FROM vbak
FOR ALL ENTRIES IN i_dn_tmp
WHERE vbak~vbeln EQ i_dn_tmp-vgbel.
CLEAR i_dn_with_hl-waerk.
Modify i_dn_with_hl transporting waerk.
LOOP AT i_dn_vbak ASSIGNING
i_dn_with_hl-waerk =
Modify i_dn_with_hl transporting waerk where vgbel =
ENDLOOP.
i_dn[] = i_dn_with_hl[].
ENDFORM. " f_get_i_dn
5.29.2007
Hello World in ABAP
at 5/29/2007 11:38:00 AM 0 comments
Labels: at work
Saya Tak Pernah Sangka
Saya tak pernah sangka usaha mencari rizki yang halal berakhir disini.
Iya Allah, kalau Kau ijinkan, saya ingin suatu saat berakhir disini, di Pertamina.
Dulu pernah jenguk bokap temen di RS Pertamina.
Dalam hati berkata, Pertamina ... keren banget bisa kerja disitu, tapi tak pernah berani bercita-cita setinggi itu.
Otak saya pas-pasan, gak level kerja di tempat keren begitu.
Sekarang saya di sini, di sistem bisnis dan teknologi informasi.
Di bawah meja ada sandal saya, di tempat sholat ada mukena saya, dapat akses ke SAP, aplikasi ERP nomor 1 di dunia.
Dan nikmat Tuhan Kamu yang mana yang kamu dustakan?
Alhamdulillah ...
at 5/29/2007 07:04:00 AM 0 comments
Labels: at work