Pipeline: Data from CSV and SAP

Retrieve information from a CSV and combine it with information from SAP, then write it to another file.

Requirements

Snaps used

The following Snaps are used:

  • File Reader
  • CSV Parser
  • SAP Execute
  • Filter
  • Join
  • Structure
  • CSV Format
  • File Writer

Other requirements

  • Credentials to read data from SAP and an account configured in SnapLogic Manager. For more information, see Accounts on configuring an account.
  • A CSV file loaded into the SnapLogic database. You can use this Hive Output file as a sample.

Configuration

  1. Add and configure a File Reader Snap.
    • Set the Folder/File to point to the file uploaded to the SnapLogic database.
  2. Add a CSV Parser Snap with the default configuration.
  3. Add and configure a SAP Execute Snap.
    1. You will need to enter the SAP values for Username, Password, Language, Client, Server and System number.
    2. Set bapi to the BAPI ABAP Name you want to use.
  4. Add and configure a Filter Snap to limit the data to process.
    1. Set the Filter expression to a valid expression, such as $NODE_LEVEL==2.
    2. On the View tab, set the Error view to discard error data and continue.
  5. Add and configure a Join Snap to join the data from both sources.
    1. Set Join type to Inner.
    2. Set Left path to a value from the CSV file, such as $Product_Name.
    3. Set Right path to the corresponding value from SAP, such as $NODE_TEXT.
    4. Leave Sorted streams as Unsorted.
  6. Add and configure a Structure Snap to map the data to new column headings.
    1. Set Pass through to [None] - new map.
    2. Set up the following mapping table:
    Source path Operation Target path
    $Product_Name move $Product_Name
    $Keywords move $Recommended_Keywords
    $Unique_visitors move $Unique_visitors
    $Total_visits move $Total_visits
  7. Add a CSV Format Snap with the default settings.
  8. Add and configure a File Writer Snap.
    • Set the File name to a CSV file to be saved to the SnapLogic database.