cancel
Showing results for 
Search instead for 
Did you mean: 

Checksum for target file

Former Member
0 Kudos

Hi Experts,

I have file to file scenario from SAP to FTP. Is it possible to perform checksum in PI file adpter or mapping. If so , what is the procedure to follow.

Thanks in advance

Reyaz Hussain

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>>Is it possible to perform checksum in PI file adpter

yes in OS command for example - cksum (program on unix)

>>>>or mapping. If so , what is the procedure to follow.

yes - you'd need a java mapping for that  - type on google - checksum java

http://www.mkyong.com/java/how-to-generate-a-file-checksum-value-in-java/

Regards,

Michal Krawczyk


Answers (2)

Answers (2)

Former Member
0 Kudos

@MIchal ,@ Baskar: Thanks a lot for your inputs. Found a java mapping program in a thread.

http://scn.sap.com/thread/1388978

Thanks a lot.

Reyaz

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Easier now even to do with java mapping. Java supports checksum classes in java.util.zip package.  Please refer these two links.  Read the file data using fileinputstream instead of string and then use the checksum class and pass the bytes content of file as argument to its update method.

http://www.java-examples.com/generate-crc32-checksum-byte-array-example

http://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html