cancel
Showing results for 
Search instead for 
Did you mean: 

Easy way to log processing

Former Member
0 Kudos

Hello all together,

I have fileadapter with certain content. I want to ensure that the data in this file are processed exactly once. The argument for checking this is i.e. an invoiceNo. in the file.

What would you propose is the easiest way to come to this!

I thought of doing it by using a JDBCLookup in an external Database or with an RFCLookup in SAP Z-Table.

Could you please advise me?

TIA

Volker

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

As per my underst u want to have a unique invoiceNo before u send it to the receiver. Please correct me if i m wrong.

In that case, if the invoiceNo is a unique key in any database table, and u have a direct access, then JDBC lookup is a good option.

Go for RFC lookup if that database is SAP database

Regards,

Prateek

Former Member
0 Kudos

Hi,

yes, I think you understand correct.

What you said are the two methods I thougt of. I would be interested in

1. The easiest way to use them or

2. Another "easy" way which didn't come to my mind yet.

THX

Volker

prateek
Active Contributor
0 Kudos

There r certain scenarios where a frequent call to database using lookups hamper the overall performance of the scenarios. Or it may not capture all the clients requirement.

At that time another option is to go for making a sync call to JDBC and use BPM for the message persistance.

Regards,

Prateek

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Volker,

Can you please explain your scenario a little bit more regarding the validation for unique records.

Cheer's

Former Member
0 Kudos

Of course.

I get orders in flat files. One field contains a unique number.

The orders are mapped to a RFC-function that writes the orders to a Z-table.

I have to ensure that one order is exactly processed one time. It is possible that the filename changes, but the unique number should be really unique.

So I think I have to check this while the order is mapped.

Hope this helps you to help me.

Volker

Former Member
0 Kudos

Hi,

The simple method is to add a check if the RFC function that is being called anyway.

ie. read Z table with invoice number to see if already processed and exit processing if it has.

This will not have any overhead doing this method instead of a JDBC lookup.

Try it and see - it will only be one line of code to add.

If you are calling a SAP standard module you will need to create a wrapper function with the lines to check the Z table and the call of the standard function.

Cheers

Colin.

prateek
Active Contributor
0 Kudos

If u really want to handle this before mapping, then go for RFC lookup.

Otherwise u can handle this at the receiver end also.

Also have a look at my previous post

Regards,

Prateek

Former Member
0 Kudos

What i am failing to understand is if you already have a unique number in the file for each order and thats what you are inserting into the database then why you need to check it using a lookup OR is it that the same order can be repeated in the same or other files and you want to avoide the processing of these duplicate orders.

Former Member
0 Kudos

yes, you are right, normally I should be able to use this unique number, but there are some cases, where this unique number is not used in our system. In our system another unique number is created. It sounds strange, but the unique number is not the reference number of our customer. But I should think about using the customers reference number for unique-check.

Volker

Former Member
0 Kudos

If that is the case, then Colin's approach is a good alternative to lookups as they do tend to be performance bottleneck's.

Cheer's