Program yang digunakan

Ini adalah script untuk program yang dibuat p nana rusmana terkait reporting Dasar Pengenaan Pajak untuk PPN.

ZFPJK07V2

 

*———————————————————————-*

* *

* RFITEMAR Line ITEMs Accounts Receivable *

* *

* This report selects data to be displayed by ALV *

*———————————————————————-*

REPORT zfpjk07 MESSAGE-ID msitem LINE-SIZE 180

NO STANDARD PAGE HEADING.

*… general data definitions:

INCLUDE zfbl3nv2_str.

INCLUDE zfpjk07v2_def.

DATA: v_augbl TYPE bsak-augbl.

DATA: v_curr LIKE skat-txt20.

TABLES: bseg, skat.

AT SELECTION-SCREEN.

IF NOT p_divisi IS INITIAL AND NOT dd_gsber IS INITIAL .

CLEAR: p_divisi, dd_gsber.

MESSAGE ID ‘ZMI01’ TYPE ‘E’ NUMBER ‘306’.

ENDIF.

IF sd_saknr IS INITIAL.

MESSAGE ID ‘ZMI01’ TYPE ‘E’ NUMBER ‘307’.

ENDIF.

IF NOT sd_saknr-high IS INITIAL AND

NOT sd_saknr-high IN r_ppn.

MESSAGE ID ‘ZMI01’ TYPE ‘E’ NUMBER ‘308’.

ENDIF.

IF NOT sd_saknr-low IN r_ppn .

MESSAGE ID ‘ZMI01’ TYPE ‘E’ NUMBER ‘308’.

ENDIF.

INITIALIZATION.

PERFORM f_initialization.

*** start of selection

START-OF-SELECTION.

PERFORM check_gsber.

PERFORM fill_bhdgd.

PERFORM init-parameter.

*process extrack data

PERFORM submit_getfbl3n.

PERFORM get_revenue.

PERFORM display_data.

PERFORM display_rekap.

STOP.

SET PF-STATUS ‘DISP-000’.

CLEAR a.

END-OF-SELECTION.

TOP-OF-PAGE.

PERFORM header_top.

PERFORM header_report_a.

AT USER-COMMAND.

AT LINE-SELECTION.

DATA: v_sy-cucol LIKE sy-cucol .

* a = sy-FLENG.

* a = sy-CUCOL.

* a = sy-CUROW.

* a = sy-COLNO.

* a = sy-LINNO.

* b = sy-LISEL.

* CASE sy-ucomm.

* WHEN ‘REFRESH’.

* WHEN ‘SELECT’.

v_sy-cucol = sy-cucol .

IF num NE 0.

* IF NOT rd_fcply IS INITIAL.

IF v_sy-cucol > 38 AND v_sy-cucol < 52.

MOVE-CORRESPONDING it_rekon TO wa_rekon.

CHECK NOT wa_rekon-belnr IS INITIAL.

SET PARAMETER ID ‘BLN’ FIELD wa_rekon-belnr.

SET PARAMETER ID ‘BUK’ FIELD wa_rekon-bukrs.

SET PARAMETER ID ‘GJR’ FIELD wa_rekon-gjahr.

CALL TRANSACTION ‘FB03’ AND SKIP FIRST SCREEN.

CLEAR: it_rekon, num.

ENDIF.

** rs_variant_out-varians = ‘/NANA’.

* ELSEIF v_sy-cucol > 132 AND v_sy-cucol < 144.

* MOVE-CORRESPONDING it_data TO wa_data.

* CHECK NOT wa_data-augbl IS INITIAL.

* SET PARAMETER ID ‘BLN’ FIELD wa_data-augbl.

* SET PARAMETER ID ‘BUK’ FIELD wa_data-bukrs.

* SET PARAMETER ID ‘GJR’ FIELD wa_data-gjahr.

* CALL TRANSACTION ‘FB03’ AND SKIP FIRST SCREEN.

* ENDIF.

* ELSEIF NOT rd_fcind IS INITIAL.

* IF v_sy-cucol > 53 AND v_sy-cucol < 65.

* MOVE-CORRESPONDING it_output2 TO wa_data.

* CHECK NOT wa_data-belnr IS INITIAL.

* SET PARAMETER ID ‘BLN’ FIELD wa_data-belnr.

* SET PARAMETER ID ‘BUK’ FIELD wa_data-bukrs.

* SET PARAMETER ID ‘GJR’ FIELD wa_data-gjahr.

* CALL TRANSACTION ‘FB03’ AND SKIP FIRST SCREEN.

** rs_variant_out-varians = ‘/NANA’.

* ELSEIF v_sy-cucol > 132 AND v_sy-cucol < 144.

* MOVE-CORRESPONDING it_output2 TO wa_data.

* CHECK NOT wa_data-augbl IS INITIAL.

* SET PARAMETER ID ‘BLN’ FIELD wa_data-augbl.

* SET PARAMETER ID ‘BUK’ FIELD wa_data-bukrs.

* SET PARAMETER ID ‘GJR’ FIELD wa_data-gjahr.

* CALL TRANSACTION ‘FB03’ AND SKIP FIRST SCREEN.

* ENDIF.

* ENDIF.

ENDIF.

CLEAR num.

*&———————————————————————*

*& Form submit_getfbl3n

*&———————————————————————*

FORM submit_getfbl3n.

* SUBMIT zfbl3n AND RETURN

* WITH sd_bukrs-low = p_bukrs

* WITH sd_saknr IN sd_saknr

* WITH so_budat IN so_budat

* WITH so_gsber IN dd_gsber

* WITH x_opsel = ‘ ‘ ” Open item

* WITH x_clsel = ‘ ‘ ” Cleared item

* WITH x_aisel = ‘X’ ” All item

* WITH x_norm = ‘X’ ” Normal Items

* WITH x_shbv = ‘X’ ” Special G/L transaction

* WITH x_belnr = ‘X’ ” detil no doc

* WITH x_projk = ‘ ‘ ” summary no projeck wbs

* WITH x_bschl = ‘ ‘ ” summary posting key

* WITH x_pswsl = ‘ ‘ ” summary foregen curren key

* WITH x_prctr = ‘X’ ” detil profit center

* WITH x_kostl = ‘X’. ” detil cost center

*

* IMPORT itab_fbl3n TO it_fbl3n FROM MEMORY ID ‘it_fbl3n’.

* FREE MEMORY ID ‘it_fbl3n’.

*

DATA: gt_glitem LIKE faglflexa OCCURS 0 WITH HEADER LINE.

DATA: x_waers TYPE waers.

SELECT SINGLE waers FROM t001 INTO x_waers WHERE bukrs = p_bukrs.

SELECT * INTO TABLE gt_glitem FROM faglflexa WHERE ryear EQ p_gjahr

AND rbukrs = p_bukrs

AND rbusa IN dd_gsber

AND prctr IN dd_prctr

AND rldnr IN s_rldnra

AND rrcty IN (‘0’, ‘2’)

AND racct IN sd_saknr

AND rvers EQ ‘001’

AND poper = p_monat.

LOOP AT gt_glitem.

it_fbl3n-rldnr = gt_glitem-rldnr.

it_fbl3n-bukrs = gt_glitem-rbukrs.

it_fbl3n-gjahr = gt_glitem-gjahr.

it_fbl3n-monat = gt_glitem-poper.

it_fbl3n-hkont = gt_glitem-racct.

* it_fbl3n-blart = gt_glitem-.

it_fbl3n-gsber = gt_glitem-rbusa.

it_fbl3n-belnr = gt_glitem-docnr.

* it_fbl3n-pswsl = gt_glitem-.

* it_fbl3n-pswbt = gt_glitem-.

it_fbl3n-buzei = gt_glitem-docln.

* it_fbl3n-bschl = gt_glitem-.

* it_fbl3n-projk = gt_glitem-.

it_fbl3n-shkzg = gt_glitem-drcrk.

it_fbl3n-wrshb = gt_glitem-tsl.

it_fbl3n-dmshb = gt_glitem-hsl.

it_fbl3n-hwaer = x_waers.

it_fbl3n-waers = gt_glitem-rtcur.

* it_fbl3n-zuonr = gt_glitem-.

it_fbl3n-kostl = gt_glitem-rcntr.

it_fbl3n-prctr = gt_glitem-prctr.

APPEND it_fbl3n.

ENDLOOP.

CLEAR it_fbl3n.

ENDFORM. ” submit_getfbl3n

*&———————————————————————*

*& Form f_initialization

*&———————————————————————*

FORM f_initialization.

mc_append_range r_ppn ‘I’ ‘BT’ ‘0020501000’ ‘0020501099’.

mc_append_range r_pdd ‘I’ ‘BT’ ‘0020700000’ ‘0020799999’.

mc_append_range r_rev ‘I’ ‘BT’ ‘0041000000’ ‘0041999999’.

ENDFORM. ” f_initialization

*&———————————————————————*

*& Form init-parameter

*&———————————————————————*

* text

*———————————————————————-*

* –> p1 text

* <– p2 text

*———————————————————————-*

FORM init-parameter.

DATA : ld_datum LIKE sy-datum,

ld_date_first LIKE sy-datum,

ld_date_last LIKE sy-datum.

TABLES: zfam1.

DATA: sw(1).

IF sd_saknr IS INITIAL.

CLEAR sw.

ELSE.

sw = ‘Y’.

ENDIF.

REFRESH so_budat.

CLEAR so_budat.

CONCATENATE p_gjahr p_monat ’01’ INTO ld_date_first.

CALL FUNCTION ‘RP_LAST_DAY_OF_MONTHS’

EXPORTING

day_in = ld_date_first

IMPORTING

last_day_of_month = ld_date_last

EXCEPTIONS

day_in_no_date = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

mc_append_range so_budat ‘I’ ‘BT’ ld_date_first ld_date_last.

ENDFORM. ” init-parameter

*&———————————————————————*

*& Form fill_bhdgd

*&———————————————————————*

* text

*———————————————————————-*

* –> p1 text

* <– p2 text

*———————————————————————-*

FORM fill_bhdgd.

SELECT SINGLE * FROM t001 WHERE bukrs = ‘1000’.

IF sy-subrc = 0.

w_butxt = t001-butxt.

w_ort01 = t001-ort01.

ENDIF.

w_judul1 = ‘ KKP – Tax Reconsilation Reporting ‘.

w_judul2 = ‘ ——————————— ‘.

w_col1 = STRLEN( w_judul1 ).

w_col2 = ( sy-linsz – w_col1 ) / 2.

CONCATENATE sy-datum+6(2) ‘.’ sy-datum+4(2) ‘.’ sy-datum(4)

INTO w_date_proc.

CONCATENATE sy-uzeit(2) ‘:’ sy-uzeit+2(2) ‘:’ sy-uzeit(2)

INTO w_time_proc.

CONCATENATE ‘PERIODE:’ p_monat ‘-‘ p_gjahr

INTO w_judul3 SEPARATED BY ‘ ‘.

ENDFORM. ” fill_bhdgd

*&———————————————————————*

*& Form header_top

*&———————————————————————*

* text

*———————————————————————-*

* –> p1 text

* <– p2 text

*———————————————————————-*

FORM header_top.

FORMAT COLOR OFF INTENSIFIED OFF INVERSE OFF HOTSPOT OFF INPUT OFF.

WRITE : /3 w_butxt,

56 w_judul1,

128 ‘Date: ‘,

133 w_date_proc.

WRITE : /3 w_ort01,

56 w_judul2,

128 ‘Time: ‘,

135 w_time_proc.

* IF p_fcply IS INITIAL.

* WRITE: /3 ‘FC Area Pelayanan : ALL’.

* ELSE.

* WRITE: /3 ‘FC Area Pelayanan : ‘, p_fcply.

* ENDIF.

WRITE: /62 w_judul3,

128 ‘Page: ‘ , sy-pagno.

* IF p_fcind IS INITIAL.

* WRITE: /3 ‘FC Induk : ALL’.

* ELSE.

* WRITE: /3 ‘FC Induk : ‘, p_fcind.

* ENDIF.

IF p_divisi IS INITIAL.

WRITE: /3 ‘Divisi : ALL’.

ELSE.

WRITE: /3 ‘Divisi : ‘, v_divisi.

ENDIF.

IF dd_gsber IS INITIAL.

WRITE: /3 ‘Bisnis Area : ALL’.

ELSE.

WRITE: /3 ‘Bisnis Area : ‘.

LOOP AT dd_gsber.

IF sy-tabix > 1.

WRITE: ‘,’.

ENDIF.

IF dd_gsber-high IS INITIAL.

WRITE : dd_gsber-low.

ELSE.

WRITE : dd_gsber-low,’s/d’,dd_gsber-high.

ENDIF.

ENDLOOP.

ENDIF.

* IF NOT dd_kostl IS INITIAL.

* WRITE: /3 ‘Cost Center : ‘.

* LOOP AT dd_kostl.

* IF sy-tabix > 1.

* WRITE: ‘,’.

* ENDIF.

* IF dd_kostl-high IS INITIAL.

* WRITE : dd_kostl-low.

* ELSE.

* WRITE : dd_kostl-low,’s/d’,dd_kostl-high.

* ENDIF.

* ENDLOOP.

* ENDIF.

*

ENDFORM. ” header_top

*&———————————————————————*

*& Form header_report_a

*&———————————————————————*

FORM header_report_a.

FORMAT COLOR COL_HEADING.

WRITE :/(179) sy-uline.

WRITE: /(01) sy-vline NO-GAP,

(29) ‘Account PPN’ NO-GAP CENTERED,

* (01) sy-vline NO-GAP,

* (20) ‘DESCRIPTION’ NO-GAP LEFT-JUSTIFIED,

(01) sy-vline NO-GAP,

(04) ‘BA’ NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(12) ‘No. Doc.’ NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(19) ‘AMMOUNT’ NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekon-hwaer,

(01) sy-vline NO-GAP,

(04) ‘BA’ NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(29) ‘Account Revenue’ NO-GAP CENTERED,

* (01) sy-vline NO-GAP,

* (20) ‘DESCRIPTION’ NO-GAP LEFT-JUSTIFIED,

(01) sy-vline NO-GAP,

(19) ‘AMMOUNT’ NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekon-hwaer,

(01) sy-vline NO-GAP,

(04) ‘BA’ NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(29) ‘Account PDD’ NO-GAP CENTERED,

* (01) sy-vline NO-GAP,

* (20) ‘DESCRIPTION’ NO-GAP LEFT-JUSTIFIED,

(01) sy-vline NO-GAP,

(19) ‘AMMOUNT’ NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekon-hwaer,

(01) sy-vline NO-GAP.

WRITE :/(179) sy-uline.

FORMAT COLOR OFF INTENSIFIED OFF INVERSE OFF HOTSPOT OFF INPUT OFF.

ENDFORM. ” header_report_a

*&———————————————————————*

*& Form check_gsber

*&———————————————————————*

FORM check_gsber.

ENDFORM. ” check_gsber

*&———————————————————————*

*& Form get_revenue

*&———————————————————————*

* text

*———————————————————————-*

* –> p1 text

* <– p2 text

*———————————————————————-*

FORM get_revenue.

LOOP AT it_fbl3n.

MOVE-CORRESPONDING it_fbl3n TO wa_bseg.

* wa_bseg-wrbtr = it_fbl3n-wrshb.

wa_bseg-dmbtr = it_fbl3n-dmshb.

IF wa_bseg-hkont IN r_ppn.

it_ppn = wa_bseg.

COLLECT it_ppn.

ELSEIF wa_bseg-hkont IN r_pdd.

it_pdd = wa_bseg.

COLLECT it_pdd.

ELSEIF wa_bseg-hkont IN r_rev.

it_rev = wa_bseg.

COLLECT it_rev.

ELSE.

it_lain = wa_bseg.

COLLECT it_lain.

ENDIF.

ENDLOOP.

REFRESH it_fbl3n.

********* relasi it_ppn it_rev & it_pdd.

LOOP AT it_ppn.

CLEAR: it_rekon, sw, sw2.

MOVE-CORRESPONDING it_ppn TO it_rekon.

it_rekon-kel = ‘1’. “ppn

it_rekon-group = ‘2’. “ppn & rev

LOOP AT it_rev WHERE gjahr = it_ppn-gjahr

AND belnr = it_ppn-belnr.

it_rekon-buzei2 = it_rev-buzei.

it_rekon-gsber2 = it_rev-gsber.

it_rekon-hkont2 = it_rev-hkont.

* it_rekon-wrbtr2 = it_rev-wrbtr.

it_rekon-dmbtr2 = it_rev-dmbtr.

CLEAR : it_rekon-buzei3, it_rekon-gsber3, it_rekon-hkont3,

it_rekon-dmbtr3.

READ TABLE it_pdd WITH KEY gjahr = it_ppn-gjahr

belnr = it_ppn-belnr.

IF sy-subrc = 0.

wa_bseg = it_pdd.

it_rekon-buzei3 = it_pdd-buzei.

it_rekon-gsber3 = it_pdd-gsber.

it_rekon-hkont3 = it_pdd-hkont.

* it_rekon-wrbtr3 = it_pdd-wrbtr.

it_rekon-dmbtr3 = it_pdd-dmbtr.

DELETE it_pdd WHERE gjahr = it_ppn-gjahr

AND belnr = it_ppn-belnr

AND buzei = wa_bseg-buzei.

it_rekon-group = ‘1’. ” ppn & rev & pdd

ENDIF.

APPEND it_rekon.

CLEAR: it_rekon-dmbtr, it_rekon-buzei.

DELETE it_rev.

sw = 1.

ENDLOOP.

IF NOT sw IS INITIAL.

DELETE it_ppn.

ENDIF.

ENDLOOP.

********* relasi2 it_ppn it_rev & it_pdd.

LOOP AT it_ppn.

READ TABLE it_rekon WITH KEY gjahr = it_ppn-gjahr

belnr = it_ppn-belnr

buzei = 0.

IF sy-subrc = 0.

wa_rekon = it_rekon.

wa_rekon-gsber = it_ppn-gsber.

wa_rekon-hkont = it_ppn-hkont.

* wa_rekon-wrbtr = it_ppn-wrbtr.

wa_rekon-dmbtr = it_ppn-dmbtr.

DELETE it_rekon.

INSERT wa_rekon INTO TABLE it_rekon.

ENDIF.

ENDLOOP.

********* relasi it_ppn it_pdd.

LOOP AT it_ppn.

CLEAR: it_rekon, sw, sw2.

it_rekon-kel = ‘1’. “ppn

it_rekon-group = ‘4’. ” ppn

MOVE-CORRESPONDING it_ppn TO it_rekon.

LOOP AT it_pdd WHERE gjahr = it_ppn-gjahr

AND belnr = it_ppn-belnr.

wa_bseg = it_pdd.

it_rekon-buzei3 = it_pdd-buzei.

it_rekon-gsber3 = it_pdd-gsber.

it_rekon-hkont3 = it_pdd-hkont.

* it_rekon-wrbtr3 = it_pdd-wrbtr.

it_rekon-dmbtr3 = it_pdd-dmbtr.

it_rekon-group = ‘3’. ” ppn & pdd

APPEND it_rekon.

CLEAR: it_rekon-dmbtr, it_rekon-buzei.

DELETE it_pdd.

sw = 1.

ENDLOOP.

IF sw IS INITIAL.

APPEND it_rekon.

ENDIF.

DELETE it_ppn.

ENDLOOP.

********* relasi2 it_ppn it_pdd.

LOOP AT it_ppn.

READ TABLE it_rekon WITH KEY gjahr = it_ppn-gjahr

belnr = it_ppn-belnr

buzei = 0.

IF sy-subrc = 0.

wa_rekon = it_rekon.

wa_rekon-gsber = it_ppn-gsber.

wa_rekon-hkont = it_ppn-hkont.

* wa_rekon-wrbtr = it_ppn-wrbtr.

wa_rekon-dmbtr = it_ppn-dmbtr.

wa_rekon-buzei = 0.

DELETE it_rekon.

INSERT wa_rekon INTO TABLE it_rekon.

ELSE.

it_rekon-kel = ‘1’. “ppn

it_rekon-group = ‘4’. ” ppn

MOVE-CORRESPONDING it_ppn TO it_rekon.

APPEND it_rekon.

DELETE it_ppn.

ENDIF.

ENDLOOP.

**************** relasi it_rev it_pdd.

LOOP AT it_rev.

CLEAR: it_rekon, sw, sw2.

it_rekon-kel = ‘2’. ” rev

it_rekon-group = ‘6’. ” rev

it_rekon-bukrs = it_rev-bukrs.

it_rekon-gjahr = it_rev-gjahr.

it_rekon-belnr = it_rev-belnr.

it_rekon-buzei2 = it_rev-buzei.

it_rekon-gsber2 = it_rev-gsber.

it_rekon-hkont2 = it_rev-hkont.

* it_rekon-wrbtr2 = it_rev-wrbtr.

it_rekon-dmbtr2 = it_rev-dmbtr.

it_rekon-hwaer = it_rev-hwaer.

LOOP AT it_pdd WHERE gjahr = it_rev-gjahr

AND belnr = it_rev-belnr.

wa_bseg = it_pdd.

it_rekon-buzei3 = it_pdd-buzei.

it_rekon-gsber3 = it_pdd-gsber.

it_rekon-hkont3 = it_pdd-hkont.

* it_rekon-wrbtr3 = it_pdd-wrbtr.

it_rekon-dmbtr3 = it_pdd-dmbtr.

it_rekon-group = ‘5’. ” rev & pdd

APPEND it_rekon.

CLEAR: it_rekon-dmbtr, it_rekon-buzei.

DELETE it_pdd.

sw = 1.

ENDLOOP.

IF sw IS INITIAL.

APPEND it_rekon.

ENDIF.

DELETE it_rev.

ENDLOOP.

LOOP AT it_pdd.

CLEAR it_rekon.

wa_bseg = it_pdd.

it_rekon-bukrs = it_pdd-bukrs.

it_rekon-gjahr = it_pdd-gjahr.

it_rekon-belnr = it_pdd-belnr.

it_rekon-buzei3 = it_pdd-buzei.

it_rekon-gsber3 = it_pdd-gsber.

it_rekon-hkont3 = it_pdd-hkont.

* it_rekon-wrbtr3 = it_pdd-wrbtr.

it_rekon-dmbtr3 = it_pdd-dmbtr.

it_rekon-hwaer = it_pdd-hwaer.

it_rekon-kel = ‘3’. ” pdd

it_rekon-group = ‘7’. ” pdd

APPEND it_rekon.

CLEAR: it_rekon-dmbtr, it_rekon-buzei.

DELETE it_pdd.

sw = 1.

ENDLOOP.

ENDFORM. ” get_revenue

*&———————————————————————*

*& Form display_data

*&———————————————————————*

FORM display_data.

DATA: v_txt20_a LIKE skat-txt20.

DATA: v_txt20_b LIKE skat-txt20.

DATA: v_txt20_c LIKE skat-txt20.

CLEAR: num.

SORT it_rekon BY kel hkont group belnr.

LOOP AT it_rekon.

CLEAR : v_txt20_a, v_txt20_b, v_txt20_c.

v_curr = it_rekon-hwaer.

SELECT SINGLE * FROM skat

WHERE ktopl = it_rekon-bukrs

AND saknr = it_rekon-hkont.

IF sy-subrc = 0.

v_txt20_a = skat-txt20.

ENDIF.

SELECT SINGLE * FROM skat

WHERE ktopl = it_rekon-bukrs

AND saknr = it_rekon-hkont2.

IF sy-subrc = 0.

v_txt20_b = skat-txt20.

ENDIF.

SELECT SINGLE * FROM skat

WHERE ktopl = it_rekon-bukrs

AND saknr = it_rekon-hkont3.

IF sy-subrc = 0.

v_txt20_c = skat-txt20.

ENDIF.

WRITE: /(01) sy-vline NO-GAP,

(08) it_rekon-hkont NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(20) v_txt20_a NO-GAP LEFT-JUSTIFIED,

(01) sy-vline NO-GAP,

(04) it_rekon-gsber NO-GAP CENTERED.

FORMAT COLOR COL_HEADING INTENSIFIED OFF.

WRITE: (01) sy-vline NO-GAP,

(12) it_rekon-belnr NO-GAP CENTERED.

FORMAT COLOR COL_BACKGROUND.

WRITE: (01) sy-vline NO-GAP,

(19) it_rekon-dmbtr NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekon-hwaer,

(01) sy-vline NO-GAP,

(04) it_rekon-gsber2 NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(08) it_rekon-hkont2 NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(20) v_txt20_b NO-GAP LEFT-JUSTIFIED,

(01) sy-vline NO-GAP,

(19) it_rekon-dmbtr2 NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekon-hwaer,

(01) sy-vline NO-GAP,

(04) it_rekon-gsber3 NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(08) it_rekon-hkont3 NO-GAP CENTERED,

(01) sy-vline NO-GAP,

(20) v_txt20_c NO-GAP LEFT-JUSTIFIED,

(01) sy-vline NO-GAP,

(19) it_rekon-dmbtr3 NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekon-hwaer,

(01) sy-vline NO-GAP.

ADD 1 TO num.

HIDE: num, it_rekon-bukrs, it_rekon-gjahr, it_rekon-belnr.

AT END OF group.

SUM.

FORMAT COLOR COL_TOTAL INTENSIFIED OFF.

WRITE: /(09) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(05) sy-vline NO-GAP,

(13) sy-vline NO-GAP,

(01) sy-vline NO-GAP,

(19) it_rekon-dmbtr NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(05) sy-vline NO-GAP,

(09) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(01) sy-vline NO-GAP,

(19) it_rekon-dmbtr2 NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(05) sy-vline NO-GAP,

(09) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(01) sy-vline NO-GAP,

(19) it_rekon-dmbtr3 NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(01) sy-vline NO-GAP.

FORMAT COLOR COL_BACKGROUND.

ENDAT.

AT END OF hkont.

SUM.

FORMAT COLOR COL_TOTAL INTENSIFIED ON.

WRITE: /(09) sy-vline NO-GAP,

* (01) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(05) sy-vline NO-GAP,

(13) sy-vline NO-GAP,

(01) sy-vline NO-GAP,

(19) it_rekon-dmbtr NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(05) sy-vline NO-GAP,

(09) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(01) sy-vline NO-GAP,

(19) it_rekon-dmbtr2 NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(05) sy-vline NO-GAP,

(09) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(01) sy-vline NO-GAP,

(19) it_rekon-dmbtr3 NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(01) sy-vline NO-GAP.

FORMAT COLOR COL_BACKGROUND.

WRITE: /(09) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(05) sy-vline NO-GAP,

(13) sy-vline NO-GAP,

(20) sy-vline NO-GAP,

(05) sy-vline NO-GAP,

(09) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(20) sy-vline NO-GAP,

(05) sy-vline NO-GAP,

(09) sy-vline NO-GAP,

(21) sy-vline NO-GAP,

(20) sy-vline NO-GAP,

(01) sy-vline NO-GAP.

ENDAT.

it_rekap-bukrs = it_rekon-bukrs.

it_rekap-kel = it_rekon-kel.

it_rekap-group = it_rekon-group.

it_rekap-hkont = it_rekon-hkont.

it_rekap-hwaer = it_rekon-hwaer.

it_rekap-dmbtr = it_rekon-dmbtr.

it_rekap-dmbtr2 = it_rekon-dmbtr2.

it_rekap-dmbtr3 = it_rekon-dmbtr3.

COLLECT it_rekap.

ENDLOOP.

CLEAR num.

WRITE :/(179) sy-uline.

*LEFT-JUSTIFIED

ENDFORM. ” display_data

*&———————————————————————*

*& Form display_REKAP

*&———————————————————————*

FORM display_rekap.

DATA: v_ket(50).

DATA: c_jml1(25).

DATA: c_jml2(25).

DATA: c_jml3(25).

DATA: c_coa1(50).

DATA: c_coa2(50).

DATA: c_coa3(50).

DATA: v_txt20_a LIKE skat-txt20.

DATA: v_idx(2).

SKIP.

FORMAT COLOR COL_HEADING INTENSIFIED ON.

WRITE: /(34) ‘G/L Account’ NO-GAP CENTERED,

(20) ‘Total PPN’ NO-GAP RIGHT-JUSTIFIED,

(20) ‘Total REV’ NO-GAP RIGHT-JUSTIFIED,

(20) ‘Total PDD’ NO-GAP RIGHT-JUSTIFIED,

(02) ‘ ‘,

(35) ‘KETERANGAN’ NO-GAP LEFT-JUSTIFIED.

* (30) ‘KETERANGAN’ no-gap right-justified.

FORMAT COLOR COL_BACKGROUND.

WRITE :/(132) sy-uline.

SORT it_rekap BY kel group hkont.

LOOP AT it_rekap.

v_curr = it_rekap-hwaer.

ADD 1 TO v_idx.

CLEAR : v_txt20_a.

SELECT SINGLE * FROM skat

WHERE ktopl = it_rekap-bukrs

AND saknr = it_rekap-hkont.

IF sy-subrc = 0.

v_txt20_a = skat-txt20.

ENDIF.

CASE it_rekap-group.

WHEN ‘1’.

v_ket = ‘(PPN dengan REVENUE dan PDD)’.

WHEN ‘2’.

v_ket = ‘(PPN dengan REVENUE tanpa PDD)’.

WHEN ‘3’.

v_ket = ‘(PPN dengan PDD tanpa REVENUE)’.

WHEN ‘4’.

v_ket = ‘(PPN tanpa REVENUE dan PDD)’.

WHEN ‘5’.

v_ket = ‘(REVENUE dengan PDD tanpa PPN)’.

v_txt20_a = ‘Revenue’.

WHEN ‘6’.

v_ket = ‘(REVENUE tanpa PDD dan PPN)’.

v_txt20_a = ‘Revenue’.

WHEN ‘7’.

v_ket = ‘(PDD tanpa REVENUE dan PPN)’.

v_txt20_a = ‘PDD’.

WHEN OTHERS.

ENDCASE.

WRITE: /(03) v_idx NO-GAP RIGHT-JUSTIFIED,

(01) ‘.’

NO-GAP LEFT-JUSTIFIED,

(10) it_rekap-hkont NO-GAP CENTERED,

(20) v_txt20_a NO-GAP LEFT-JUSTIFIED,

(20) it_rekap-dmbtr NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekap-hwaer,

(20) it_rekap-dmbtr2 NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekap-hwaer,

(20) it_rekap-dmbtr3 NO-GAP RIGHT-JUSTIFIED

CURRENCY it_rekap-hwaer,

(02) ‘ ‘,

(30) v_ket NO-GAP LEFT-JUSTIFIED.

AT END OF hkont.

SUM.

FORMAT COLOR COL_TOTAL INTENSIFIED ON.

WRITE: /(34) ‘.’ NO-GAP LEFT-JUSTIFIED,

(20) it_rekap-dmbtr NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(20) it_rekap-dmbtr2 NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(20) it_rekap-dmbtr3 NO-GAP RIGHT-JUSTIFIED

CURRENCY v_curr,

(02) ‘ ‘,

(30) v_ket NO-GAP LEFT-JUSTIFIED.

CLEAR v_idx.

SKIP 1.

FORMAT COLOR COL_BACKGROUND.

ENDAT.

ENDLOOP.

ENDFORM. ” display_REKAP