Limit Extracts from SAP Tables Using Mapping Parametes

When extracting large tables from SAP, you can limit the amount of data selected by using Informatica parameters.  Here are two examples.

  1. Use a parameter to limit the extract to retrieve only a specified set of data. Your target uses a truncate and load scenario.
  2. Use parameters as in the example above but also use a persistent cache lookup on the target table. Append new rows to the table.
For “Example 1”, you can use an “offset number of days” to only load the last x number of day’s transactions from a table.  Most SAP tables have an ERDAT column which is the created date. ERDAT can be used in the filter. SAP extract mappings use ABAP in the background, the Informatica mapping uses the SAP table’s source qualifier “Program Flow”.  This is where you  can set a filter.
Overview of steps
  • Create the Informatica mapping as normal, using an SAP application source qualifier.
  • Add a numeric Informatica parameter for the offset day’s value.
  • Open the SAP Source Qualifier, click the Properties tab, open the Program Flow section.
  • Add a new Variable, ABAP Type, give it a name like DATEPAST and use data type DATS.
  • Insert a new ABAP Block.  For the blocks code add something similar to the following:  :DATEPAST =  SY-DATUM - $$VVTTP_Offset_Days.
    • (Variable = current date – a numeric value)
  • For the “Source Level Attributes block”, add a static filter to compare a Date data type column from the SAP table () to the ABAP variable created in the previous step. (Remember, this variable will contain a date x number of days in the past.
    • Note: The ABAP block should be listed before the “Source Level Attributes block”
  • For the remainder of the mapping you can have a lookup to your staged table to filter out any existing records, have an Insert/Update options or clear and load the table.
  • Create the Informatica ABAP mapping as normal by using the Designer option “Mapping > Generate and Install SAP R/3 Code…”

Figure 1


Thank you for your support
 or  PayPal


IMPORTANT,  YOU are responsible for backing up your systems before trying or implementing any suggestions from this blog. I do not guarantee 100% accuracy of any code examples. I do not presume to know your system environment(s) or Security requirements; all code examples from this blog should be thoroughly tested before any attempted use on a production system.

0 Response to "Limit Extracts from SAP Tables Using Mapping Parametes"

Post a Comment