Tables:
BSIS,BSAS,BSIK,BSAK,BSID,BSAD.
FBl1n- vendor line item display.
Fbl3n -G/l account line item display
FNl5n -Customer line item display
1. FS10 - G/L account balance Display
Report:
FS10 and Custom Ageing total Balance Has to Match.
2. FK10n - Vendor Balance Dispaly
For example take vendor 7002147
3. FD10N - For Customer Balance Display.
Similary we can see Customer balance on above T-code.
Program:
TABLES:Bsis,t001,lfa1,bsik.
type-pools: slis.
data: it_bsis type TABLE OF bsis,
wa_bsis type bsis.
data: it_bseg type TABLE OF bseg,
wa_bseg type bseg.
data: it_bsik TYPE TABLE OF bsik,
wa_bsik type bsik.
data: gs_layout type slis_layout_alv.
types:BEGIN OF ty_lfa1,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
END OF ty_lfa1.
DATA: it_lfa1 type TABLE OF ty_lfa1,
wa_lfa1 type ty_lfa1.
data:s_date type RANGE OF bsis-budat,
r_date type range of bsis-budat,
wa_date like LINE OF s_date,
pn_date TYPE sy-datum.
data: w_days TYPE i.
types: begin of ty_final,
lifnr TYPE lfa1-lifnr,
lfnam TYPE lfa1-name1,
0_30d TYPE bsid-dmbtr,
0_30c TYPE bsid-dmbtr,
31_60d TYPE bsid-dmbtr,
31_60c TYPE bsid-dmbtr,
61_90d TYPE bsid-dmbtr,
61_90c TYPE bsid-dmbtr,
91_120d TYPE bsid-dmbtr,
91_120c TYPE bsid-dmbtr,
121_150d TYPE bsid-dmbtr,
121_150c TYPE bsid-dmbtr,
151_180d type bsid-dmbtr,
151_180c type bsid-dmbtr,
GT180d type bsid-dmbtr,
GT180c type bsid-dmbtr,
END OF ty_final.
data: it_final TYPE TABLE OF ty_final,
wa_final type ty_final.
types: begin of ty_final1,
lifnr TYPE lfa1-lifnr,
lfnam TYPE lfa1-name1,
0to30days type bsid-dmbtr,
31to60days type bsid-dmbtr,
61to90days type bsid-dmbtr,
91to120days type bsid-dmbtr,
121to150days type bsid-dmbtr,
151to180days type bsid-dmbtr,
above180days type bsid-dmbtr,
Totaldue type bsid-dmbtr,
END OF ty_final1.
data: it_final1 type TABLE OF ty_final1,
wa_final1 type ty_final1.
data: LT_FIELDCATALOG type slis_t_fieldcat_alv,
LS_FIELDCATALOG type slis_fieldcat_alv.
SELECTION-SCREEN: begin of block b1 WITH FRAME title text-001.
SELECT-OPTIONS: so_bukrs for t001-bukrs NO INTERVALS OBLIGATORY , " company code
so_hkont for bsis-hkont OBLIGATORY. " Account number
PARAMETERS: p_date type sy-datum OBLIGATORY DEFAULT sy-datum.
* SELECT-OPTIONS: S_lifnr for bsik-lifnr.
selection-SCREEN:end of BLOCK b1 .
INITIALIZATION.
gs_layout-colwidth_optimize = 'X'.
at SELECTION-SCREEN on so_bukrs.
SELECT SINGLE * FROM t001 WHERE bukrs IN so_bukrs .
IF sy-subrc IS NOT INITIAL.
MESSAGE 'Company Code Invalid' TYPE 'E'.
ENDIF.
wa_date-sign = 'I'.
wa_date-option = 'BT'.
wa_date-high = p_date.
APPEND wa_date TO s_date.
CLEAR wa_date.
IF p_date LT sy-datum.
wa_date-sign = 'I'.
wa_date-option = 'BT' .
* pn_date = p1_date-high.
pn_date = p_date + 1.
wa_date-low = pn_date .
wa_date-high = sy-datum.
APPEND wa_date TO r_date.
CLEAR wa_date.
ENDIF.
START-OF-SELECTION.
SELECT lifnr name1 FROM lfa1 INTO TABLE it_lfa1.
sort it_lfa1 by lifnr.
select * from bsis into table it_bsis where bukrs in so_bukrs and hkont in so_hkont and budat IN s_date.
* SELECT * from bsas APPENDING TABLE it_bsis where bukrs in so_bukrs and hkont in so_hkont and budat IN s_date and augdt IN r_date.
if it_bsis[] is not INITIAL.
select * from bsik INTO TABLE it_bsik FOR ALL ENTRIES IN it_bsis where bukrs in so_bukrs and belnr = it_bsis-belnr and hkont in so_hkont.
* select * from bsak APPENDING TABLE it_bsik FOR ALL ENTRIES IN it_bsis where bukrs in so_bukrs and belnr = it_bsis-belnr.
*MESSAGE I000(ZSI).
else.
MESSAGE E000(ZSI).
endif.
loop at it_bsik into wa_bsik.
CLEAR w_days.
READ TABLE it_lfa1 INTO wa_lfa1 with key lifnr = wa_bsik-lifnr.
if sy-subrc = 0.
wa_final-lifnr = wa_lfa1-lifnr.
wa_final-lfnam = wa_lfa1-name1.
endif.
CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
EXPORTING
beg_da = wa_bsik-budat
end_da = p_date
IMPORTING
no_cal_day = w_days
EXCEPTIONS
dateint_error = 1
OTHERS = 2.
w_days = w_days - 1 .
IF w_days < 30.
IF wa_bsik-shkzg = 'S'.
wa_final-0_30d = wa_final-0_30d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-0_30c = wa_final-0_30c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 30 AND w_days LT 60 .
IF wa_bsik-shkzg = 'S'.
wa_final-31_60d = wa_final-31_60d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-31_60c = wa_final-31_60c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 60 AND w_days LT 90 .
IF wa_bsik-shkzg = 'S'.
wa_final-61_90d = wa_final-61_90d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-61_90c = wa_final-61_90c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 90 AND w_days LT 120.
IF wa_bsik-shkzg = 'S'.
wa_final-91_120d = wa_final-91_120d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-91_120c = wa_final-91_120c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 120 and w_days LT 150.
IF wa_bsik-shkzg = 'S'.
wa_final-121_150d = wa_final-121_150d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-121_150c = wa_final-121_150c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 150 and w_days LT 180.
IF wa_bsik-shkzg = 'S'.
wa_final-151_180d = wa_final-151_180d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-151_180c = wa_final-151_180c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 180 .
IF wa_bsik-shkzg = 'S'.
wa_final-GT180d = wa_final-GT180d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-GT180c = wa_final-GT180c + wa_bsik-dmbtr.
ENDIF.
endif.
at END OF lifnr.
COLLECT wa_final into it_final.
clear: wa_final.
ENDAT.
endloop.
loop at it_final into wa_final.
wa_final1-lifnr = wa_final-lifnr.
wa_final1-lfnam = wa_final-lfnam.
wa_final1-0to30days = wa_final-0_30d - wa_final-0_30c.
wa_final1-31to60days = wa_final-31_60d - wa_final-31_60c.
wa_final1-61to90days = wa_final-61_90d - wa_final-61_90c.
wa_final1-91to120days = wa_final-91_120d - wa_final-91_120c.
wa_final1-121to150days = wa_final-121_150d - wa_final-121_150c.
wa_final1-151to180days = wa_final-151_180d - wa_final-151_180c.
wa_final1-above180days = wa_final-GT180d - wa_final-GT180c.
wa_final1-totaldue =
wa_final1-0to30days + wa_final1-31to60days + wa_final1-61to90days + wa_final1-91to120days + wa_final1-121to150days + wa_final1-151to180days
+ wa_final1-above180days.
append wa_final1 to it_final1.
endloop.
perform display.
form display.
data: LV_COL TYPE I.
lv_col = 1.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'LIFNR'.
ls_fieldcatalog-seltext_m = 'Vendor Number'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = 'LFNAM'.
ls_fieldcatalog-seltext_m = 'Vendor name'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '0to30days'.
ls_fieldcatalog-seltext_L = '0 to 30Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '31to60DAYS'.
ls_fieldcatalog-seltext_L = '31 to 60Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '61to90DAYS'.
ls_fieldcatalog-seltext_L = '61 to 90Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '91to120DAYS'.
ls_fieldcatalog-seltext_l = '91 to 120Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '121to150DAYS'.
ls_fieldcatalog-seltext_l = '121 to 150Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '151to180DAYS'.
ls_fieldcatalog-seltext_l = '151 to 180Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = 'ABOVE180DAYS'.
ls_fieldcatalog-seltext_m = 'Above 180Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = 'TOTALDUE'.
ls_fieldcatalog-seltext_m = 'Total Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
* i_callback_top_of_page = 'TOP-OF-PAGE'
* i_callback_top_of_page = 'HEADER'
is_layout = gs_layout
it_fieldcat = lt_fieldcatalog[]
TABLES
t_outtab = it_final1
EXCEPTIONS
PROGRAM_ERROR = 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.
endform.
BSIS,BSAS,BSIK,BSAK,BSID,BSAD.
FBl1n- vendor line item display.
Fbl3n -G/l account line item display
FNl5n -Customer line item display
1. FS10 - G/L account balance Display
Report:
2. FK10n - Vendor Balance Dispaly
For example take vendor 7002147
3. FD10N - For Customer Balance Display.
Similary we can see Customer balance on above T-code.
Program:
TABLES:Bsis,t001,lfa1,bsik.
type-pools: slis.
data: it_bsis type TABLE OF bsis,
wa_bsis type bsis.
data: it_bseg type TABLE OF bseg,
wa_bseg type bseg.
data: it_bsik TYPE TABLE OF bsik,
wa_bsik type bsik.
data: gs_layout type slis_layout_alv.
types:BEGIN OF ty_lfa1,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
END OF ty_lfa1.
DATA: it_lfa1 type TABLE OF ty_lfa1,
wa_lfa1 type ty_lfa1.
data:s_date type RANGE OF bsis-budat,
r_date type range of bsis-budat,
wa_date like LINE OF s_date,
pn_date TYPE sy-datum.
data: w_days TYPE i.
types: begin of ty_final,
lifnr TYPE lfa1-lifnr,
lfnam TYPE lfa1-name1,
0_30d TYPE bsid-dmbtr,
0_30c TYPE bsid-dmbtr,
31_60d TYPE bsid-dmbtr,
31_60c TYPE bsid-dmbtr,
61_90d TYPE bsid-dmbtr,
61_90c TYPE bsid-dmbtr,
91_120d TYPE bsid-dmbtr,
91_120c TYPE bsid-dmbtr,
121_150d TYPE bsid-dmbtr,
121_150c TYPE bsid-dmbtr,
151_180d type bsid-dmbtr,
151_180c type bsid-dmbtr,
GT180d type bsid-dmbtr,
GT180c type bsid-dmbtr,
END OF ty_final.
data: it_final TYPE TABLE OF ty_final,
wa_final type ty_final.
types: begin of ty_final1,
lifnr TYPE lfa1-lifnr,
lfnam TYPE lfa1-name1,
0to30days type bsid-dmbtr,
31to60days type bsid-dmbtr,
61to90days type bsid-dmbtr,
91to120days type bsid-dmbtr,
121to150days type bsid-dmbtr,
151to180days type bsid-dmbtr,
above180days type bsid-dmbtr,
Totaldue type bsid-dmbtr,
END OF ty_final1.
data: it_final1 type TABLE OF ty_final1,
wa_final1 type ty_final1.
data: LT_FIELDCATALOG type slis_t_fieldcat_alv,
LS_FIELDCATALOG type slis_fieldcat_alv.
SELECTION-SCREEN: begin of block b1 WITH FRAME title text-001.
SELECT-OPTIONS: so_bukrs for t001-bukrs NO INTERVALS OBLIGATORY , " company code
so_hkont for bsis-hkont OBLIGATORY. " Account number
PARAMETERS: p_date type sy-datum OBLIGATORY DEFAULT sy-datum.
* SELECT-OPTIONS: S_lifnr for bsik-lifnr.
selection-SCREEN:end of BLOCK b1 .
INITIALIZATION.
gs_layout-colwidth_optimize = 'X'.
at SELECTION-SCREEN on so_bukrs.
SELECT SINGLE * FROM t001 WHERE bukrs IN so_bukrs .
IF sy-subrc IS NOT INITIAL.
MESSAGE 'Company Code Invalid' TYPE 'E'.
ENDIF.
wa_date-sign = 'I'.
wa_date-option = 'BT'.
wa_date-high = p_date.
APPEND wa_date TO s_date.
CLEAR wa_date.
IF p_date LT sy-datum.
wa_date-sign = 'I'.
wa_date-option = 'BT' .
* pn_date = p1_date-high.
pn_date = p_date + 1.
wa_date-low = pn_date .
wa_date-high = sy-datum.
APPEND wa_date TO r_date.
CLEAR wa_date.
ENDIF.
START-OF-SELECTION.
SELECT lifnr name1 FROM lfa1 INTO TABLE it_lfa1.
sort it_lfa1 by lifnr.
select * from bsis into table it_bsis where bukrs in so_bukrs and hkont in so_hkont and budat IN s_date.
* SELECT * from bsas APPENDING TABLE it_bsis where bukrs in so_bukrs and hkont in so_hkont and budat IN s_date and augdt IN r_date.
if it_bsis[] is not INITIAL.
select * from bsik INTO TABLE it_bsik FOR ALL ENTRIES IN it_bsis where bukrs in so_bukrs and belnr = it_bsis-belnr and hkont in so_hkont.
* select * from bsak APPENDING TABLE it_bsik FOR ALL ENTRIES IN it_bsis where bukrs in so_bukrs and belnr = it_bsis-belnr.
*MESSAGE I000(ZSI).
else.
MESSAGE E000(ZSI).
endif.
loop at it_bsik into wa_bsik.
CLEAR w_days.
READ TABLE it_lfa1 INTO wa_lfa1 with key lifnr = wa_bsik-lifnr.
if sy-subrc = 0.
wa_final-lifnr = wa_lfa1-lifnr.
wa_final-lfnam = wa_lfa1-name1.
endif.
CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
EXPORTING
beg_da = wa_bsik-budat
end_da = p_date
IMPORTING
no_cal_day = w_days
EXCEPTIONS
dateint_error = 1
OTHERS = 2.
w_days = w_days - 1 .
IF w_days < 30.
IF wa_bsik-shkzg = 'S'.
wa_final-0_30d = wa_final-0_30d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-0_30c = wa_final-0_30c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 30 AND w_days LT 60 .
IF wa_bsik-shkzg = 'S'.
wa_final-31_60d = wa_final-31_60d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-31_60c = wa_final-31_60c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 60 AND w_days LT 90 .
IF wa_bsik-shkzg = 'S'.
wa_final-61_90d = wa_final-61_90d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-61_90c = wa_final-61_90c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 90 AND w_days LT 120.
IF wa_bsik-shkzg = 'S'.
wa_final-91_120d = wa_final-91_120d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-91_120c = wa_final-91_120c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 120 and w_days LT 150.
IF wa_bsik-shkzg = 'S'.
wa_final-121_150d = wa_final-121_150d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-121_150c = wa_final-121_150c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 150 and w_days LT 180.
IF wa_bsik-shkzg = 'S'.
wa_final-151_180d = wa_final-151_180d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-151_180c = wa_final-151_180c + wa_bsik-dmbtr.
ENDIF.
ELSEIF w_days GE 180 .
IF wa_bsik-shkzg = 'S'.
wa_final-GT180d = wa_final-GT180d + wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_final-GT180c = wa_final-GT180c + wa_bsik-dmbtr.
ENDIF.
endif.
at END OF lifnr.
COLLECT wa_final into it_final.
clear: wa_final.
ENDAT.
endloop.
loop at it_final into wa_final.
wa_final1-lifnr = wa_final-lifnr.
wa_final1-lfnam = wa_final-lfnam.
wa_final1-0to30days = wa_final-0_30d - wa_final-0_30c.
wa_final1-31to60days = wa_final-31_60d - wa_final-31_60c.
wa_final1-61to90days = wa_final-61_90d - wa_final-61_90c.
wa_final1-91to120days = wa_final-91_120d - wa_final-91_120c.
wa_final1-121to150days = wa_final-121_150d - wa_final-121_150c.
wa_final1-151to180days = wa_final-151_180d - wa_final-151_180c.
wa_final1-above180days = wa_final-GT180d - wa_final-GT180c.
wa_final1-totaldue =
wa_final1-0to30days + wa_final1-31to60days + wa_final1-61to90days + wa_final1-91to120days + wa_final1-121to150days + wa_final1-151to180days
+ wa_final1-above180days.
append wa_final1 to it_final1.
endloop.
perform display.
form display.
data: LV_COL TYPE I.
lv_col = 1.
CLEAR ls_fieldcatalog.
ls_fieldcatalog-fieldname = 'LIFNR'.
ls_fieldcatalog-seltext_m = 'Vendor Number'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = 'LFNAM'.
ls_fieldcatalog-seltext_m = 'Vendor name'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '0to30days'.
ls_fieldcatalog-seltext_L = '0 to 30Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '31to60DAYS'.
ls_fieldcatalog-seltext_L = '31 to 60Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '61to90DAYS'.
ls_fieldcatalog-seltext_L = '61 to 90Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '91to120DAYS'.
ls_fieldcatalog-seltext_l = '91 to 120Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '121to150DAYS'.
ls_fieldcatalog-seltext_l = '121 to 150Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = '151to180DAYS'.
ls_fieldcatalog-seltext_l = '151 to 180Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = 'ABOVE180DAYS'.
ls_fieldcatalog-seltext_m = 'Above 180Day Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CLEAR ls_fieldcatalog.
lv_col = lv_col + 1.
ls_fieldcatalog-fieldname = 'TOTALDUE'.
ls_fieldcatalog-seltext_m = 'Total Due'.
ls_fieldcatalog-col_pos = lv_col.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
CLEAR ls_fieldcatalog.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
* i_callback_top_of_page = 'TOP-OF-PAGE'
* i_callback_top_of_page = 'HEADER'
is_layout = gs_layout
it_fieldcat = lt_fieldcatalog[]
TABLES
t_outtab = it_final1
EXCEPTIONS
PROGRAM_ERROR = 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.
endform.
No comments:
Post a Comment