Hi Patric Yee,
Thank very much for your help
table is uploded from internal table
now i want to display in output
How many Records Updated &
How many records Duplicate or error
i used foloowing logic
i got output what are records in itab that show as updated records
and
no error records
please see my code let me the modification to get desired result
advanced thanks to your reply
tables : ztable.
TYPE-POOLS: SLIS.
data: fieldcatalog type slis_t_fieldcat_alv with header line,
header type slis_t_listheader,
gd_layout type slis_layout_alv,
wa type slis_listheader.
data : nlinechar(20) type c, rows type i, tabcount type i.
data : begin of itab occurs 100.
include structure zpcard.
data : end of itab.
data : begin of itabs occurs 100.
include structure zpcard.
data : end of itabs.
data : begin of itabe occurs 100.
include structure zpcard.
data : end of itabe.
selection-screen: begin of block sel with frame title text-sel.
parameters: p_file type rlgrap-filename
selection-screen: end of block sel.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
EXPORTING
field_name = 'p_file'
IMPORTING
file_name = p_file.
start-of-selection.
call function 'WS_UPLOAD'
exporting
filename = p_file
filetype = 'DAT'
tables
data_tab = itab
exceptions
others = 10.
clear : itab, itabs, itabe.
sort itab by inter_audit_cd.
loop at itab.
ztable-mandt = sy-mandt.
modify itab transporting mandt.
check not itab[] is initial.
if sy-subrc eq 0.
modify ztable from table itab.
move-corresponding itab to itabs.
append itabs.
clear itabs.
else.
select single * from ztable
where inter_audit_cd eq itab-inter_audit_cd.
move-corresponding itab to itabe.
append itabe.
clear itabe.
delete itab.
clear itab.
endif.
endloop.
*----
if sy-subrc eq 0.
commit work.
else.
rollback work.
endif.
perform disp_rpt.
*----
*Display Error File Data
*----
form disp_rpt.
fieldcatalog-fieldname = 'MANDT'.
fieldcatalog-seltext_l = 'MANDT'.
fieldcatalog-col_pos = 0.
fieldcatalog-emphasize = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'INTER_AUDIT_CD'.
fieldcatalog-seltext_l = 'COST CENTER'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TRAN_DATE'.
fieldcatalog-seltext_l = 'TRANSACTION DATE'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'POSTING_DATE'.
fieldcatalog-seltext_l = 'POSTING DATE'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'TRAN_AMT'.
fieldcatalog-seltext_l = 'TRANSACTION AMOUNT'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'CURR_KEY'.
fieldcatalog-seltext_l = 'CURRENCY KEY'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'DEBIT_CREDIT'.
fieldcatalog-seltext_l = 'DEBIT CREDIT KEY'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'UPLOAD_DATE'.
fieldcatalog-seltext_l = 'UPLOAD DATE'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = 'Zprg'
i_callback_top_of_page = 'TOP_OF_PAGE1'
it_fieldcat = fieldcatalog[]
i_save = 'A'
tables
t_outtab = ITABe.
endform. " Disp_rpt
*----
PAGE HEADERS IN ALV REPORT
*----
form top_of_page1.
wa-typ = 'S'.
describe table itabs lines rows.
rows = sy-tfill.
nlinechar = rows.
concatenate nlinechar text-002 into
wa-info separated by space.
append wa to header.
wa-typ = 'S'.
describe table itabe lines rows.
rows = sy-tfill.
nlinechar = rows.
concatenate nlinechar text-001 into
wa-info separated by space.
append wa to header.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = header.
clear: header, header[].
endform.
i look forward to your reply
Regards
Raja Sekhar.T