‎2006 Aug 29 4:11 PM
hi all,
iam uploading data from flat file using session method using f-02.
in flat file we got the fields like xblnr in bkpf table.
when reading the flat file if xblnr already in bkpf table the record must skip.if xblnr not in table bkpf it must insert into bkpf.
in session method log file it must show like this.
if 4 records in the flat file,2 records found in bkpf and 2 record not found in bkpf.
4 record read
2 records processed
2 record with errors.
if any body suggest me how can i proceed.
Any help would be appriciated.
Thanks in Advance.
praveen.
‎2006 Aug 30 7:16 AM
Hi Praveen,
You can continue like this.
First check the records from the database tables based on the input file data.
Fist check whether the XBLNR from file data exists in BKPF or not . if not go and proceed to update into transaction else you can throw the error like this XBLNR already exists, you can show these error records in report output .so that you can easily identify the data which in file is already there or not.
I think this will give some idea how to proceed. If you need some more please let me know.
Thanks
Satheesh
‎2006 Aug 30 7:22 AM
hi,
i don't get your problem, exactly?!
1) check whether xblnr is in table bkpf
-> count items found and items not found
2) for items not found: use abap rfbibl00 (look documentaio in se38) to post the missing FI-documents
3) create your protocol with your counter and compare later with protocol of rfbibl00
A.
‎2006 Aug 30 7:29 AM
I think before proceeding to BDC u should validate data and if it is blank then only keep it into the input file otherwise move it from that file.and keep recording such no.of records and after BDC u can display this information as audit file or u can download it to the given path location.
‎2006 Aug 30 7:54 AM
suppose ur uploading the flat file in one internal table say gt_tab.
LOOP AT gt_tab.
SELECT SINGLE * FROM bkpf
INTO wa_bkpf
WHERE xblnr = gt_tab-xblnr.
IF sy-subrc EQ 0.
we don't need the data again
DELETE gt_tab.
count = count+1. "this will count the record which u dont want to upload. with this count variable u can display the no of records with error
ENDIF.
ENDLOOP.
after this at each record which is sucessfully uploaded take another variable and count it.
Thanks,
Priti