Thursday, January 27, 2011 at 12:04 AM | 1 comments
Fungsi BAPI_TRIP_GET_DETAILS adalah untuk mengambil nilai yang ada di travel expense tcode PR05.
data :
    t_framedata type table of bapitrmain with header line,
    t_receipts type table of bapitrvreo with header line,
    t_addinfo type table of bapitraddi with header line,
    t_amounts type table OF bapitrvsum with header line.

CALL FUNCTION 'BAPI_TRIP_GET_DETAILS'
EXPORTING
    employeenumber = '151515' " <- Employee Number
    tripnumber = '15' " <- Trip Number
    language = sy-langu
    calculate_amounts = 'X'
IMPORTING
    framedata = t_framedata
TABLES
    receipts = t_receipts
    addinfo = t_addinfo
    amounts = t_amounts.
Posted by Shanto Labels:
Fungsi CURRENCY_AMOUNT_DISPLAY_TO_SAP adalah untuk menyimpan suatu nilai ke table sesuai dengan currency.

Contoh :

CALL FUNCTION 'CURRENCY_AMOUNT_DISPLAY_TO_SAP'
EXPORTING
    currency = 'IDR'
    amount_display = 25
IMPORTING
    amount_internal = gd_intval " Hasil 0.2500
EXCEPTIONS
    internal_error = 1
    others = 2.
Posted by Shanto Labels:
Monday, January 24, 2011 at 9:27 PM | 0 comments
Fungsi MONTH_PLUS_DETERMINE adalah untuk menjumlahkan / mengurangkan bulan di dalam tanggal.

Contoh :

CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
   months = 2
   olddate = '20080401'
IMPORTING
   newdate = lv_date_new. " hasil -> 20080601
Posted by Shanto Labels:
Fungsi Get Last Day of The Month adalah mengembalikan nilai tanggal terakhir.

Contoh :

CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
   day_in = '20080401'
IMPORTING
   last_day_of_month = lv_last_day_of_month " hasil -> 20080430
EXCEPTIONS
   day_in_no_date = 1
   others = 2.
Posted by Shanto Labels: