Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

log file in session method

Former Member
0 Likes
626

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.

4 REPLIES 4
Read only

Former Member
0 Likes
587

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

Read only

andreas_mann3
Active Contributor
0 Likes
587

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.

Read only

Former Member
0 Likes
587

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.

Read only

Former Member
0 Likes
587

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