Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/webcontent/uuid/b82710ca-0b01-0010-63a1-b...

CSV File Lookup

This Weblog explains how to make a CSV File Lookup in XI Mapping.

The Mapping API which is available in SAP NetWeaver ’04 SPS13, does not extend its support to File Adapter. In such a case we can make Lookup to a CSV file possible by making use of JDBC Adapter. This may sound weird but it’s possible by means of  a driver that makes the flat file (here CSV file) to appear as a database table to the API. Then by making use of the Generic or Special Lookup API we can traverse the file and fetch data in a way we fetch data from the database tables.

Once we have the Driver we have to import that jar file in the Imported Archive area available in the Integration Repository.

Once we have imported this file now we can consider the CSV file as a Database table and access it in the Mapping program using a simple user-defined java program.

Here our csv file looks like this

Instead of using Mapping API for Lookup, we perform LookUp in an optimized way as given in Optimizing Lookup's in XI

Code Snippet

I hope this Weblog has really made the CSV File Lookup possible.

16 Comments