Register Login

Difference between lookup(), lookup_ext(), and lookup_seq()

Updated Oct 05, 2023

In this SAP BODs tutorial, we will explain what is lookup(), lookup_ext(), and lookup_seq() and the difference between their functions.

lookup():

A simple and readable function is used for data transformation, particularly for comparing values and performing basic data manipulation. It's best suited for scenarios where you need to retrieve data based on a single condition, comparing one column, and returning a single value or row.

lookup_ext():

A versatile and comprehensive function designed for complex data transformation tasks. It can handle multiple field comparisons and return multiple rows, making it ideal for advanced data transformation needs, such as cross-referencing data with complex conditions and extracting additional information from cross-reference tables.

lookup_seq():

A specialized function that can handle both equal and greater conditions. It is useful when you need to compare data within a range of values, dealing with situations where you have equal and greater conditions simultaneously.

Key Differences:

  • lookup():

    • Ideal for basic data mapping.
    • Compares one column and returns a single value or row.
    • Suitable for simple data transformation needs.
  • lookup_ext():

    • Versatile and comprehensive.
    • Handles complex data mapping, cross-referencing, and validation.
    • Allows multiple field comparisons and can return multiple rows.
    • Suitable for advanced data transformation requirements.
  • lookup_seq():

    • Specialized for equal and greater conditions.
    • Useful when dealing with data comparisons within a range.
    • Combines both equal and greater conditions.
    • Provides a unique capability for specific data transformation scenarios.


×