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 its 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
I hope this Weblog has really made the CSV File Lookup possible.